diff --git a/Makefile.am b/Makefile.am index 3542279772..c44c4b93c0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) + MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono if CROSS_COMPILING @@ -48,7 +50,9 @@ GIT_DIR ?= $(srcdir)/.git dist-hook: test -d $(distdir)/mcs || mkdir $(distdir)/mcs d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive - rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d` + rm -rf `find $(top_distdir)/external -path '*\.git'` + rm -f `find $(top_distdir)/external -path '*\.exe'` + rm -f `find $(top_distdir)/external -path '*\.dll'` cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/ cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/ # Disable this for now because it is very slow and causes wrench to timeout: diff --git a/Makefile.in b/Makefile.in index 7ab824852e..b419fadcd2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,7 +85,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/config.h.in mkinstalldirs \ $(srcdir)/mono-core.spec.in $(srcdir)/mono-uninstalled.pc.in \ AUTHORS COPYING.LIB ChangeLog NEWS compile config.guess \ - config.rpath config.sub install-sh missing ltmain.sh + config.rpath config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ @@ -246,6 +246,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -254,6 +255,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -320,6 +322,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -369,6 +372,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -403,6 +407,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) MONOTOUCH_SUBDIRS = $(libgc_dir) eglib/src mono @CROSS_COMPILING_FALSE@@ONLY_MONOTOUCH_FALSE@@ONLY_XAMMAC_FALSE@SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) support data runtime scripts man samples msvc $(docs_dir) @CROSS_COMPILING_FALSE@@ONLY_MONOTOUCH_FALSE@@ONLY_XAMMAC_TRUE@SUBDIRS = $(libgc_dir) eglib/src mono runtime @@ -936,7 +941,9 @@ GIT_DIR ?= $(srcdir)/.git dist-hook: test -d $(distdir)/mcs || mkdir $(distdir)/mcs d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive - rm -rf `find $(top_distdir)/external -path '*\.git' -and -type d` + rm -rf `find $(top_distdir)/external -path '*\.git'` + rm -f `find $(top_distdir)/external -path '*\.exe'` + rm -f `find $(top_distdir)/external -path '*\.dll'` cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/ cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/ .PHONY: get-monolite-latest diff --git a/README.md b/README.md index 07c950004d..d600ce4ad1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ Mono is a software platform designed to allow developers to easily create cross platform applications. Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime. +[![Build Status](http://monojenkins.cloudapp.net/job/Mono/badge/icon)](http://monojenkins.cloudapp.net/job/Mono/) + 1. [Installation](#compilation-and-installation) 2. [Using Mono](#using-mono) 3. [Directory Roadmap](#directory-roadmap) @@ -34,6 +36,10 @@ a. Build Requirements * libzlib - This library and the development headers are required for compression file support in the 2.0 profile. + 4. Mono is required to build Mono. Use a system package or monolite (explained further below) + + 5. If you have a system Mono (not monolite), you will need to read this: http://mono-project.com/Parallel_Mono_Environments#Setting_up_a_Build_Environment + b. Building the Software ------------------------ diff --git a/acinclude.m4 b/acinclude.m4 index 16fecf7f86..5216cd14a5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -22,7 +22,7 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ |amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; @@ -158,7 +158,7 @@ modeok=false tagok=false for arg in "$[]@"; do case "$arg" in - --silent) ;; + --silent) ;; --mode=compile) modeok=true ;; --tag=CC|--tag=CXX) tagok=true ;; --quiet) ;; diff --git a/config.h.in b/config.h.in index 3d03795cde..b8c09f6b4a 100644 --- a/config.h.in +++ b/config.h.in @@ -320,7 +320,7 @@ /* Define to 1 if you have the `getpriority' function. */ #undef HAVE_GETPRIORITY -/* Define to 1 if you have the `GetProcessId' function. */ +/* Define if GetProcessId is available */ #undef HAVE_GETPROCESSID /* Define to 1 if you have the `getpwent' function. */ @@ -924,9 +924,6 @@ /* native types */ #undef MONO_NATIVE_TYPES -/* Sizeof sock_un.sun_path */ -#undef MONO_SIZEOF_SUNPATH - /* Reduce runtime requirements (and capabilities) */ #undef MONO_SMALL_CONFIG diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index ad3f1c707f..d901c34140 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -9f9229ff6a1b6a8b0e8d4e4cb7632a66927b37d3 \ No newline at end of file +e2d46ae5f394ada396886d241225ad895d4fa194 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index 049281c6e9..aefe5b6d2e 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -8be4fb39c41e5d71d787a6c58748fed22d78f9eb \ No newline at end of file +9ad91a3e3e9b4a437dedfc1a32a3c9092d967f5e \ No newline at end of file diff --git a/data/Makefile.in b/data/Makefile.in index 2bbc6658ce..75be628ba0 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -270,6 +270,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -278,6 +279,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -344,6 +346,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -393,6 +396,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/config.in b/data/config.in index 44fefc0802..51cac3f0b4 100644 --- a/data/config.in +++ b/data/config.in @@ -10,12 +10,14 @@ - + + + @@ -27,8 +29,8 @@ - - - - + + + + diff --git a/data/net_2_0/Browsers/Makefile.in b/data/net_2_0/Browsers/Makefile.in index d250537399..ab93576d60 100644 --- a/data/net_2_0/Browsers/Makefile.in +++ b/data/net_2_0/Browsers/Makefile.in @@ -191,6 +191,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -199,6 +200,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -265,6 +267,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -314,6 +317,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/net_2_0/Makefile.in b/data/net_2_0/Makefile.in index 8207e36f43..c2af614394 100644 --- a/data/net_2_0/Makefile.in +++ b/data/net_2_0/Makefile.in @@ -251,6 +251,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -259,6 +260,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -325,6 +327,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -374,6 +377,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/net_4_0/Browsers/Makefile.in b/data/net_4_0/Browsers/Makefile.in index 3e8c51213f..aa143f1761 100644 --- a/data/net_4_0/Browsers/Makefile.in +++ b/data/net_4_0/Browsers/Makefile.in @@ -191,6 +191,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -199,6 +200,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -265,6 +267,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -314,6 +317,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/net_4_0/Makefile.in b/data/net_4_0/Makefile.in index bed5f8155a..8ab3173274 100644 --- a/data/net_4_0/Makefile.in +++ b/data/net_4_0/Makefile.in @@ -251,6 +251,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -259,6 +260,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -325,6 +327,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -374,6 +377,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/net_4_5/Browsers/Makefile.in b/data/net_4_5/Browsers/Makefile.in index a96424fd72..705e6f5f4f 100644 --- a/data/net_4_5/Browsers/Makefile.in +++ b/data/net_4_5/Browsers/Makefile.in @@ -191,6 +191,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -199,6 +200,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -265,6 +267,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -314,6 +317,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/data/net_4_5/Makefile.in b/data/net_4_5/Makefile.in index 7a2ae670ae..90ace16ee4 100644 --- a/data/net_4_5/Makefile.in +++ b/data/net_4_5/Makefile.in @@ -251,6 +251,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -259,6 +260,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -325,6 +327,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -374,6 +377,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/docs/Makefile.in b/docs/Makefile.in index fb1c30eeb3..d52148580a 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -191,6 +191,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -199,6 +200,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -265,6 +267,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -314,6 +317,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/eglib/Makefile.am b/eglib/Makefile.am index b7e5cd6389..84cc8353c9 100644 --- a/eglib/Makefile.am +++ b/eglib/Makefile.am @@ -1,5 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) + if HOST_WIN32 SUBDIRS = m4 src else diff --git a/eglib/Makefile.in b/eglib/Makefile.in index e4837191da..2aee28e2d6 100644 --- a/eglib/Makefile.in +++ b/eglib/Makefile.in @@ -291,6 +291,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -348,6 +349,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = $(WERROR_CFLAGS) @CROSS_COMPILING_FALSE@@HOST_WIN32_FALSE@@PLATFORM_DARWIN_FALSE@SUBDIRS = m4 src test @CROSS_COMPILING_TRUE@@HOST_WIN32_FALSE@@PLATFORM_DARWIN_FALSE@SUBDIRS = m4 src @HOST_WIN32_FALSE@@PLATFORM_DARWIN_TRUE@SUBDIRS = m4 src diff --git a/eglib/acinclude.m4 b/eglib/acinclude.m4 index 526d00c1be..5216cd14a5 100644 --- a/eglib/acinclude.m4 +++ b/eglib/acinclude.m4 @@ -22,8 +22,8 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*) +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; ?86-pc-cygwin*|i?86-pc-cygwin*) diff --git a/eglib/config.h.in b/eglib/config.h.in index dec81e46e0..50b2eb2421 100644 --- a/eglib/config.h.in +++ b/eglib/config.h.in @@ -60,6 +60,9 @@ /* Define to 1 if you have the `strtok_r' function. */ #undef HAVE_STRTOK_R +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff --git a/eglib/configure.REMOVED.git-id b/eglib/configure.REMOVED.git-id index 6ca6af8e50..7c814b9dcb 100644 --- a/eglib/configure.REMOVED.git-id +++ b/eglib/configure.REMOVED.git-id @@ -1 +1 @@ -14cd313adbe67ed6c268aa152076066abd759556 \ No newline at end of file +8efa2ac8877cc4d116d3625738612cdba7e474a4 \ No newline at end of file diff --git a/eglib/configure.ac b/eglib/configure.ac index fab5724769..1ff6c42ff2 100644 --- a/eglib/configure.ac +++ b/eglib/configure.ac @@ -179,7 +179,7 @@ if test "x$have_iso_varargs" = "xyes"; then fi AC_SUBST(G_HAVE_ISO_VARARGS) -AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h) +AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h) AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0]) AC_SUBST(HAVE_ALLOCA_H) @@ -235,6 +235,12 @@ AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir Chan fi ) +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + AC_SUBST(GPOINTER_TO_INT) AC_SUBST(GPOINTER_TO_UINT) AC_SUBST(GINT_TO_POINTER) diff --git a/eglib/m4/Makefile.in b/eglib/m4/Makefile.in index 5fd63e0d80..42f6211d8c 100644 --- a/eglib/m4/Makefile.in +++ b/eglib/m4/Makefile.in @@ -205,6 +205,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/eglib/src/Makefile.am b/eglib/src/Makefile.am index 0d0e90354e..70d519ea22 100644 --- a/eglib/src/Makefile.am +++ b/eglib/src/Makefile.am @@ -1,5 +1,7 @@ noinst_LTLIBRARIES = libeglib.la libeglib-static.la +AM_CFLAGS = $(WERROR_CFLAGS) + win_files = \ eglib-config.hw \ gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \ @@ -30,6 +32,7 @@ libeglib_la_SOURCES = \ garray.c \ gbytearray.c \ gerror.c \ + vasprintf.h \ ghashtable.c \ giconv.c \ gmem.c \ diff --git a/eglib/src/Makefile.in.REMOVED.git-id b/eglib/src/Makefile.in.REMOVED.git-id index 91ee94333a..28469772a0 100644 --- a/eglib/src/Makefile.in.REMOVED.git-id +++ b/eglib/src/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -46a89f9f9808c4792e331b8cbb738a6d8db1c519 \ No newline at end of file +155511dfa6f6ef3805f7a5fad5fe5c9a6dbe2a8b \ No newline at end of file diff --git a/eglib/src/gerror.c b/eglib/src/gerror.c index 790c388c7a..2ec089c995 100644 --- a/eglib/src/gerror.c +++ b/eglib/src/gerror.c @@ -30,6 +30,8 @@ #include #include +#include "vasprintf.h" + GError * g_error_new (gpointer domain, gint code, const char *format, ...) { diff --git a/eglib/src/glib.h b/eglib/src/glib.h index 6d6dadff44..7cb8e6179c 100644 --- a/eglib/src/glib.h +++ b/eglib/src/glib.h @@ -49,12 +49,6 @@ G_BEGIN_DECLS -#ifdef G_OS_WIN32 -/* MSC and Cross-compilatin will use this */ -int vasprintf (char **strp, const char *fmt, va_list ap); -#endif - - /* * Basic data types */ @@ -727,8 +721,16 @@ GUnicodeBreakType g_unichar_break_type (gunichar c); #define G_UNLIKELY(x) (x) #endif +#if defined(_MSC_VER) +#define eg_unreachable() __assume(0) +#elif defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 5))) +#define eg_unreachable() __builtin_unreachable() +#else +#define eg_unreachable() +#endif + #define g_assert(x) G_STMT_START { if (G_UNLIKELY (!(x))) g_assertion_message ("* Assertion at %s:%d, condition `%s' not met\n", __FILE__, __LINE__, #x); } G_STMT_END -#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); } G_STMT_END +#define g_assert_not_reached() G_STMT_START { g_assertion_message ("* Assertion: should not be reached at %s:%d\n", __FILE__, __LINE__); eg_unreachable(); } G_STMT_END /* * Unicode conversion @@ -1008,19 +1010,6 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos); #define G_PRIORITY_DEFAULT 0 #define G_PRIORITY_DEFAULT_IDLE 200 -/* - * Empty thread functions, not used by eglib - */ -#define g_thread_supported() TRUE -#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END - -#define G_LOCK_DEFINE(name) int name; -#define G_LOCK_DEFINE_STATIC(name) static int name; -#define G_LOCK_EXTERN(name) -#define G_LOCK(name) -#define G_TRYLOCK(name) -#define G_UNLOCK(name) - #define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8))) #define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8)) diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c index aff9f460c5..73ef1f383d 100644 --- a/eglib/src/goutput.c +++ b/eglib/src/goutput.c @@ -31,6 +31,8 @@ #include #include +#include "vasprintf.h" + /* The current fatal levels, error is always fatal */ static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR; diff --git a/eglib/src/gspawn.c b/eglib/src/gspawn.c index 4f4e5bef53..836e6f2aa9 100644 --- a/eglib/src/gspawn.c +++ b/eglib/src/gspawn.c @@ -41,6 +41,10 @@ #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif + #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/eglib/src/gstr.c b/eglib/src/gstr.c index 335ccff936..3e976c5a2e 100644 --- a/eglib/src/gstr.c +++ b/eglib/src/gstr.c @@ -32,6 +32,8 @@ #include #include +#include "vasprintf.h" + /* This is not a macro, because I dont want to put _GNU_SOURCE in the glib.h header */ gchar * g_strndup (const gchar *str, gsize n) diff --git a/eglib/src/sort.frag.h b/eglib/src/sort.frag.h index 2cf5a9ba1f..6dc1950ae4 100644 --- a/eglib/src/sort.frag.h +++ b/eglib/src/sort.frag.h @@ -88,12 +88,24 @@ merge_lists (list_node *first, list_node *second, GCompareFunc func) static inline list_node * sweep_up (struct sort_info *si, list_node *list, int upto) { +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + int i; for (i = si->min_rank; i < upto; ++i) { list = merge_lists (si->ranks [i], list, si->func); si->ranks [i] = NULL; } return list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif } /* @@ -124,6 +136,14 @@ sweep_up (struct sort_info *si, list_node *list, int upto) static inline void insert_list (struct sort_info *si, list_node* list, int rank) { +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) + /* + * GCC incorrectly thinks we're writing below si->ranks array bounds. + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#endif + int i; if (rank > si->n_ranks) { @@ -149,6 +169,10 @@ insert_list (struct sort_info *si, list_node* list, int rank) si->n_ranks = i + 1; si->min_rank = i; si->ranks [i] = list; + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 406) +#pragma GCC diagnostic pop +#endif } #undef stringify2 diff --git a/eglib/src/vasprintf.h b/eglib/src/vasprintf.h new file mode 100644 index 0000000000..3d294541a5 --- /dev/null +++ b/eglib/src/vasprintf.h @@ -0,0 +1,11 @@ +#ifndef __VASPRINTF_H +#define __VASPRINTF_H + +#include +#include + +#ifndef HAVE_VASPRINTF +int vasprintf(char **ret, const char *fmt, va_list ap); +#endif + +#endif /* __VASPRINTF_H */ diff --git a/eglib/test/Makefile.in b/eglib/test/Makefile.in index 9d22bd654f..99c1c07cd1 100644 --- a/eglib/test/Makefile.in +++ b/eglib/test/Makefile.in @@ -267,6 +267,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/eglib/test/file.c b/eglib/test/file.c index 411c945296..19276c990c 100644 --- a/eglib/test/file.c +++ b/eglib/test/file.c @@ -115,7 +115,7 @@ test_file () #ifndef G_OS_WIN32 /* FIXME */ gchar *sympath; - gint ignored; + gint ignored G_GNUC_UNUSED; #endif res = g_file_test (NULL, 0); diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Aga.Controls.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Aga.Controls.dll.REMOVED.git-id deleted file mode 100644 index 4ada5a22e2..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Aga.Controls.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0fc198aa785b43ebc2084334bc85336072e00bfe \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.Server.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.Server.exe deleted file mode 100644 index d625e473a8..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.Server.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.UI.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.UI.dll deleted file mode 100644 index 63b0328189..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.UI.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.dll.REMOVED.git-id deleted file mode 100644 index 2d02bafabd..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Ambience.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ba0226882e0c101eda00edc3c2592a4cfdc741f8 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Common.Splash.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Common.Splash.dll deleted file mode 100644 index 4d00dfba04..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Common.Splash.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.ControlPanel.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.ControlPanel.exe deleted file mode 100644 index c32be44b81..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.ControlPanel.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Copy.exe.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Copy.exe.REMOVED.git-id deleted file mode 100644 index 0921d4af6a..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Copy.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0a54a97411a94bf84325a7eeecc6d68133be7b6f \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Echo.exe.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Echo.exe.REMOVED.git-id deleted file mode 100644 index 1da53b354a..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Echo.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -77d563f7a5afa344ab5bcfb0e57fb31f808ae111 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.exe deleted file mode 100644 index a51b8fe2a2..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.x86.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.x86.exe deleted file mode 100644 index 812e9b5d02..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.Elevated.x86.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.exe deleted file mode 100644 index 3eb7f500ba..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.x86.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.x86.exe deleted file mode 100644 index 1963670721..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Host.x86.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.XmlSerializers.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.XmlSerializers.dll deleted file mode 100644 index c6a342e69e..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.XmlSerializers.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.exe.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.exe.REMOVED.git-id deleted file mode 100644 index f136eb214d..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Icarus.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6f431b8505b8348131ed37de7a9aa343dab2a78e \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.MSBuildTasks.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.MSBuildTasks.dll deleted file mode 100644 index 063f01c9c5..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.MSBuildTasks.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Navigator.exe.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Navigator.exe.REMOVED.git-id deleted file mode 100644 index 1cec578705..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Navigator.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -df4dffecb0b55c9e0049c912026f8c24cc5b7366 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.PowerShellCommands.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.PowerShellCommands.dll deleted file mode 100644 index 9572ad4731..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.PowerShellCommands.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Reports.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Reports.dll deleted file mode 100644 index ebc028bc89..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Reports.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.UI.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.UI.dll.REMOVED.git-id deleted file mode 100644 index 74487f0ee1..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.UI.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -4f186ae17e811b7bd6986fa77ffc0eb45ae77a13 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Utility.exe b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Utility.exe deleted file mode 100644 index 64941c894d..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.Utility.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.VisualStudio.Interop.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.VisualStudio.Interop.dll deleted file mode 100644 index fdf77f2921..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.VisualStudio.Interop.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.XmlSerializers.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.XmlSerializers.dll.REMOVED.git-id deleted file mode 100644 index 03a2e7ac97..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.XmlSerializers.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -3086a94e2bc35d3497101cf5056f1152cc913e14 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.dll.REMOVED.git-id deleted file mode 100644 index 6326c043de..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -1d605ae71204d982dca8135529b2fc9c90019391 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio35.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio35.dll deleted file mode 100644 index 55d026f515..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio35.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio40.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio40.dll deleted file mode 100644 index cf3aea2730..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/Gallio40.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/ICSharpCode.TextEditor.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/ICSharpCode.TextEditor.dll.REMOVED.git-id deleted file mode 100644 index dbf00bb0b8..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/ICSharpCode.TextEditor.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -47aff41a048919977a977658bcd0c110a0f87632 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.Compatibility.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.Compatibility.dll deleted file mode 100644 index 39ae2f7c37..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.Compatibility.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.dll.REMOVED.git-id deleted file mode 100644 index 6a6b6c9819..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -09a5b5c0474cced4d4a2181078cbd1e4707f0ae9 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit35.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit35.dll deleted file mode 100644 index dfbaec1c24..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit35.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit40.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit40.dll deleted file mode 100644 index 816cee00a6..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/MbUnit40.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NCover/Gallio.NCoverIntegration.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NCover/Gallio.NCoverIntegration.dll deleted file mode 100644 index a42aa4706f..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NCover/Gallio.NCoverIntegration.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NHamcrest.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NHamcrest.dll deleted file mode 100644 index f6f4d02f81..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NHamcrest.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/Gallio.NUnitAdapterLatest.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/Gallio.NUnitAdapterLatest.dll deleted file mode 100644 index 81e75673f9..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/Gallio.NUnitAdapterLatest.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.dll.REMOVED.git-id deleted file mode 100644 index a5c18c9373..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5e9fcc037e7bad10a1afcaa0ce5a179d135b4413 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.interfaces.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.interfaces.dll deleted file mode 100644 index 3152dd2f08..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.core.interfaces.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 0705485350..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -875e0984208d52e5c96a409b52996547198af17a \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.mocks.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.mocks.dll deleted file mode 100644 index 97b88e7ac3..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.mocks.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.util.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.util.dll.REMOVED.git-id deleted file mode 100644 index a72921edd8..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/NUnit/Latest/nunit.util.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b31beef4192f37a66e51642a372cd7cfacf60f17 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.UI.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.UI.dll deleted file mode 100644 index 242d55b212..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.UI.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.dll deleted file mode 100644 index bdcfca23e8..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/TDNet/Gallio.TDNetRunner.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/Gallio.VisualStudio.Shell.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/Gallio.VisualStudio.Shell.dll deleted file mode 100644 index 8849f609ff..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/Gallio.VisualStudio.Shell.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Shell100.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Shell100.dll.REMOVED.git-id deleted file mode 100644 index f43a0280eb..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Shell100.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -233ab1af3ce0f3e446ff1052a91faf4902ea7200 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.Proxy.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.Proxy.dll.REMOVED.git-id deleted file mode 100644 index 37edf88b33..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.Proxy.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a95bc11a9e33e89c280fe5bd69814db68ad2cbbd \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.dll deleted file mode 100644 index 5bea6b4b57..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v10.0/Gallio.VisualStudio.Tip100.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Shell90.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Shell90.dll.REMOVED.git-id deleted file mode 100644 index a3603b0021..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Shell90.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -779d237c0bd808b0a3f0772f7782e02dde67b717 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.Proxy.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.Proxy.dll.REMOVED.git-id deleted file mode 100644 index 513baaada3..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.Proxy.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7a60a3629461cf02494cecaed937b5b1976c6fb4 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.dll b/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.dll deleted file mode 100644 index a575b919ec..0000000000 Binary files a/external/Lucene.Net/lib/Gallio.3.2.750/tools/VisualStudio/v9.0/Gallio.VisualStudio.Tip90.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Gallio.3.2.750/tools/WeifenLuo.WinFormsUI.Docking.dll.REMOVED.git-id b/external/Lucene.Net/lib/Gallio.3.2.750/tools/WeifenLuo.WinFormsUI.Docking.dll.REMOVED.git-id deleted file mode 100644 index ed331c3f02..0000000000 --- a/external/Lucene.Net/lib/Gallio.3.2.750/tools/WeifenLuo.WinFormsUI.Docking.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -dd42cc64c5a6cffaee63d6fa9b699ec4847c61cb \ No newline at end of file diff --git a/external/Lucene.Net/lib/ICSharpCode/SharpZipLib/0.85/ICSharpCode.SharpZipLib.dll.REMOVED.git-id b/external/Lucene.Net/lib/ICSharpCode/SharpZipLib/0.85/ICSharpCode.SharpZipLib.dll.REMOVED.git-id deleted file mode 100644 index 1fe5123324..0000000000 --- a/external/Lucene.Net/lib/ICSharpCode/SharpZipLib/0.85/ICSharpCode.SharpZipLib.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e829ebf4baa5601ed650a56b821e266ef0c0d9cc \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 16fbaaf046..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -105213c67c9ef3d0aa0997306d0c941b293029e2 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.mocks.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.mocks.dll deleted file mode 100644 index 2250c0c1e7..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/nunit.mocks.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/pnunit.framework.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/pnunit.framework.dll deleted file mode 100644 index 5b9a2c06b2..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/framework/pnunit.framework.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/fit.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/fit.dll deleted file mode 100644 index 40bbef0e29..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/fit.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/log4net.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/log4net.dll.REMOVED.git-id deleted file mode 100644 index d795cca736..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/log4net.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -20a2e1c47dea6ee52dc38cfd4eee0cfde7894faa \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit-console-runner.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit-console-runner.dll deleted file mode 100644 index 5daee5a876..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit-console-runner.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.dll.REMOVED.git-id deleted file mode 100644 index be98988bfc..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5eb61245eb8e23d7c68480d77573ac59e8c82045 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.interfaces.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.interfaces.dll deleted file mode 100644 index eb5c2a1685..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.core.interfaces.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.fixtures.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.fixtures.dll deleted file mode 100644 index e5d3cec04d..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.fixtures.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.util.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.util.dll.REMOVED.git-id deleted file mode 100644 index 103113fc5d..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/lib/nunit.util.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -9f4bace96a58a56cdd68e8c19335f397710c3da5 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-agent.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-agent.exe deleted file mode 100644 index 3ba23ea14e..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-agent.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-console.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-console.exe deleted file mode 100644 index c5492b070d..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit-console.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 16fbaaf046..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -105213c67c9ef3d0aa0997306d0c941b293029e2 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-agent.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-agent.exe deleted file mode 100644 index 91ba0af762..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-agent.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-launcher.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-launcher.exe deleted file mode 100644 index cbc361c6b7..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit-launcher.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.framework.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.framework.dll deleted file mode 100644 index 5b9a2c06b2..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.framework.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.tests.dll deleted file mode 100644 index 9d482ce446..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/pnunit.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/runFile.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/runFile.exe deleted file mode 100644 index a794458669..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/runFile.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/loadtest-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/loadtest-assembly.dll deleted file mode 100644 index 3c33dd63bc..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/loadtest-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/mock-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/mock-assembly.dll deleted file mode 100644 index bfb3b26990..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/mock-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nonamespace-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nonamespace-assembly.dll deleted file mode 100644 index 4d11b609a8..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nonamespace-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit-console.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit-console.tests.dll deleted file mode 100644 index 4d9c49b4b6..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit-console.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.core.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.core.tests.dll.REMOVED.git-id deleted file mode 100644 index d9432eb4a7..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.core.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a91217d2254ccb43e4eeb949cc41cb0098fa0187 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.fixtures.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.fixtures.tests.dll deleted file mode 100644 index fc624de403..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.fixtures.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 16fbaaf046..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -105213c67c9ef3d0aa0997306d0c941b293029e2 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.tests.dll.REMOVED.git-id deleted file mode 100644 index b1a468568f..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.framework.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e6b8be7ac3375d79a19635e50a79211fe356c1fc \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.mocks.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.mocks.tests.dll deleted file mode 100644 index 0771c38166..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.mocks.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.util.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.util.tests.dll.REMOVED.git-id deleted file mode 100644 index 0c3b5482bb..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/nunit.util.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a816c2a6c2c4f616831b6635036b8bfac79966ce \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-assembly.dll deleted file mode 100644 index c61e0c4f05..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-utilities.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-utilities.dll deleted file mode 100644 index 697418b4be..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/test-utilities.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/timing-tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/timing-tests.dll deleted file mode 100644 index bf1ae70e0b..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-1.1/tests/timing-tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 0705485350..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -875e0984208d52e5c96a409b52996547198af17a \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.mocks.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.mocks.dll deleted file mode 100644 index 97b88e7ac3..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/nunit.mocks.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/pnunit.framework.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/pnunit.framework.dll deleted file mode 100644 index ca9b5cb472..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/framework/pnunit.framework.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/fit.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/fit.dll deleted file mode 100644 index 40bbef0e29..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/fit.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/log4net.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/log4net.dll.REMOVED.git-id deleted file mode 100644 index d795cca736..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/log4net.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -20a2e1c47dea6ee52dc38cfd4eee0cfde7894faa \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-console-runner.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-console-runner.dll deleted file mode 100644 index a18299ede1..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-console-runner.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-gui-runner.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-gui-runner.dll.REMOVED.git-id deleted file mode 100644 index 7bc1d63aba..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit-gui-runner.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -ec364fa979b053139b43ced7bbee75879607a99a \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.dll.REMOVED.git-id deleted file mode 100644 index a5c18c9373..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5e9fcc037e7bad10a1afcaa0ce5a179d135b4413 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.interfaces.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.interfaces.dll deleted file mode 100644 index 3152dd2f08..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.core.interfaces.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.fixtures.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.fixtures.dll deleted file mode 100644 index 0b19937293..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.fixtures.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uiexception.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uiexception.dll deleted file mode 100644 index 66b4b95491..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uiexception.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uikit.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uikit.dll.REMOVED.git-id deleted file mode 100644 index eadcdc45ab..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.uikit.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -adc5ead69d0593226d80b7220e65d3d435133a74 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.util.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.util.dll.REMOVED.git-id deleted file mode 100644 index a72921edd8..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/lib/nunit.util.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b31beef4192f37a66e51642a372cd7cfacf60f17 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent-x86.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent-x86.exe deleted file mode 100644 index 00b331cb29..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent-x86.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent.exe deleted file mode 100644 index 8729148a8f..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-agent.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console-x86.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console-x86.exe deleted file mode 100644 index 48f726ff77..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console-x86.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe deleted file mode 100644 index 74f3dff575..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe deleted file mode 100644 index f7913681e7..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.exe deleted file mode 100644 index 7718d8d356..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 0705485350..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -875e0984208d52e5c96a409b52996547198af17a \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-agent.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-agent.exe deleted file mode 100644 index 31a03d80f6..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-agent.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-launcher.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-launcher.exe deleted file mode 100644 index e4c4f092a8..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit-launcher.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.framework.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.framework.dll deleted file mode 100644 index ca9b5cb472..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.framework.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.tests.dll deleted file mode 100644 index e3985d65a8..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/pnunit.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/runFile.exe b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/runFile.exe deleted file mode 100644 index a794458669..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/runFile.exe and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/loadtest-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/loadtest-assembly.dll deleted file mode 100644 index 157cc43aaf..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/loadtest-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/mock-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/mock-assembly.dll deleted file mode 100644 index 4a76850793..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/mock-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nonamespace-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nonamespace-assembly.dll deleted file mode 100644 index b12afd4a5d..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nonamespace-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-console.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-console.tests.dll deleted file mode 100644 index 72d86ac27d..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-console.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-gui.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-gui.tests.dll deleted file mode 100644 index 5be825329c..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit-gui.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.core.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.core.tests.dll.REMOVED.git-id deleted file mode 100644 index 4379b4cd64..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.core.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -897b061afc4d913141127d4c94954810d16e1a89 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.fixtures.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.fixtures.tests.dll deleted file mode 100644 index 22ba068373..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.fixtures.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 0705485350..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -875e0984208d52e5c96a409b52996547198af17a \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.tests.dll.REMOVED.git-id deleted file mode 100644 index b15ad7631c..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.framework.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -28dc3ab581edb6a85d032f3a7138be5565fbd817 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.mocks.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.mocks.tests.dll deleted file mode 100644 index 09a0b17a74..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.mocks.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uiexception.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uiexception.tests.dll.REMOVED.git-id deleted file mode 100644 index e9e44f0633..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uiexception.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -43863c072f708c1d0855fb17541460b5d64a4911 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uikit.tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uikit.tests.dll deleted file mode 100644 index 0abc2a7ba7..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.uikit.tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.util.tests.dll.REMOVED.git-id b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.util.tests.dll.REMOVED.git-id deleted file mode 100644 index 558bc4799d..0000000000 --- a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/nunit.util.tests.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6e9e90a5158e5394155c1197322765b8e30b73a5 \ No newline at end of file diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-assembly.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-assembly.dll deleted file mode 100644 index 43042414fb..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-assembly.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-utilities.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-utilities.dll deleted file mode 100644 index 553750b492..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/test-utilities.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/timing-tests.dll b/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/timing-tests.dll deleted file mode 100644 index fc2711bb7e..0000000000 Binary files a/external/Lucene.Net/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/tests/timing-tests.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Nuget/NuGet.exe.REMOVED.git-id b/external/Lucene.Net/lib/Nuget/NuGet.exe.REMOVED.git-id deleted file mode 100644 index bf8f38933b..0000000000 --- a/external/Lucene.Net/lib/Nuget/NuGet.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c3960af621dceffd2f8a38b0026c650fddc758b2 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Spatial4n/NET35/GeoAPI.dll b/external/Lucene.Net/lib/Spatial4n/NET35/GeoAPI.dll deleted file mode 100644 index dabb246770..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET35/GeoAPI.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Spatial4n/NET35/NetTopologySuite.dll.REMOVED.git-id b/external/Lucene.Net/lib/Spatial4n/NET35/NetTopologySuite.dll.REMOVED.git-id deleted file mode 100644 index 175e0b16ba..0000000000 --- a/external/Lucene.Net/lib/Spatial4n/NET35/NetTopologySuite.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a2201a8faae23c259207d381297905908f028781 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Spatial4n/NET35/PowerCollections.dll.REMOVED.git-id b/external/Lucene.Net/lib/Spatial4n/NET35/PowerCollections.dll.REMOVED.git-id deleted file mode 100644 index b3bab4208b..0000000000 --- a/external/Lucene.Net/lib/Spatial4n/NET35/PowerCollections.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d62817b0acb1b5b24af25975168b27bcddfadf73 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.NTS.dll b/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.NTS.dll deleted file mode 100644 index 4f750e5c9f..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.NTS.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.dll b/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.dll deleted file mode 100644 index a0761b73b7..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET35/Spatial4n.Core.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Spatial4n/NET40/GeoAPI.dll b/external/Lucene.Net/lib/Spatial4n/NET40/GeoAPI.dll deleted file mode 100644 index dabb246770..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET40/GeoAPI.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Spatial4n/NET40/NetTopologySuite.dll.REMOVED.git-id b/external/Lucene.Net/lib/Spatial4n/NET40/NetTopologySuite.dll.REMOVED.git-id deleted file mode 100644 index 175e0b16ba..0000000000 --- a/external/Lucene.Net/lib/Spatial4n/NET40/NetTopologySuite.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a2201a8faae23c259207d381297905908f028781 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Spatial4n/NET40/PowerCollections.dll.REMOVED.git-id b/external/Lucene.Net/lib/Spatial4n/NET40/PowerCollections.dll.REMOVED.git-id deleted file mode 100644 index b3bab4208b..0000000000 --- a/external/Lucene.Net/lib/Spatial4n/NET40/PowerCollections.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d62817b0acb1b5b24af25975168b27bcddfadf73 \ No newline at end of file diff --git a/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.NTS.dll b/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.NTS.dll deleted file mode 100644 index 1986e16fec..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.NTS.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.dll b/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.dll deleted file mode 100644 index 7d35027f68..0000000000 Binary files a/external/Lucene.Net/lib/Spatial4n/NET40/Spatial4n.Core.dll and /dev/null differ diff --git a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.Rules.dll.REMOVED.git-id b/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.Rules.dll.REMOVED.git-id deleted file mode 100644 index 6fa927f102..0000000000 --- a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.Rules.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -deb1998f568c93a8ed5b6433d018bc9d467a11d0 \ No newline at end of file diff --git a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.dll.REMOVED.git-id b/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.dll.REMOVED.git-id deleted file mode 100644 index a6f8b69771..0000000000 --- a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.CSharp.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -576423a1711a48a6269b60c9e3ccfcef6b28ac4f \ No newline at end of file diff --git a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.VSPackage.dll.REMOVED.git-id b/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.VSPackage.dll.REMOVED.git-id deleted file mode 100644 index 58e1a12f0c..0000000000 --- a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.VSPackage.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -02dcb458e4d63c1792f894549b3dbf2bd4120512 \ No newline at end of file diff --git a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.dll.REMOVED.git-id b/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.dll.REMOVED.git-id deleted file mode 100644 index 1ddf34339f..0000000000 --- a/external/Lucene.Net/lib/StyleCop.4.5/StyleCop.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c8b32a2d467bcb875f46921ffd04e3b5470282ee \ No newline at end of file diff --git a/external/Lucene.Net/lib/StyleCop.4.5/StyleCopSettingsEditor.exe.REMOVED.git-id b/external/Lucene.Net/lib/StyleCop.4.5/StyleCopSettingsEditor.exe.REMOVED.git-id deleted file mode 100644 index ff59517c25..0000000000 --- a/external/Lucene.Net/lib/StyleCop.4.5/StyleCopSettingsEditor.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c47ed737adac222db50924ba01cfa2f1c75d4b38 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Src/Lib/NUnit/Compact/NUnitLite.dll b/external/Newtonsoft.Json/Src/Lib/NUnit/Compact/NUnitLite.dll deleted file mode 100644 index 2bf15332be..0000000000 Binary files a/external/Newtonsoft.Json/Src/Lib/NUnit/Compact/NUnitLite.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Src/Lib/NUnit/DotNet/nunit.framework.dll b/external/Newtonsoft.Json/Src/Lib/NUnit/DotNet/nunit.framework.dll deleted file mode 100644 index de687d97f9..0000000000 Binary files a/external/Newtonsoft.Json/Src/Lib/NUnit/DotNet/nunit.framework.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Src/Lib/NUnit/Silverlight/nunit.framework.dll b/external/Newtonsoft.Json/Src/Lib/NUnit/Silverlight/nunit.framework.dll deleted file mode 100644 index d4e0b72ad1..0000000000 Binary files a/external/Newtonsoft.Json/Src/Lib/NUnit/Silverlight/nunit.framework.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/7-zip/7za.exe.REMOVED.git-id b/external/Newtonsoft.Json/Tools/7-zip/7za.exe.REMOVED.git-id deleted file mode 100644 index 66ca89ca58..0000000000 --- a/external/Newtonsoft.Json/Tools/7-zip/7za.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -12b9499a28960378cd26a7b7f0733681c49a5d71 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.framework.dll.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 2c93f7b42f..0000000000 --- a/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6856e51ef08a8e681896c3a84ccbeea8975d5947 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.mocks.dll b/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.mocks.dll deleted file mode 100644 index 6ee2c1cc20..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/framework/nunit.mocks.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-console-runner.dll b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-console-runner.dll deleted file mode 100644 index 1709ce7bd2..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-console-runner.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-gui-runner.dll.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-gui-runner.dll.REMOVED.git-id deleted file mode 100644 index 0fd7dd9516..0000000000 --- a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit-gui-runner.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -35efa737c3957ac14e4480d2a559ff4127298597 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.dll.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.dll.REMOVED.git-id deleted file mode 100644 index 0cc1e1dd6c..0000000000 --- a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a1dd69866dfe9f4a0ea9975d961b02230aa66969 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.interfaces.dll b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.interfaces.dll deleted file mode 100644 index 0ac8788205..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.core.interfaces.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uiexception.dll b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uiexception.dll deleted file mode 100644 index 610c1700ed..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uiexception.dll and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uikit.dll.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uikit.dll.REMOVED.git-id deleted file mode 100644 index 58576daa40..0000000000 --- a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.uikit.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -9087db2d16660e0fa83bc9d3c64bd01e21807d61 \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.util.dll.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.util.dll.REMOVED.git-id deleted file mode 100644 index acb5c09892..0000000000 --- a/external/Newtonsoft.Json/Tools/NUnit/lib/nunit.util.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0b315c2106daf056a34764827fa3ca8affd2959e \ No newline at end of file diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit-agent-x86.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit-agent-x86.exe deleted file mode 100644 index ebcee1be24..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit-agent-x86.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit-agent.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit-agent.exe deleted file mode 100644 index ec41f32382..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit-agent.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit-console-x86.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit-console-x86.exe deleted file mode 100644 index e08ac9c81d..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit-console-x86.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit-console.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit-console.exe deleted file mode 100644 index 1544a9d831..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit-console.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit-x86.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit-x86.exe deleted file mode 100644 index fd342c070a..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit-x86.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NUnit/nunit.exe b/external/Newtonsoft.Json/Tools/NUnit/nunit.exe deleted file mode 100644 index ad8b08af38..0000000000 Binary files a/external/Newtonsoft.Json/Tools/NUnit/nunit.exe and /dev/null differ diff --git a/external/Newtonsoft.Json/Tools/NuGet/NuGet.exe.REMOVED.git-id b/external/Newtonsoft.Json/Tools/NuGet/NuGet.exe.REMOVED.git-id deleted file mode 100644 index f1025135f2..0000000000 --- a/external/Newtonsoft.Json/Tools/NuGet/NuGet.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -34ad49b494dd855dabf1b1cee5d3a8d51525d3b9 \ No newline at end of file diff --git a/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Signed/System.Web.WebPages.Deployment.dll b/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Signed/System.Web.WebPages.Deployment.dll deleted file mode 100644 index d219ec8553..0000000000 Binary files a/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Signed/System.Web.WebPages.Deployment.dll and /dev/null differ diff --git a/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Unsigned/System.Web.WebPages.Deployment.dll b/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Unsigned/System.Web.WebPages.Deployment.dll deleted file mode 100644 index ced1480455..0000000000 Binary files a/external/aspnetwebstack/test/System.Web.WebPages.Deployment.Test/TestFiles/ConfigTestAssemblies/V2_Unsigned/System.Web.WebPages.Deployment.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/PortableClassLibrary.dll b/external/cecil/Test/Resources/assemblies/PortableClassLibrary.dll deleted file mode 100644 index 21bb42fb92..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/PortableClassLibrary.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/boxedoptarg.dll b/external/cecil/Test/Resources/assemblies/boxedoptarg.dll deleted file mode 100644 index 23edd61bb8..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/boxedoptarg.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/catch.exe b/external/cecil/Test/Resources/assemblies/catch.exe deleted file mode 100644 index d7ef04afb2..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/catch.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/cppcli.dll b/external/cecil/Test/Resources/assemblies/cppcli.dll deleted file mode 100644 index f216fde980..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/cppcli.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/cscgpbug.dll b/external/cecil/Test/Resources/assemblies/cscgpbug.dll deleted file mode 100755 index 5a5c0f3f4d..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/cscgpbug.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/decsec-att.dll b/external/cecil/Test/Resources/assemblies/decsec-att.dll deleted file mode 100644 index e9ac355408..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/decsec-att.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/decsec-xml.dll b/external/cecil/Test/Resources/assemblies/decsec-xml.dll deleted file mode 100644 index fbaa51cac3..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/decsec-xml.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/decsec1-xml.dll b/external/cecil/Test/Resources/assemblies/decsec1-xml.dll deleted file mode 100755 index d898c2ab3c..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/decsec1-xml.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/delay-signed.dll b/external/cecil/Test/Resources/assemblies/delay-signed.dll deleted file mode 100644 index 3571ccfd4b..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/delay-signed.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/empty-decsec-att.dll b/external/cecil/Test/Resources/assemblies/empty-decsec-att.dll deleted file mode 100644 index 2dcd9418ba..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/empty-decsec-att.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/fptr.exe b/external/cecil/Test/Resources/assemblies/fptr.exe deleted file mode 100644 index e5be5ad5e9..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/fptr.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/gifaceref.exe b/external/cecil/Test/Resources/assemblies/gifaceref.exe deleted file mode 100644 index c8e2ed1231..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/gifaceref.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello.anycpu.exe b/external/cecil/Test/Resources/assemblies/hello.anycpu.exe deleted file mode 100644 index 44ef8db84c..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello.anycpu.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello.exe b/external/cecil/Test/Resources/assemblies/hello.exe deleted file mode 100644 index efd7c7da9b..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello.ia64.exe b/external/cecil/Test/Resources/assemblies/hello.ia64.exe deleted file mode 100644 index 1d50f54d8b..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello.ia64.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello.x64.exe b/external/cecil/Test/Resources/assemblies/hello.x64.exe deleted file mode 100644 index 9a8aeef84a..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello.x64.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello.x86.exe b/external/cecil/Test/Resources/assemblies/hello.x86.exe deleted file mode 100644 index 1e0c064f6f..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello.x86.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hello1.exe b/external/cecil/Test/Resources/assemblies/hello1.exe deleted file mode 100644 index c83aecfd13..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hello1.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/hellow.exe b/external/cecil/Test/Resources/assemblies/hellow.exe deleted file mode 100644 index b5670845f5..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/hellow.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/iterator.exe b/external/cecil/Test/Resources/assemblies/iterator.exe deleted file mode 100644 index 5e51ed960d..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/iterator.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/libhello.dll b/external/cecil/Test/Resources/assemblies/libhello.dll deleted file mode 100644 index 7b43e0114e..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/libhello.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/libres.dll b/external/cecil/Test/Resources/assemblies/libres.dll deleted file mode 100644 index 66a2b194d2..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/libres.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/marshal.dll b/external/cecil/Test/Resources/assemblies/marshal.dll deleted file mode 100644 index 04c85eff2e..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/marshal.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/metro.exe b/external/cecil/Test/Resources/assemblies/metro.exe deleted file mode 100644 index 68784b316e..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/metro.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/mma.exe b/external/cecil/Test/Resources/assemblies/mma.exe deleted file mode 100644 index 78632f8dd4..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/mma.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/noblob.dll b/external/cecil/Test/Resources/assemblies/noblob.dll deleted file mode 100644 index 350181a383..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/noblob.dll and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/pinvoke.exe b/external/cecil/Test/Resources/assemblies/pinvoke.exe deleted file mode 100644 index 2bd10bf8be..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/pinvoke.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/switch.exe b/external/cecil/Test/Resources/assemblies/switch.exe deleted file mode 100644 index 114083242c..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/switch.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/varargs.exe b/external/cecil/Test/Resources/assemblies/varargs.exe deleted file mode 100644 index 4e3acf4cda..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/varargs.exe and /dev/null differ diff --git a/external/cecil/Test/Resources/assemblies/wp7.dll b/external/cecil/Test/Resources/assemblies/wp7.dll deleted file mode 100644 index c3cbf7b6f1..0000000000 Binary files a/external/cecil/Test/Resources/assemblies/wp7.dll and /dev/null differ diff --git a/external/cecil/Test/libs/nunit-2.6.2/nunit.core.dll.REMOVED.git-id b/external/cecil/Test/libs/nunit-2.6.2/nunit.core.dll.REMOVED.git-id deleted file mode 100644 index d04c5932da..0000000000 --- a/external/cecil/Test/libs/nunit-2.6.2/nunit.core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -8e6d9566c1347d99d53bc27c8e2085d3860aa7f6 \ No newline at end of file diff --git a/external/cecil/Test/libs/nunit-2.6.2/nunit.core.interfaces.dll b/external/cecil/Test/libs/nunit-2.6.2/nunit.core.interfaces.dll deleted file mode 100755 index a966ad5217..0000000000 Binary files a/external/cecil/Test/libs/nunit-2.6.2/nunit.core.interfaces.dll and /dev/null differ diff --git a/external/cecil/Test/libs/nunit-2.6.2/nunit.framework.dll.REMOVED.git-id b/external/cecil/Test/libs/nunit-2.6.2/nunit.framework.dll.REMOVED.git-id deleted file mode 100644 index 6052807984..0000000000 --- a/external/cecil/Test/libs/nunit-2.6.2/nunit.framework.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -3e24ba1ca6260d7d0499624d13d2c5a2cd75b52a \ No newline at end of file diff --git a/external/cecil/rocks/Test/Resources/assemblies/decsec-att.dll b/external/cecil/rocks/Test/Resources/assemblies/decsec-att.dll deleted file mode 100644 index e9ac355408..0000000000 Binary files a/external/cecil/rocks/Test/Resources/assemblies/decsec-att.dll and /dev/null differ diff --git a/external/cecil/rocks/Test/Resources/assemblies/decsec-xml.dll b/external/cecil/rocks/Test/Resources/assemblies/decsec-xml.dll deleted file mode 100644 index fbaa51cac3..0000000000 Binary files a/external/cecil/rocks/Test/Resources/assemblies/decsec-xml.dll and /dev/null differ diff --git a/external/cecil/symbols/mdb/Test/Resources/assemblies/hello.exe b/external/cecil/symbols/mdb/Test/Resources/assemblies/hello.exe deleted file mode 100644 index c2e4b9b38a..0000000000 Binary files a/external/cecil/symbols/mdb/Test/Resources/assemblies/hello.exe and /dev/null differ diff --git a/external/cecil/symbols/pdb/Test/Resources/assemblies/VBConsApp.exe b/external/cecil/symbols/pdb/Test/Resources/assemblies/VBConsApp.exe deleted file mode 100755 index c86b64b151..0000000000 Binary files a/external/cecil/symbols/pdb/Test/Resources/assemblies/VBConsApp.exe and /dev/null differ diff --git a/external/cecil/symbols/pdb/Test/Resources/assemblies/fsapp.exe b/external/cecil/symbols/pdb/Test/Resources/assemblies/fsapp.exe deleted file mode 100755 index 7cdd2368ec..0000000000 Binary files a/external/cecil/symbols/pdb/Test/Resources/assemblies/fsapp.exe and /dev/null differ diff --git a/external/cecil/symbols/pdb/Test/Resources/assemblies/test.exe b/external/cecil/symbols/pdb/Test/Resources/assemblies/test.exe deleted file mode 100644 index 1f45491b73..0000000000 Binary files a/external/cecil/symbols/pdb/Test/Resources/assemblies/test.exe and /dev/null differ diff --git a/external/entityframework/src/NuGet/EntityFramework.SqlServerCompact/lib/net40/System.Data.SqlServerCe.Entity.dll.REMOVED.git-id b/external/entityframework/src/NuGet/EntityFramework.SqlServerCompact/lib/net40/System.Data.SqlServerCe.Entity.dll.REMOVED.git-id deleted file mode 100644 index c156c3fe28..0000000000 --- a/external/entityframework/src/NuGet/EntityFramework.SqlServerCompact/lib/net40/System.Data.SqlServerCe.Entity.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7588cffbe01a245ef6d706606572e43b7ed5788b \ No newline at end of file diff --git a/external/ikdasm/IKVM.Reflection.dll.REMOVED.git-id b/external/ikdasm/IKVM.Reflection.dll.REMOVED.git-id deleted file mode 100644 index 7aa6c85ff1..0000000000 --- a/external/ikdasm/IKVM.Reflection.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d79cd451c3c5154e26435e5615654ff4cdb0f714 \ No newline at end of file diff --git a/external/ikvm/bin/ICSharpCode.SharpZipLib.dll.REMOVED.git-id b/external/ikvm/bin/ICSharpCode.SharpZipLib.dll.REMOVED.git-id deleted file mode 100644 index 0dc5124b53..0000000000 --- a/external/ikvm/bin/ICSharpCode.SharpZipLib.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -77bafe8ba867a1618b8735200289f6fad68b825e \ No newline at end of file diff --git a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Core.dll.REMOVED.git-id b/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Core.dll.REMOVED.git-id deleted file mode 100644 index 3ab3cf23a9..0000000000 --- a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Core.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -f767bb9aa09536eee642a3380bffe7c535560a55 \ No newline at end of file diff --git a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Interfaces.dll b/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Interfaces.dll deleted file mode 100644 index 0cc57d753f..0000000000 Binary files a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Interfaces.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Linq.dll.REMOVED.git-id b/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Linq.dll.REMOVED.git-id deleted file mode 100644 index 8ff6dbf589..0000000000 --- a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.Linq.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -cd601f8c50db07a389b4babbbdd49bced6f2f417 \ No newline at end of file diff --git a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.PlatformServices.dll b/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.PlatformServices.dll deleted file mode 100644 index 3b8798c800..0000000000 Binary files a/external/rx/Rx/NET/Samples/HistoricalScheduling/References/System.Reactive.PlatformServices.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/Portable/.nuget/NuGet.exe.REMOVED.git-id b/external/rx/Rx/NET/Samples/Portable/.nuget/NuGet.exe.REMOVED.git-id deleted file mode 100644 index db99c75dd1..0000000000 --- a/external/rx/Rx/NET/Samples/Portable/.nuget/NuGet.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2c9369842a726da0644cf0316734b02edcac4ac6 \ No newline at end of file diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Core.dll b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Core.dll deleted file mode 100644 index aecf41e42c..0000000000 Binary files a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Core.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Interfaces.dll b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Interfaces.dll deleted file mode 100644 index 47aa9d10ea..0000000000 Binary files a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Interfaces.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Linq.dll.REMOVED.git-id b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Linq.dll.REMOVED.git-id deleted file mode 100644 index c29ed1e2a1..0000000000 --- a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Linq.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5c56946c826a7f77c6a0d65489629966c18f492c \ No newline at end of file diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.PlatformServices.dll b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.PlatformServices.dll deleted file mode 100644 index b1413d0a61..0000000000 Binary files a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.PlatformServices.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Runtime.Remoting.dll b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Runtime.Remoting.dll deleted file mode 100644 index 8b3b3e3327..0000000000 Binary files a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Runtime.Remoting.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Windows.Forms.dll b/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Windows.Forms.dll deleted file mode 100644 index 0f4dcac9a1..0000000000 Binary files a/external/rx/Rx/NET/Samples/RxRemoteMouseMoves/References/System.Reactive.Windows.Forms.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/.nuget/NuGet.exe.REMOVED.git-id b/external/rx/Rx/NET/Source/.nuget/NuGet.exe.REMOVED.git-id deleted file mode 100644 index 66066768b1..0000000000 --- a/external/rx/Rx/NET/Source/.nuget/NuGet.exe.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -63c19c97db9c0fbed1eab83c1688f45a776f800a \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/References/DESKTOPCLR20/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/DESKTOPCLR20/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 387ad78fab..0000000000 Binary files a/external/rx/Rx/NET/Source/References/DESKTOPCLR20/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/DESKTOPCLR40/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/DESKTOPCLR40/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 37a149f735..0000000000 Binary files a/external/rx/Rx/NET/Source/References/DESKTOPCLR40/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.Silverlight.Testing.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.Silverlight.Testing.dll.REMOVED.git-id deleted file mode 100644 index d222674921..0000000000 --- a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.Silverlight.Testing.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b1425ca8499b5bc912f6bfda68dbd5d3de1f0c94 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 0f723cd679..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll deleted file mode 100644 index 0f723cd679..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT3/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.Silverlight.Testing.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.Silverlight.Testing.dll.REMOVED.git-id deleted file mode 100644 index a9a4e371d9..0000000000 --- a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.Silverlight.Testing.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0c6df1878d9495b8a57830f45e6835bedb96e11f \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 9313918b18..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll deleted file mode 100644 index 9313918b18..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT4/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.Silverlight.Testing.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.Silverlight.Testing.dll.REMOVED.git-id deleted file mode 100644 index a9a4e371d9..0000000000 --- a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.Silverlight.Testing.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -0c6df1878d9495b8a57830f45e6835bedb96e11f \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 9313918b18..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll deleted file mode 100644 index 9313918b18..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHT5/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 3e06f9ad96..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll b/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll deleted file mode 100644 index 3e06f9ad96..0000000000 Binary files a/external/rx/Rx/NET/Source/References/SILVERLIGHTM7/Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/References/WINDOWS_PHONE8/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/external/rx/Rx/NET/Source/References/WINDOWS_PHONE8/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 9313918b18..0000000000 Binary files a/external/rx/Rx/NET/Source/References/WINDOWS_PHONE8/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Core.dll b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Core.dll deleted file mode 100755 index bc2ece9c46..0000000000 Binary files a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Core.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Debugger.dll b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Debugger.dll deleted file mode 100755 index 0ecf5bd054..0000000000 Binary files a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Debugger.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Experimental.dll b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Experimental.dll deleted file mode 100755 index 094f6bd621..0000000000 Binary files a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Experimental.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Interfaces.dll b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Interfaces.dll deleted file mode 100755 index 568889931e..0000000000 Binary files a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Interfaces.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Linq.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Linq.dll.REMOVED.git-id deleted file mode 100644 index f626a72227..0000000000 --- a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.Linq.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6e59a538e4631f2c1589c298a64f1dad1f2c3ec4 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.PlatformServices.dll b/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.PlatformServices.dll deleted file mode 100755 index 4fa49835a8..0000000000 Binary files a/external/rx/Rx/NET/Source/Rx_Xamarin/iOS/libs/System.Reactive.PlatformServices.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Threading.Tasks.dll deleted file mode 100644 index ebbac4cd10..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/net40/System.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll deleted file mode 100644 index 97ab730f29..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id deleted file mode 100644 index 3b60eb99b0..0000000000 --- a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp71/System.Threading.Tasks.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -74f5e2caed93499de991cfd5ed70b868e5207474 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id deleted file mode 100644 index 3b60eb99b0..0000000000 --- a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8+wp8/System.Threading.Tasks.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -74f5e2caed93499de991cfd5ed70b868e5207474 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id deleted file mode 100644 index 3b60eb99b0..0000000000 --- a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl4+win8/System.Threading.Tasks.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -74f5e2caed93499de991cfd5ed70b868e5207474 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll deleted file mode 100644 index ebbac4cd10..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+sl5+win8+wp8/System.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll deleted file mode 100644 index ebbac4cd10..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8+wp8/System.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Threading.Tasks.dll deleted file mode 100644 index ebbac4cd10..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/portable-net40+win8/System.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Runtime.dll deleted file mode 100644 index 97ab730f29..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id deleted file mode 100644 index 3b60eb99b0..0000000000 --- a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4-windowsphone71/System.Threading.Tasks.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -74f5e2caed93499de991cfd5ed70b868e5207474 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id deleted file mode 100644 index 3b60eb99b0..0000000000 --- a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl4/System.Threading.Tasks.dll.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -74f5e2caed93499de991cfd5ed70b868e5207474 \ No newline at end of file diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Runtime.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Runtime.dll deleted file mode 100644 index fa831ade49..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Runtime.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Threading.Tasks.dll deleted file mode 100644 index ebbac4cd10..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.1.0.19/lib/sl5/System.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll deleted file mode 100644 index fe18d0383d..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.Desktop.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net40/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/net45/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net40+sl4+win8+wp71/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8+wp8/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/portable-net45+win8/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll deleted file mode 100644 index 1d110cc218..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.Phone.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4-windowsphone71/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll deleted file mode 100644 index e683718583..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.Silverlight.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/sl4/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/win8/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll deleted file mode 100644 index 1d110cc218..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.Phone.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll deleted file mode 100644 index e911377c2c..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.Extensions.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.dll deleted file mode 100644 index 065d7460b8..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Async.1.0.16/lib/wp8/Microsoft.Threading.Tasks.dll and /dev/null differ diff --git a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Build.1.0.4/tools/Microsoft.Bcl.Build.Tasks.dll b/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Build.1.0.4/tools/Microsoft.Bcl.Build.Tasks.dll deleted file mode 100644 index 2097a515cf..0000000000 Binary files a/external/rx/Rx/NET/Source/packages/Microsoft.Bcl.Build.1.0.4/tools/Microsoft.Bcl.Build.Tasks.dll and /dev/null differ diff --git a/ikvm-native/Makefile.in b/ikvm-native/Makefile.in index 496dfae73f..97657dbd50 100644 --- a/ikvm-native/Makefile.in +++ b/ikvm-native/Makefile.in @@ -239,6 +239,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -247,6 +248,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -313,6 +315,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -362,6 +365,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/ikvm-native/jni.c b/ikvm-native/jni.c index dec858e131..e638db1d76 100644 --- a/ikvm-native/jni.c +++ b/ikvm-native/jni.c @@ -486,11 +486,15 @@ static void* JNIEnv_vtable[] = 0 // jlong JNICALL GetDirectBufferCapacity(jobject buf); }; -JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable() +void** ikvm_GetJNIEnvVTable(void); + +JNIEXPORT void** JNICALL ikvm_GetJNIEnvVTable(void) { return JNIEnv_vtable; } +void* JNICALL ikvm_MarshalDelegate(void* p); + JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p) { return p; @@ -498,6 +502,8 @@ JNIEXPORT void* JNICALL ikvm_MarshalDelegate(void* p) typedef jint (JNICALL *PJNI_ONLOAD)(JavaVM* vm, void* reserved); +jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved); + JNIEXPORT jint JNICALL ikvm_CallOnLoad(PJNI_ONLOAD method, JavaVM* vm, void* reserved) { return method(vm, reserved); diff --git a/ikvm-native/os.c b/ikvm-native/os.c index 9f2115f712..43531ae0ea 100644 --- a/ikvm-native/os.c +++ b/ikvm-native/os.c @@ -61,16 +61,22 @@ #include #include "jni.h" + void* JNICALL ikvm_LoadLibrary(char* psz); + JNIEXPORT void* JNICALL ikvm_LoadLibrary(char* psz) { return g_module_open(psz, 0); } + void JNICALL ikvm_FreeLibrary(GModule* handle); + JNIEXPORT void JNICALL ikvm_FreeLibrary(GModule* handle) { g_module_close(handle); } + void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc); + JNIEXPORT void* JNICALL ikvm_GetProcAddress(GModule* handle, char* name, jint argc) { void *symbol; @@ -83,16 +89,22 @@ return NULL; } + void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size); + JNIEXPORT void* JNICALL ikvm_mmap(int fd, jboolean writeable, jboolean copy_on_write, jlong position, jint size) { return mmap(0, size, writeable ? PROT_WRITE | PROT_READ : PROT_READ, copy_on_write ? MAP_PRIVATE : MAP_SHARED, fd, position); } + int JNICALL ikvm_munmap(void* address, jint size); + JNIEXPORT int JNICALL ikvm_munmap(void* address, jint size) { return munmap(address, size); } + int JNICALL ikvm_msync(void* address, jint size); + JNIEXPORT int JNICALL ikvm_msync(void* address, jint size) { #if defined(__native_client__) && defined(USE_NEWLIB) diff --git a/libgc/Makefile.am b/libgc/Makefile.am index 49dbe4be81..a53aafcbf3 100644 --- a/libgc/Makefile.am +++ b/libgc/Makefile.am @@ -68,7 +68,7 @@ libmonogc_static_la_LDFLAGS = -static EXTRA_DIST += alpha_mach_dep.S mips_sgi_mach_dep.s sparc_mach_dep.S -AM_CFLAGS = @GC_CFLAGS@ +AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@ if CPLUSPLUS extra_checks = test_cpp diff --git a/libgc/Makefile.in b/libgc/Makefile.in index 0830dc26fa..6aa745d241 100644 --- a/libgc/Makefile.in +++ b/libgc/Makefile.in @@ -382,6 +382,7 @@ STRIP = @STRIP@ THREADDLLIBS = @THREADDLLIBS@ UNWINDLIBS = @UNWINDLIBS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -490,7 +491,7 @@ EXTRA_libmonogc_la_SOURCES = alpha_mach_dep.S \ libmonogc_static_la_SOURCES = $(libmonogc_la_SOURCES) libmonogc_static_la_LIBADD = $(libmonogc_la_LIBADD) libmonogc_static_la_LDFLAGS = -static -AM_CFLAGS = @GC_CFLAGS@ +AM_CFLAGS = $(WERROR_CFLAGS) @GC_CFLAGS@ @CPLUSPLUS_FALSE@extra_checks = @CPLUSPLUS_TRUE@extra_checks = test_cpp diff --git a/libgc/acinclude.m4 b/libgc/acinclude.m4 index 526d00c1be..5216cd14a5 100644 --- a/libgc/acinclude.m4 +++ b/libgc/acinclude.m4 @@ -22,8 +22,8 @@ if test x$GCC != xyes; then dolt_supported=no fi case $host in -i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ -|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*) +i?86-*-linux*|i?86-apple-darwin*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \ +|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*|aarch64*) pic_options='-fPIC' ;; ?86-pc-cygwin*|i?86-pc-cygwin*) diff --git a/libgc/configure.REMOVED.git-id b/libgc/configure.REMOVED.git-id index 50384deaaf..eec630ea9d 100644 --- a/libgc/configure.REMOVED.git-id +++ b/libgc/configure.REMOVED.git-id @@ -1 +1 @@ -52fde0f680f5be6f8d59ff02d5040350384ada1b \ No newline at end of file +ec75f52b4a09d98c0cc1707b0a0f796e4c7a91c0 \ No newline at end of file diff --git a/libgc/configure.ac b/libgc/configure.ac index 837e2cb9f1..7dc04985a9 100644 --- a/libgc/configure.ac +++ b/libgc/configure.ac @@ -531,6 +531,12 @@ fi AC_ARG_ENABLE(quiet-build, [ --enable-quiet-build Enable quiet libgc build (on by default)], enable_quiet_build=$enableval, enable_quiet_build=yes) AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host") +AC_ARG_ENABLE(werror, [ --enable-werror Pass -Werror to the C compiler], werror_flag=$enableval, werror_flag=no) +if test x$werror_flag = xyes; then + WERROR_CFLAGS="-Werror" +fi +AC_SUBST([WERROR_CFLAGS]) + if test "${multilib}" = "yes"; then multilib_arg="--enable-multilib" else diff --git a/libgc/doc/Makefile.in b/libgc/doc/Makefile.in index 4a9f711729..41fff87069 100644 --- a/libgc/doc/Makefile.in +++ b/libgc/doc/Makefile.in @@ -236,6 +236,7 @@ STRIP = @STRIP@ THREADDLLIBS = @THREADDLLIBS@ UNWINDLIBS = @UNWINDLIBS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libgc/finalize.c b/libgc/finalize.c index 91f6970180..5626e87213 100644 --- a/libgc/finalize.c +++ b/libgc/finalize.c @@ -366,6 +366,15 @@ GC_process_togglerefs (void) GC_toggleref_array_size = w; } +/* Finalizer proc support */ +static void (*GC_object_finalized_proc) (GC_PTR obj); + +void +GC_set_finalizer_notify_proc (void (*proc) (GC_PTR obj)) +{ + GC_object_finalized_proc = proc; +} + static void push_and_mark_object (GC_PTR p) { @@ -877,6 +886,10 @@ void GC_finalize() fo_set_next(prev_fo, next_fo); } GC_fo_entries--; + + if (GC_object_finalized_proc) + GC_object_finalized_proc (real_ptr); + /* Add to list of objects awaiting finalization. */ fo_set_next(curr_fo, GC_finalize_now); GC_finalize_now = curr_fo; diff --git a/libgc/include/Makefile.in b/libgc/include/Makefile.in index 408a4a5f46..11f1224fec 100644 --- a/libgc/include/Makefile.in +++ b/libgc/include/Makefile.in @@ -252,6 +252,7 @@ STRIP = @STRIP@ THREADDLLIBS = @THREADDLLIBS@ UNWINDLIBS = @UNWINDLIBS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libgc/include/gc.h b/libgc/include/gc.h index a3eb3c2dc0..4693a3d9a5 100644 --- a/libgc/include/gc.h +++ b/libgc/include/gc.h @@ -778,6 +778,10 @@ GC_API int GC_unregister_long_link GC_PROTO((GC_PTR * /* link */)); GC_API void GC_toggleref_register_callback GC_PROTO((int (*proccess_toggleref) (GC_PTR obj))); GC_API void GC_toggleref_add (GC_PTR object, int strong_ref); +/* finalizer callback support */ +GC_API void GC_set_finalizer_notify_proc GC_PROTO((void (*object_finalized) (GC_PTR obj))); + + /* Returns !=0 if GC_invoke_finalizers has something to do. */ GC_API int GC_should_invoke_finalizers GC_PROTO((void)); diff --git a/libgc/include/private/Makefile.in b/libgc/include/private/Makefile.in index adb9de4e74..69fd33dff7 100644 --- a/libgc/include/private/Makefile.in +++ b/libgc/include/private/Makefile.in @@ -192,6 +192,7 @@ STRIP = @STRIP@ THREADDLLIBS = @THREADDLLIBS@ UNWINDLIBS = @UNWINDLIBS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libgc/m4/Makefile.in b/libgc/m4/Makefile.in index efcaed6595..b5fa04722d 100644 --- a/libgc/m4/Makefile.in +++ b/libgc/m4/Makefile.in @@ -192,6 +192,7 @@ STRIP = @STRIP@ THREADDLLIBS = @THREADDLLIBS@ UNWINDLIBS = @UNWINDLIBS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ diff --git a/libgc/mark_rts.c b/libgc/mark_rts.c index 4074879a71..b3e996a29c 100644 --- a/libgc/mark_rts.c +++ b/libgc/mark_rts.c @@ -375,8 +375,15 @@ ptr_t GC_approx_sp() /* doing something wrong. */ # ifdef _MSC_VER # pragma warning(disable:4172) +# endif +# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wreturn-local-addr" # endif return((ptr_t)(&dummy)); +# if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 408) +# pragma GCC diagnostic pop +# endif # ifdef _MSC_VER # pragma warning(default:4172) # endif diff --git a/m4/Makefile.in b/m4/Makefile.in index b4e2847bdc..254a429464 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/man/Makefile.in b/man/Makefile.in index e1d1c55810..2d8708bab2 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -193,6 +193,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -201,6 +202,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -267,6 +269,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -316,6 +319,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/man/mprof-report.1 b/man/mprof-report.1 index de40af60d8..4b1b781681 100644 --- a/man/mprof-report.1 +++ b/man/mprof-report.1 @@ -211,6 +211,15 @@ The following commands are available: .IP \[bu] 2 \f[I]heapshot\f[]: perform a heapshot as soon as possible .RE +.IP \[bu] 2 +\f[I]counters\f[]: sample counters values every 1 second. This allow +a really lightweight way to have insight in some of the runtime key +metrics. Counters displayed in non verbose mode are : Methods from AOT, +Methods JITted using mono JIT, Methods JITted using LLVM, Total time +spent JITting (sec), User Time, System Time, Total Time, Working Set, +Private Bytes, Virtual Bytes, Page Faults and CPU Load Average (1min, +5min and 15min). +.RE .SS Analyzing the profile data .PP Currently there is a command line program (\f[I]mprof-report\f[]) @@ -284,6 +293,16 @@ where \f[I]MODE\f[] can be: .IP \[bu] 2 \f[I]bytes\f[]: the total number of bytes used by objects of the given type +.PP +To change the sort order of counters, use the option: +.PP +\f[B]--counters-sort=MODE\f[] +.PP +where \f[I]MODE\f[] can be: +.IP \[bu] 2 +\f[I]time\f[]: sort values by time then category +.IP \[bu] 2 +\f[I]category\f[]: sort values by category then time .SS Selecting what data to report .PP The profiler by default collects data about many runtime subsystems @@ -319,6 +338,8 @@ version \f[I]thread\f[]: thread information .IP \[bu] 2 \f[I]heapshot\f[]: live heap usage at heap shots +.IP \[bu] 2 +\f[I]counters\f[]: counters samples .PP It is possible to limit some of the data displayed to a timeframe of the program execution with the option: diff --git a/mcs/Makefile b/mcs/Makefile index 78af02bc44..a10dfa504c 100644 --- a/mcs/Makefile +++ b/mcs/Makefile @@ -24,7 +24,6 @@ centum_tests := \ class/System.XML \ class/Commons.Xml.Relaxng \ class/Cscompmgd \ - class/Microsoft.JScript \ class/Mono.Posix \ class/Mono.Security \ class/System.Design \ diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 104d5c4d6d..a1884da3d0 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -34,7 +34,7 @@ static class Consts // Use these assembly version constants to make code more maintainable. // - public const string MonoVersion = "3.6.0.0"; + public const string MonoVersion = "3.8.0.0"; public const string MonoCompany = "Mono development team"; public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoCopyright = "(c) Various Mono authors"; diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make index c270cc81cc..12f6c82cff 100644 --- a/mcs/build/profiles/basic.make +++ b/mcs/build/profiles/basic.make @@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp $(MAKE) -s do-profile-check-monolite ; \ else \ echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \ - echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \ + echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \ echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \ exit 1; fi; fi diff --git a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs index 48a4e24b5f..060d929226 100644 --- a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs +++ b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs @@ -40,6 +40,8 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComMemberType))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComSourceInterfacesAttribute))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IStream))] +[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))] //[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))] @@ -76,4 +78,3 @@ [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))] [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))] - diff --git a/mcs/class/Makefile b/mcs/class/Makefile index 1e604f9aae..b3d367cb2e 100644 --- a/mcs/class/Makefile +++ b/mcs/class/Makefile @@ -25,7 +25,7 @@ net_1_1_java_SUBDIRS = \ System.Runtime.Serialization.Formatters.Soap \ System.Runtime.Remoting -common_dirs := \ +net_2_0_dirs := \ corlib \ System \ System.XML \ @@ -78,14 +78,11 @@ common_dirs := \ Mono.Cecil \ Mono.Cecil.Mdb \ Mono.Debugger.Soft \ - SystemWebTestShim - -net_2_0_dirs := \ + SystemWebTestShim \ System.Xml.Linq \ System.Runtime.Serialization \ System.Data.DataSetExtensions \ System.Data.Linq \ - System.Web \ System.Web.Abstractions \ System.Web.Routing \ System.IdentityModel \ @@ -179,7 +176,6 @@ net_4_0_dirs := \ System.Xaml \ WindowsBase \ System.ServiceModel.Activation \ - System.ServiceModel \ System.ServiceModel.Routing \ System.ServiceModel.Discovery \ System.Runtime.Caching \ @@ -241,7 +237,7 @@ xbuild_4_0_dirs := \ $(xbuild_2_0_dirs) \ Microsoft.Build -net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler +net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs) monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs) monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs) @@ -249,13 +245,13 @@ mobile_static_SUBDIRS := $(mobile_dirs) mobile_SUBDIRS := $(mobile_dirs) xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs) net_3_5_SUBDIRS := $(xbuild_2_0_dirs) -net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs) -net_4_5_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler +net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs) +net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler xbuild_12_SUBDIRS := $(xbuild_4_0_dirs) include ../build/rules.make -SUBDIRS = $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs) +SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs) DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs) diff --git a/mcs/class/Managed.Windows.Forms/Makefile b/mcs/class/Managed.Windows.Forms/Makefile index 7a7439b744..37a323899b 100644 --- a/mcs/class/Managed.Windows.Forms/Makefile +++ b/mcs/class/Managed.Windows.Forms/Makefile @@ -93,7 +93,10 @@ TEST_DISTFILES = \ Test/resources/32x32.ico \ Test/System.Resources/compat_1_1.resx \ Test/System.Resources/compat_2_0.resx \ - Test/System.Windows.Forms/bitmaps/a.png + Test/System.Windows.Forms/bitmaps/a.png \ + Test/DummyAssembly/AnotherSerializable.cs \ + Test/DummyAssembly/Convertable.cs \ + Test/DummyAssembly/Properties/AssemblyInfo.cs \ EXTRA_DISTFILES = \ README System.Windows.Forms.dll.resources \ @@ -106,6 +109,11 @@ TEST_MCS_FLAGS = /r:System.Data.dll /r:System.Drawing.dll /r:Accessibility.dll - -resource:Test/resources/32x32.ico,32x32.ico \ -nowarn:618,612 +DummyAssembly.dll: + $(CSCOMPILE) /target:library /out:$@ Test/DummyAssembly/AnotherSerializable.cs Test/DummyAssembly/Convertable.cs Test/DummyAssembly/Properties/AssemblyInfo.cs + +test-local: DummyAssembly.dll + include ../../build/library.make TEST_HARNESS_EXCLUDES = -exclude=Interactive,NotWorking,ValueAdd,CAS,InetAccess diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs index 3e928459ba..a16a996355 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingSource.cs @@ -207,6 +207,7 @@ namespace System.Windows.Forms { private void OnParentCurrencyManagerChanged (object sender, EventArgs args) { // Essentially handles chained data sources (e.g. chained BindingSource) + ResetDataMemberIfInvalid (); ResetList (); } @@ -349,6 +350,7 @@ namespace System.Windows.Forms { DisconnectDataSourceEvents (datasource); datasource = value; + ResetDataMemberIfInvalid (); ConnectDataSourceEvents (datasource); ResetList (); @@ -454,6 +456,19 @@ namespace System.Windows.Forms { } } + void ResetDataMemberIfInvalid () + { + if (datamember == String.Empty) + return; + + // if dataMember doesn't refer to a valid property of dataSource, we need to reset it + var property = ListBindingHelper.GetListItemProperties (datasource).Find (datamember, true); + if (property == null) { + datamember = String.Empty; + OnDataMemberChanged (EventArgs.Empty); + } + } + // NOTE: Probably the parsing can be improved void ProcessSortString (string sort) { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs index 277e71c9c6..e69308f62f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CurrencyManager.cs @@ -390,7 +390,8 @@ namespace System.Windows.Forms { else if (e.NewIndex <= listposition) { /* the deleted row was either the current one, or one earlier in the list. Update the index and emit PositionChanged, CurrentChanged, and ItemChanged. */ - ChangeRecordState (listposition+1, + // FIXME: this looks wrong, shouldn't it be (listposition - 1) instead of e.NewIndex ? + ChangeRecordState (e.NewIndex, false, false, e.NewIndex != listposition, false); } else { @@ -412,7 +413,7 @@ namespace System.Windows.Forms { } else { if (e.NewIndex <= listposition) { - ChangeRecordState (e.NewIndex, + ChangeRecordState (listposition + 1, false, false, false, false); OnItemChanged (new ItemChangedEventArgs (-1)); OnListChanged (e); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs index a930aa9301..5fa129b4c0 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs @@ -150,7 +150,7 @@ namespace System.Windows.Forms { } */ - static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 3, 0 }; + static byte [] header = new byte []{ 77, 83, 70, 116, 73, 76, 1, 1 }; public void GetObjectData (SerializationInfo si, StreamingContext context) { MemoryStream stream = new MemoryStream (); @@ -169,7 +169,7 @@ namespace System.Windows.Forms { writer.Write ((ushort) (images [0].Width)); writer.Write ((ushort) (images [0].Height)); writer.Write (0xFFFFFFFF); //BackColor.ToArgb ()); //FIXME: should set the right one here. - writer.Write ((ushort) 0x1009); + writer.Write ((ushort) 0x21); for (int i = 0; i < 4; i++) writer.Write ((short) -1); diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs.REMOVED.git-id b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs.REMOVED.git-id index a5b0ee4eb6..2e108650fb 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs.REMOVED.git-id +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs.REMOVED.git-id @@ -1 +1 @@ -c1b7d791f8d2974c14d91a11622fb822eee0dafa \ No newline at end of file +f7075e8ef8f7cfbc0c67a85dbedc54b114523b38 \ No newline at end of file diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs index 5ffc23eb61..856137cb17 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NumericUpDown.cs @@ -109,7 +109,7 @@ namespace System.Windows.Forms { hexadecimal = false; increment = 1M; maximum = 100M; - minimum = 0.0M; + minimum = 0M; thousands_separator = false; Text = "0"; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id index d2abee0578..538b273725 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id @@ -1 +1 @@ -e05a093aac549755036f160867f3515bc78def96 \ No newline at end of file +1f3af25846450af900f33b95ed551929392ee807 \ No newline at end of file diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs new file mode 100644 index 0000000000..a6336ce275 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/AnotherSerializable.cs @@ -0,0 +1,88 @@ +// +// AnotherSerializable.cs : Serializable Class used to test types from other +// assemblies for resources tests +// +// Author: +// Gary Barnett (gary.barnett.mono@gmail.com) +// +// Copyright (C) Gary Barnett (2012) +// +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Runtime.Serialization; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; + +namespace DummyAssembly { + [SerializableAttribute] + public class AnotherSerializable : ISerializable { + public string name; + public string value; + + public AnotherSerializable () + { + } + + public AnotherSerializable (string name, string value) + { + this.name = name; + this.value = value; + } + + public AnotherSerializable (SerializationInfo info, StreamingContext ctxt) + { + name = (string) info.GetValue ("sername", typeof (string)); + value = (String) info.GetValue ("servalue", typeof (string)); + } + + public AnotherSerializable (Stream stream) + { + BinaryFormatter bFormatter = new BinaryFormatter (); + AnotherSerializable deser = (AnotherSerializable) bFormatter.Deserialize (stream); + stream.Close (); + + name = deser.name; + value = deser.value; + } + + public void GetObjectData (SerializationInfo info, StreamingContext ctxt) + { + info.AddValue ("sername", name); + info.AddValue ("servalue", value); + } + + public override string ToString () + { + return String.Format ("name={0};value={1}", this.name, this.value); + } + + public override bool Equals (object obj) + { + AnotherSerializable o = obj as AnotherSerializable; + if (o == null) + return false; + return this.name.Equals (o.name) && this.value.Equals (o.value); + } + } +} + diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs new file mode 100644 index 0000000000..7f1ea03138 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Convertable.cs @@ -0,0 +1,119 @@ +// +// Convertable.cs : Class with type converter used to test types from other +// assemblies for resources tests +// +// Author: +// Gary Barnett (gary.barnett.mono@gmail.com) +// +// Copyright (C) Gary Barnett (2012) +// +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.Serialization.Formatters.Binary; +using System.IO; +using System.Runtime.Serialization; +using System.ComponentModel; + +namespace DummyAssembly { + + [SerializableAttribute] + [TypeConverter (typeof (ConvertableConverter))] + public class Convertable { + protected string name; + protected string value; + + public Convertable () + { + } + + public Convertable (string name, string value) + { + this.name = name; + this.value = value; + } + + public void GetObjectData (SerializationInfo info, StreamingContext ctxt) + { + info.AddValue ("sername", name); + info.AddValue ("servalue", value); + } + + public override string ToString () + { + return String.Format ("{0}\t{1}",name, value); + } + + public override bool Equals (object obj) + { + Convertable o = obj as Convertable; + if (o == null) + return false; + return this.name.Equals (o.name) && this.value.Equals (o.value); + } + } + + class ConvertableConverter : TypeConverter { + public ConvertableConverter () + { + } + + public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof (string); + } + + public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType) + { + return destinationType == typeof (string); + } + + public override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) + { + if (value.GetType() != typeof (string)) + throw new Exception ("value not string"); + + string serialised = (string) value; + + string [] parts = serialised.Split ('\t'); + + if (parts.Length != 2) + throw new Exception ("string in incorrect format"); + + Convertable convertable = new Convertable (parts [0], parts [1]); + return convertable; + } + + public override object ConvertTo (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) + { + if (destinationType != typeof (String)) { + return base.ConvertTo (context, culture, value, destinationType); + } + + return ((Convertable) value).ToString (); + } + } + +} + diff --git a/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..73e9fef7f1 --- /dev/null +++ b/mcs/class/Managed.Windows.Forms/Test/DummyAssembly/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle ("DummyAssembly")] +[assembly: AssemblyDescription ("")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("")] +[assembly: AssemblyProduct ("DummyAssembly")] +[assembly: AssemblyCopyright ("")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible (false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid ("c80e062b-a918-4aa5-b62c-7455ca2c56d5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion ("1.0.0.0")] +[assembly: AssemblyFileVersion ("1.0.0.0")] diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs index fb231e2634..4c6ba44c18 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs @@ -144,15 +144,14 @@ namespace MonoTests.System.Resources { [Test] public void WriteRead1 () { - ResXResourceWriter rw = new ResXResourceWriter ("resx.resx"); serializable ser = new serializable ("aaaaa", "bbbbb"); ResXDataNode dn = new ResXDataNode ("test", ser); dn.Comment = "comment"; - rw.AddResource (dn); - rw.Close (); + + string resXFile = GetResXFileWithNode (dn, "resx.resx"); bool found = false; - ResXResourceReader rr = new ResXResourceReader ("resx.resx"); + ResXResourceReader rr = new ResXResourceReader (resXFile); rr.UseResXDataNodes = true; IDictionaryEnumerator en = rr.GetEnumerator (); while (en.MoveNext ()) { @@ -224,7 +223,6 @@ namespace MonoTests.System.Resources { ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode; rr.Close (); - File.Delete ("resx.resx"); Assert.IsNotNull (node,"#A1"); serializable o = node.GetValue ((AssemblyName []) null) as serializable; @@ -245,7 +243,6 @@ namespace MonoTests.System.Resources { ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode; rr.Close (); - File.Delete ("resx.resx"); Assert.IsNotNull (node, "#A1"); object o = node.GetValue ((AssemblyName []) null); diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs index f90a1b98c1..198dcda427 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs @@ -104,6 +104,7 @@ namespace MonoTests.System.Windows.Forms } [Test] + [Category ("NotWorking")] // Doesn't work under Xvfb. public void DataRemainsOnClipboard_Xamarin4959 () { // Compile an app that puts something on the clipboard diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs index e0261dc21b..aef76e0777 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs @@ -172,6 +172,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row.Delete (); + Assert.AreEqual (-1, cm.Position); + // Console.WriteLine (event_log); Assert.AreEqual ( @@ -221,6 +223,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -273,6 +277,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); #if WITH_BINDINGS @@ -323,6 +329,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row.Delete (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -379,6 +387,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding DataRow newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.Add(newrow); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -434,6 +444,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.Add(newrow); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); #if WITH_BINDINGS @@ -489,6 +501,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.InsertAt(newrow, 0); + Assert.AreEqual (2, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -547,6 +561,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding newrow = dataSet1.Tables[0].NewRow (); dataSet1.Tables[0].Rows.InsertAt(newrow, 1); + Assert.AreEqual (2, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -596,6 +612,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding dataSet1.Tables[0].Columns.Add(); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); #if NET_2_0 @@ -635,6 +653,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[1]); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "2"); @@ -672,6 +692,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding dataSet1.Tables[0].Columns.Remove(dataSet1.Tables[0].Columns[0]); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3"); @@ -717,6 +739,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding dataSet1.Tables[0].Columns[0].ColumnName = "new name"; + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: MetaDataChanged\n", event_log, "3"); @@ -775,6 +799,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row[column_name] = "hi"; row.EndEdit (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( @@ -834,6 +860,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding row[column_name] = "hi"; cm.CancelCurrentEdit (); + Assert.AreEqual (0, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ("0: ItemChanged (index = 0)\n", event_log, "2"); @@ -875,6 +903,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding DataRowView row = (DataRowView)cm.Current; row.Delete (); + Assert.AreEqual (-1, cm.Position); + Console.WriteLine (event_log); Assert.AreEqual ( diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs index 9a7e9bcfb4..9712812c29 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs @@ -642,6 +642,7 @@ namespace MonoTests.System.Windows.Forms private static int oipt_t1 = 0; private static int oipt_t2 = 0; [Test] + [NUnit.Framework.Category ("NotWorking")] public void OneIdlePerThread () { Thread t = Thread.CurrentThread; oipt_t1 = t.ManagedThreadId; diff --git a/mcs/class/Managed.Windows.Forms/resources/keyboards.resx.REMOVED.git-id b/mcs/class/Managed.Windows.Forms/resources/keyboards.resx.REMOVED.git-id index ff2386e148..52c6811b04 100644 --- a/mcs/class/Managed.Windows.Forms/resources/keyboards.resx.REMOVED.git-id +++ b/mcs/class/Managed.Windows.Forms/resources/keyboards.resx.REMOVED.git-id @@ -1 +1 @@ -f6f5fadb7df800a00159edd72fc76b254c96b3a9 \ No newline at end of file +4fac9f436ca5607cef5cc90e693448cbee76000e \ No newline at end of file diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs index ec538abc29..b5e2e809ae 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionParser.cs @@ -182,7 +182,7 @@ namespace Microsoft.Build.BuildEngine { e = new ConditionFactorExpression (token); } else if (token.Type == TokenType.Item || token.Type == TokenType.Property || token.Type == TokenType.Metadata) { - e = ParseReferenceExpression (token.Value); + e = ParseReferenceExpression (token.Value [0]); } else if (token.Type == TokenType.Not) { e = ParseNotExpression (); } else @@ -224,21 +224,33 @@ namespace Microsoft.Build.BuildEngine { } //@prefix: @ or $ - ConditionExpression ParseReferenceExpression (string prefix) + ConditionExpression ParseReferenceExpression (char prefix) { - StringBuilder sb = new StringBuilder (); - - string ref_type = prefix [0] == '$' ? "a property" : "an item list"; int token_pos = tokenizer.Token.Position; + string ref_type = prefix == '$' ? "a property" : "an item list"; IsAtToken (TokenType.LeftParen, String.Format ( "Expected {0} at position {1} in condition \"{2}\". Missing opening parantheses after the '{3}'.", ref_type, token_pos, conditionStr, prefix)); - tokenizer.GetNextToken (); + + if (prefix == '$') { + // + // Tjhe scan should consider quoted parenthesis but it breaks on .net as well + // we are bug compatible + // + tokenizer.ScanForClosingParens (); + } else { + tokenizer.GetNextToken (); + } + + if (tokenizer.IsEOF ()) + throw new ExpressionParseException ("Missing closing parenthesis in condition " + conditionStr); + + StringBuilder sb = new StringBuilder (); sb.AppendFormat ("{0}({1}", prefix, tokenizer.Token.Value); tokenizer.GetNextToken (); - if (prefix == "@" && tokenizer.Token.Type == TokenType.Transform) { + if (prefix == '@' && tokenizer.Token.Type == TokenType.Transform) { tokenizer.GetNextToken (); sb.AppendFormat ("->'{0}'", tokenizer.Token.Value); @@ -250,9 +262,7 @@ namespace Microsoft.Build.BuildEngine { } } - IsAtToken (TokenType.RightParen, String.Format ( - "Expected {0} at position {1} in condition \"{2}\". Missing closing parantheses'.", - ref_type, token_pos, conditionStr, prefix)); + IsAtToken (TokenType.RightParen, "Missing closing parenthesis in condition " + conditionStr); tokenizer.GetNextToken (); sb.Append (")"); diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs index 29a4aba628..d9ee74475d 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConditionTokenizer.cs @@ -257,6 +257,29 @@ namespace Microsoft.Build.BuildEngine { } else throw new ExpressionParseException (String.Format ("Invalid token: {0}", ch)); } + + public void ScanForClosingParens (int parensCounter = 1) + { + tokenPosition = position; + int start = position; + int ch; + while ((ch = ReadChar ()) >= 0) { + switch (ch) { + case ')': + if (--parensCounter == 0) { + --position; + token = new Token (inputString.Substring (start, position - start), TokenType.String, tokenPosition); + return; + } + break; + case '(': + ++parensCounter; + break; + } + } + + token = new Token (null, TokenType.EOF, tokenPosition); + } public int TokenPosition { get { return tokenPosition; } diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs index 655224f89a..ccfc0fa3a0 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Expression.cs @@ -55,6 +55,14 @@ namespace Microsoft.Build.BuildEngine { internal class Expression { + enum TokenKind + { + OpenParens, + CloseParens, + Dot, + End + } + ExpressionCollection expressionCollection; static Regex item_regex; @@ -232,6 +240,7 @@ namespace Microsoft.Build.BuildEngine { pos += 2; int start = pos; int end = 0; + bool requires_closing_parens = true; var ch = text [pos]; if ((ch == 'r' || ch == 'R') && text.Substring (pos + 1).StartsWith ("egistry:", StringComparison.OrdinalIgnoreCase)) { @@ -273,6 +282,7 @@ namespace Microsoft.Build.BuildEngine { // Simple property reference $(Foo) // phase.Add (new PropertyReference (name)); + requires_closing_parens = false; } else { end = 0; } @@ -287,6 +297,14 @@ namespace Microsoft.Build.BuildEngine { pos = end; } + + if (requires_closing_parens) { + end = text.IndexOf (')', pos); + if (end < 0) + end = 0; + else + pos = end + 1; + } } end = text.IndexOf ("$(", pos, StringComparison.Ordinal); @@ -493,70 +511,71 @@ namespace Microsoft.Build.BuildEngine { static MemberInvocationReference ParseInvocation (string text, ref int p, Type type, IReference instance) { - var open_parens = text.IndexOf ('(', p); - string name; - int end; - List args; + TokenKind token; + MemberInvocationReference mir = null; - // - // Is it method or property - // - if (open_parens > 0) { - name = text.Substring (p, open_parens - p); + while (true) { + int prev = p; + token = ScanName (text, ref p); + var name = text.Substring (prev, p - prev).TrimEnd (); - // - // It can be instance method on static property - // - if (name.IndexOf ('.') > 0) { - var names = name.Split ('.'); - int i; - for (i = 0; i < names.Length - 1; ++i) { - instance = new MemberInvocationReference (type, names [i]) { - Instance = instance - }; - } + switch (token) { + case TokenKind.Dot: + case TokenKind.OpenParens: + break; + case TokenKind.CloseParens: + return new MemberInvocationReference (type, name) { + Instance = instance + }; - type = null; - name = names [i]; - } - ++open_parens; - args = ParseArguments (text, ref open_parens); - end = text.IndexOf (')', open_parens); - } else { - end = text.IndexOf (')', p); - if (end < 0) - throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p))); + case TokenKind.End: + if (mir == null || name.Length != 0) + throw new InvalidProjectFileException (string.Format ("Invalid static method invocation syntax '{0}'", text.Substring (p))); - name = text.Substring (p, end - p); - - // - // It can be instance member on static property - // - if (name.IndexOf ('.') > 0) { - var names = name.Split ('.'); - int i; - for (i = 0; i < names.Length - 1; ++i) { - instance = new MemberInvocationReference (type, names [i]) { - Instance = instance - }; - } - - type = null; - name = names [i]; + return mir; + default: + throw new NotImplementedException (); } - args = null; + instance = mir = new MemberInvocationReference (type, name) { + Instance = instance + }; + + if (type != null) { + if (!IsMethodAllowed (type, name)) + throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName)); + + type = null; + } + + if (token == TokenKind.OpenParens) { + ++p; + mir.Arguments = ParseArguments (text, ref p); + } + + if (p < text.Length && text [p] == '.') { + ++p; + continue; + } + + return mir; + } + } + + static TokenKind ScanName (string text, ref int p) + { + for (; p < text.Length; ++p) { + switch (text [p]) { + case '(': + return TokenKind.OpenParens; + case '.': + return TokenKind.Dot; + case ')': + return TokenKind.CloseParens; + } } - name = name.TrimEnd (); - if (!IsMethodAllowed (type, name)) - throw new InvalidProjectFileException (string.Format ("The function '{0}' on type '{1}' has not been enabled for execution", name, type.FullName)); - - p = end + 1; - return new MemberInvocationReference (type, name) { - Arguments = args, - Instance = instance - }; + return TokenKind.End; } ArrayList SplitMetadata (string text) diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs index 351aea0208..b4d996faa9 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs @@ -274,7 +274,11 @@ namespace Microsoft.Build.BuildEngine { continue; if (!Directory.Exists (extn_path)) { - project.ParentEngine.LogMessage (MessageImportance.Low, "Extension path '{0}' not found, ignoring.", extn_path); + if (extn_path != DotConfigExtensionsPath) + project.ParentEngine.LogMessage ( + MessageImportance.Low, + "Extension path '{0}' not found, ignoring.", + extn_path); continue; } diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs index ada57788f2..6430992fba 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/MemberInvocationReference.cs @@ -63,10 +63,16 @@ namespace Microsoft.Build.BuildEngine { var flags = BindingFlags.IgnoreCase | BindingFlags.Public; object target; + string member_name = name; if (Instance == null) { target = null; - flags |= BindingFlags.Static; + if (string.Equals (member_name, "new", StringComparison.OrdinalIgnoreCase)) { + member_name = ConstructorInfo.ConstructorName; + flags |= BindingFlags.CreateInstance | BindingFlags.Instance; + } else { + flags |= BindingFlags.Static; + } } else { var mir = Instance as MemberInvocationReference; if (mir != null) { @@ -91,14 +97,14 @@ namespace Microsoft.Build.BuildEngine } else { flags |= BindingFlags.InvokeMethod; ExpandArguments (project, options); - args = PrepareMethodArguments (flags); + args = PrepareMethodArguments (member_name, flags); if (args == null) throw new InvalidProjectFileException (string.Format ("Method '{0}({1})' arguments cannot be evaluated'", name, string.Join (", ", Arguments.ToArray ()))); } object value; try { - value = type.InvokeMember (name, flags, null, target, args, CultureInfo.InvariantCulture); + value = type.InvokeMember (member_name, flags, null, target, args, CultureInfo.InvariantCulture); } catch (MissingFieldException) { // // It can be field/constant instead of a property @@ -106,7 +112,7 @@ namespace Microsoft.Build.BuildEngine if (args == null && Instance == null) { flags &= ~BindingFlags.GetProperty; flags |= BindingFlags.GetField; - value = type.InvokeMember (name, flags, null, null, null, CultureInfo.InvariantCulture); + value = type.InvokeMember (member_name, flags, null, null, null, CultureInfo.InvariantCulture); } else { throw; } @@ -132,9 +138,9 @@ namespace Microsoft.Build.BuildEngine } } - object[] PrepareMethodArguments (BindingFlags flags) + object[] PrepareMethodArguments (string name, BindingFlags flags) { - var candidates = type.GetMember (name, MemberTypes.Method, flags); + var candidates = type.GetMember (name, MemberTypes.Method | MemberTypes.Constructor, flags); object[] args = null; ParameterInfo[] best = null; foreach (MethodBase candidate in candidates) { diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs index 51c3da6cfb..c3c8dacabc 100644 --- a/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs +++ b/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs @@ -357,6 +357,24 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various { Assert.IsNull (proj.EvaluatedProperties ["A"], "A1"); } + [Test] + public void TestCondition_References () + { + Engine engine = new Engine (Consts.BinPath); + Project proj = engine.CreateNewProject (); + + string documentString = @" + + + valid + + + "; + + proj.LoadXml (documentString); + + Assert.AreEqual ("valid", proj.GetEvaluatedProperty ("A"), "#1"); + } [Test] public void TestHasTrailingSlash1 () diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs index b45bc39228..795a712306 100644 --- a/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs +++ b/mcs/class/Microsoft.Build.Engine/Test/various/Properties.cs @@ -175,6 +175,22 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various { Assert.AreEqual (DateTime.Now.Year.ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1"); } + [Test] + public void InstanceMembersOnStaticMethod () + { + string documentString = @" + + + $([System.String]::Concat('a', 'bb', 'c').Length.GetHashCode ()) + + + + "; + + proj.LoadXml (documentString); + Assert.AreEqual (4.GetHashCode ().ToString (), proj.GetEvaluatedProperty ("Prop1"), "#1"); + } + [Test] public void MSBuildPropertyFunctions () { @@ -190,6 +206,23 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various { proj.LoadXml (documentString); Assert.AreEqual ("6.6", proj.GetEvaluatedProperty ("Prop1"), "#1"); - } + } + + [Test] + public void Constructor () + { + string documentString = @" + + + 0.6 + 6 + $([System.String]::new('value').EndsWith ('ue')) + + + "; + + proj.LoadXml (documentString); + Assert.AreEqual ("True", proj.GetEvaluatedProperty ("Prop1"), "#1"); + } } } diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs index c50ddf774c..1a8fac12b7 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs @@ -328,8 +328,13 @@ namespace Microsoft.Build.Utilities } } } - - protected void AppendTextUnquoted (string textToAppend) + +#if NET_4_0 + public +#else + protected +#endif + void AppendTextUnquoted (string textToAppend) { commandLine.Append (textToAppend); } diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs index 7717a1f9ee..f3aa310c09 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolLocationHelper.cs @@ -190,9 +190,9 @@ namespace Microsoft.Build.Utilities string targetFrameworkProfile) { var path = Path.Combine (xbuildFxDir, targetFrameworkIdentifier); - if (targetFrameworkVersion != null) { + if (!string.IsNullOrEmpty (targetFrameworkVersion)) { path = Path.Combine (path, targetFrameworkVersion); - if (targetFrameworkProfile != null) + if (!string.IsNullOrEmpty (targetFrameworkProfile)) path = Path.Combine (path, "Profile", targetFrameworkProfile); } if (!Directory.Exists (path)) @@ -200,7 +200,6 @@ namespace Microsoft.Build.Utilities var flist = Path.Combine (path, "RedistList", "FrameworkList.xml"); if (!File.Exists (flist)) return null; - var xml = XmlReader.Create (flist); xml.MoveToContent (); var targetFxDir = xml.GetAttribute ("TargetFrameworkDirectory"); diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources index b1a3758e98..4e2248a2d4 100644 --- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources +++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities_test.dll.sources @@ -2,4 +2,5 @@ Microsoft.Build.Utilities/CommandLineBuilderTest.cs Microsoft.Build.Utilities/LoggerTest.cs Microsoft.Build.Utilities/TaskItemTest.cs Microsoft.Build.Utilities/TaskLoggingHelperTest.cs +Microsoft.Build.Utilities/ToolLocationHelperTest.cs Microsoft.Build.Utilities/ToolTaskTest.cs diff --git a/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs new file mode 100644 index 0000000000..fbb567d282 --- /dev/null +++ b/mcs/class/Microsoft.Build.Utilities/Test/Microsoft.Build.Utilities/ToolLocationHelperTest.cs @@ -0,0 +1,21 @@ +#if NET_4_0 +using System; +using NUnit.Framework; +using Microsoft.Build.Utilities; + +namespace MonoTests.Microsoft.Build.Utilities +{ + [TestFixture] + public class ToolLocationHelperTest + { + [Test] + [Category ("NotWorking")] // this test needs extra xbuild testing settings, as the target framework path is different. + public void GetPathToStandardLibraries () + { + Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", null)), "std path"); + Assert.IsTrue (!string.IsNullOrEmpty (ToolLocationHelper.GetPathToStandardLibraries (".NETFramework", "v4.0", string.Empty)), "empty Profile path"); + } + } +} + +#endif diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs index d7d5d77249..c9bcf5cdda 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectRootElement.cs @@ -533,6 +533,8 @@ namespace Microsoft.Build.Construction var item = CreateItemGroupElement (); AppendChild (item); return item; + case "ImportGroup": + return AddImportGroup (); case "Import": return AddImport (null); case "Target": diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs index 4c77665733..4170fa0025 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs @@ -494,6 +494,11 @@ namespace Microsoft.Build.Evaluation }); yield return create ("MSBuildToolsPath", () => toolset.ToolsPath); yield return create ("MSBuildToolsVersion", () => toolset.ToolsVersion); + + // This is an implementation specific special property for this Microsoft.Build.dll to differentiate + // the build from Microsoft.Build.Engine.dll. It is significantly used in some *.targets file we share + // between old and new build engine. + yield return create ("MonoUseMicrosoftBuildDll", () => "True"); } // These are required for reserved property, represents dynamically changing property values. diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs index cb6badde21..00d9802134 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/ProjectInstance.cs @@ -164,7 +164,7 @@ namespace Microsoft.Build.Execution // FIXME: this is kind of workaround for unavoidable issue that PLATFORM=* is actually given // on some platforms and that prevents setting default "PLATFORM=AnyCPU" property. if (!string.Equals ("PLATFORM", (string) p.Key, StringComparison.OrdinalIgnoreCase)) - this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, false, (string) p.Value); + this.properties [(string) p.Key] = new ProjectPropertyInstance ((string) p.Key, true, (string) p.Value); foreach (var p in global_properties) this.properties [p.Key] = new ProjectPropertyInstance (p.Key, false, p.Value); var tools = projects.GetToolset (tools_version) ?? projects.GetToolset (projects.DefaultToolsVersion); @@ -256,7 +256,7 @@ namespace Microsoft.Build.Execution void EvaluateItems (ProjectRootElement xml, IEnumerable elements) { - foreach (var child in elements) { + foreach (var child in elements.Reverse ()) { var ige = child as ProjectItemGroupElement; if (ige != null) { foreach (var p in ige.Items) { @@ -435,6 +435,7 @@ namespace Microsoft.Build.Execution var parameters = new BuildParameters (projects) { ForwardingLoggers = remoteLoggers, Loggers = loggers, + DefaultToolsVersion = projects.DefaultToolsVersion, }; var requestData = new BuildRequestData (this, targets ?? DefaultTargets.ToArray ()); var result = manager.Build (parameters, requestData); diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs index 4540fa0f31..4dc8b32c94 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs @@ -37,6 +37,7 @@ using Microsoft.Build.Exceptions; using System.Globalization; using Microsoft.Build.Construction; using Microsoft.Build.Internal.Expressions; +using System.Xml; namespace Microsoft.Build.Internal { @@ -121,17 +122,23 @@ namespace Microsoft.Build.Internal try { - var initialPropertiesFormatted = "Initial Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); - LogMessageEvent (new BuildMessageEventArgs (initialPropertiesFormatted, null, null, MessageImportance.Low)); + var initialGlobalPropertiesFormatted = "Initial Global Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); + LogMessageEvent (new BuildMessageEventArgs (initialGlobalPropertiesFormatted, null, null, MessageImportance.Low)); + var initialProjectPropertiesFormatted = "Initial Project Properties:\n" + string.Join (Environment.NewLine, project.Properties.OrderBy (p => p.Name).Where (p => !p.IsImmutable).Select (p => string.Format ("{0} = {1}", p.Name, p.EvaluatedValue)).ToArray ()); + LogMessageEvent (new BuildMessageEventArgs (initialProjectPropertiesFormatted, null, null, MessageImportance.Low)); var initialItemsFormatted = "Initial Items:\n" + string.Join (Environment.NewLine, project.Items.OrderBy (i => i.ItemType).Select (i => string.Format ("{0} : {1}", i.ItemType, i.EvaluatedInclude)).ToArray ()); LogMessageEvent (new BuildMessageEventArgs (initialItemsFormatted, null, null, MessageImportance.Low)); // null targets -> success. empty targets -> success(!) + foreach (var targetName in (request.ProjectInstance.InitialTargets).Where (t => t != null)) + BuildTargetByName (targetName, args); if (request.TargetNames == null) - args.Result.OverallResult = BuildResultCode.Success; + args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success; else { - foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null)) - BuildTargetByName (targetName, args); + foreach (var targetName in (args.TargetNames ?? request.TargetNames).Where (t => t != null)) { + if (!BuildTargetByName (targetName, args)) + break; + } // FIXME: check .NET behavior, whether cancellation always results in failure. args.Result.OverallResult = args.CheckCancel () ? BuildResultCode.Failure : args.Result.ResultsByTarget.Any (p => p.Value.ResultCode == TargetResultCode.Failure) ? BuildResultCode.Failure : BuildResultCode.Success; @@ -253,6 +260,7 @@ namespace Microsoft.Build.Internal var value = args.Project.ExpandString (p.Value); project.SetProperty (p.Name, value); } + continue; } var ii = child as ProjectItemGroupTaskInstance; @@ -264,6 +272,7 @@ namespace Microsoft.Build.Internal continue; project.AddItem (item.ItemType, project.ExpandString (item.Include)); } + continue; } var task = child as ProjectTaskInstance; @@ -275,7 +284,14 @@ namespace Microsoft.Build.Internal } if (!RunBuildTask (target, task, targetResult, args)) return false; + continue; } + + var onError = child as ProjectOnErrorInstance; + if (onError != null) + continue; // evaluated under catch clause. + + throw new NotSupportedException (string.Format ("Unexpected Target element children \"{0}\"", child.GetType ())); } } catch (Exception ex) { // fallback task specified by OnError element @@ -452,7 +468,7 @@ namespace Microsoft.Build.Internal } public void SetMetadataValueLiteral (string metadataName, string metadataValue) { - metadata [metadataName] = ProjectCollection.Unescape (metadataValue); + metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (ProjectCollection.Unescape (metadataValue)); } public IDictionary CloneCustomMetadataEscaped () { @@ -490,7 +506,7 @@ namespace Microsoft.Build.Internal } public void SetMetadata (string metadataName, string metadataValue) { - metadata [metadataName] = metadataValue; + metadata [metadataName] = WindowsCompatibilityExtensions.NormalizeFilePath (metadataValue); } public string ItemSpec { get; set; } public int MetadataCount { @@ -574,13 +590,16 @@ namespace Microsoft.Build.Internal // To NOT reuse this IBuildEngine instance for different build, we create another BuildManager and BuildSubmisson and then run it. public bool BuildProjectFile (string projectFileName, string[] targetNames, IDictionary globalProperties, IDictionary targetOutputs, string toolsVersion) { + toolsVersion = string.IsNullOrEmpty (toolsVersion) ? project.ToolsVersion : toolsVersion; var globalPropertiesThatMakeSense = new Dictionary (); foreach (DictionaryEntry p in globalProperties) globalPropertiesThatMakeSense [(string) p.Key] = (string) p.Value; - var result = new BuildManager ().Build (this.submission.BuildManager.OngoingBuildParameters.Clone (), new BuildRequestData (projectFileName, globalPropertiesThatMakeSense, toolsVersion, targetNames, null)); - foreach (var p in result.ResultsByTarget) - targetOutputs [p.Key] = p.Value.Items; - return result.OverallResult == BuildResultCode.Success; + var projectToBuild = new ProjectInstance (ProjectRootElement.Create (XmlReader.Create (projectFileName)), globalPropertiesThatMakeSense, toolsVersion, Projects); + IDictionary outs; + var ret = projectToBuild.Build (targetNames ?? new string [] {"Build"}, Projects.Loggers, out outs); + foreach (var p in outs) + targetOutputs [p.Key] = p.Value.Items ?? new ITaskItem [0]; + return ret; } public bool BuildProjectFilesInParallel (string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IDictionary[] targetOutputsPerProject, string[] toolsVersion, bool useResultsCache, bool unloadProjectsOnCompletion) diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs index 587db74962..6cd0b1670e 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionConstructs.cs @@ -212,6 +212,16 @@ namespace Microsoft.Build.Internal.Expressions get { return string.Format ("%([{0}].[{1}])", ItemType, Metadata); } } } + + partial class QuotedExpression : Expression + { + public char QuoteChar { get; set; } + public ExpressionList Contents { get; set; } + + public override string ExpressionString { + get { return QuoteChar + string.Concat (Contents.Select (e => e.ExpressionString)).Replace (QuoteChar.ToString (), "\\" + QuoteChar) + QuoteChar; } + } + } partial class StringLiteral : Expression { diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs index 696447c884..7fbd1cf554 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionEvaluator.cs @@ -346,12 +346,12 @@ namespace Microsoft.Build.Internal.Expressions var args = Access.Arguments.Select (e => e.EvaluateAsObject (context)).ToArray (); var method = FindMethod (type, Access.Name.Name, args); if (method == null) - throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location)); + throw new InvalidProjectFileException (Location, string.Format ("access to undefined static method '{0}' of '{1}' at {2}", Access.Name.Name, type, Location)); return method.Invoke (null, AdjustArgsForCall (method, args)); } else { var prop = type.GetProperty (Access.Name.Name); if (prop == null) - throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, Access.Target.EvaluateAsString (context), Location)); + throw new InvalidProjectFileException (Location, string.Format ("access to undefined static property '{0}' of '{1}' at {2}", Access.Name.Name, type, Location)); return prop.GetValue (null, null); } } @@ -491,6 +491,30 @@ namespace Microsoft.Build.Internal.Expressions return EvaluateAsString (context); } } + + partial class QuotedExpression : Expression + { + public override string EvaluateAsString (EvaluationContext context) + { + return QuoteChar + EvaluateAsStringWithoutQuote (context) + QuoteChar; + } + + public string EvaluateAsStringWithoutQuote (EvaluationContext context) + { + return string.Concat (Contents.Select (e => e.EvaluateAsString (context))); + } + + public override bool EvaluateAsBoolean (EvaluationContext context) + { + var ret = EvaluateAsStringWithoutQuote (context); + return EvaluateStringAsBoolean (context, ret); + } + + public override object EvaluateAsObject (EvaluationContext context) + { + return EvaluateAsStringWithoutQuote (context); + } + } partial class FunctionCallExpression : Expression { diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs index a8c7dc4d61..73bac64445 100644 --- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs +++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/ExpressionParserManual.cs @@ -60,14 +60,13 @@ namespace Microsoft.Build.Internal.Expressions while (start < end) { int bak = start; ret.Add (ParseSingle (ref start, end)); - SkipSpaces (ref start); if (bak == start) throw new Exception ("Parser failed to progress token position: " + source); } return ret; } - static readonly char [] token_starters = "$@%(),".ToCharArray (); + static readonly char [] token_starters = "$@%(),'\"".ToCharArray (); Expression ParseSingle (ref int start, int end) { @@ -101,7 +100,23 @@ namespace Microsoft.Build.Internal.Expressions ret = EvaluateItemExpression (start, last); start = last + 1; return ret; - + + case '\'': + case '"': + var quoteChar = source [start]; + start++; + last = FindMatchingCloseQuote (quoteChar, start, end); + if (last < 0) { + if (validation_type == ExpressionValidationType.StrictBoolean) + throw new InvalidProjectFileException (string.Format ("expression did not have matching ')' since index {0} in \"{1}\"", start, source)); + else { + start--; + goto default; // treat as raw literal to the section end + } + } + ret = new QuotedExpression () { QuoteChar = quoteChar, Contents = Parse (start, last) }; + start = last + 1; + return ret; // Below (until default) are important only for Condition evaluation case '(': if (validation_type == ExpressionValidationType.LaxString) @@ -134,7 +149,7 @@ namespace Microsoft.Build.Internal.Expressions return ret; } } - + int FindMatchingCloseParen (int start, int end) { int n = 0; @@ -148,7 +163,21 @@ namespace Microsoft.Build.Internal.Expressions } return -1; // invalid } - + + int FindMatchingCloseQuote (char quote, int start, int end) + { + int n = 0; + for (int i = start; i < end; i++) { + if (i < end + 1 && source [i] == '\\' && (source [i + 1] == quote || source [i + 1] == '\\')) + n += 2; + else if (source [i] == quote) { + if (n-- == 0) + return i; + } + } + return -1; // invalid + } + static readonly string spaces = " \t\r\n"; void SkipSpaces (ref int start) @@ -166,6 +195,7 @@ namespace Microsoft.Build.Internal.Expressions // property access without member specification int parenAt = source.IndexOf ('(', start, end - start); string name = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start); + name = name.Trim (); var access = new PropertyAccess () { Name = new NameToken () { Name = name }, TargetType = PropertyTargetType.Object @@ -181,6 +211,7 @@ namespace Microsoft.Build.Internal.Expressions int mstart = dotAt + 1; int parenAt = source.IndexOf ('(', mstart, end - mstart); string name = parenAt < 0 ? source.Substring (mstart, end - mstart) : source.Substring (mstart, parenAt - mstart); + name = name.Trim (); var access = new PropertyAccess () { Name = new NameToken () { Name = name }, TargetType = PropertyTargetType.Object, @@ -196,10 +227,11 @@ namespace Microsoft.Build.Internal.Expressions string type = source.Substring (start, colonsAt - start); if (type.Length < 2 || type [0] != '[' || type [type.Length - 1] != ']') throw new InvalidProjectFileException (string.Format ("Static function call misses appropriate type name surrounded by '[' and ']' at {0} in \"{1}\"", start, source)); - type = type.Substring (1, type.Length - 2); + type = type.Substring (1, type.Length - 2).Trim (); start = colonsAt + 2; int parenAt = source.IndexOf ('(', start, end - start); string member = parenAt < 0 ? source.Substring (start, end - start) : source.Substring (start, parenAt - start); + member = member.Trim (); if (member.Length == 0) throw new InvalidProjectFileException ("Static member name is missing"); var access = new PropertyAccess () { @@ -228,6 +260,7 @@ namespace Microsoft.Build.Internal.Expressions if (source [start] != ',') throw new InvalidProjectFileException (string.Format ("invalid function call arguments specification. ',' is expected, got '{0}'", source [start])); start++; + SkipSpaces (ref start); } args.Add (ParseSingle (ref start, end)); } while (true); diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs index 700a41663d..2430ecce09 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs @@ -40,6 +40,10 @@ namespace MonoTests.Microsoft.Build.Evaluation public class ProjectCollectionTest { [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void GlobalProperties () { var g = ProjectCollection.GlobalProjectCollection; diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs index ed81f8155d..f5f880a0b5 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs @@ -173,6 +173,10 @@ namespace MonoTests.Microsoft.Build.Evaluation } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void BuildCSharpTargetBuild () { string project_xml = @" @@ -254,6 +258,10 @@ namespace MonoTests.Microsoft.Build.Evaluation } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void CreateProjectInstance () { string project_xml = @" @@ -270,6 +278,10 @@ namespace MonoTests.Microsoft.Build.Evaluation } [Test] +#if NET_4_0 + // BXC #20961 + [Category ("NotWorking")] +#endif public void LoadCaseInsensitive () { string project_xml = @" diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs index 44157a8444..30524ffd27 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs @@ -291,6 +291,56 @@ namespace MonoTests.Microsoft.Build.Execution Assert.IsNotNull (p, "#1"); Assert.AreEqual ("False", p.EvaluatedValue, "#2"); } + + [Test] + public void ConditionalExpression () + { + string project_xml = @" + + true + $(ResolveAssemblyReferencesDependsOn);_AddCorlibReference + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj"; + var proj = new ProjectInstance (root); + var p = proj.GetProperty ("ResolveAssemblyReferencesDependsOn"); + Assert.IsNotNull (p, "#1"); + Assert.AreEqual (";_AddCorlibReference", p.EvaluatedValue, "#2"); + } + + [Test] + [Category ("NotWorking")] // until we figure out why it fails on wrench. + public void ItemsInTargets () + { + string project_xml = @" + + + <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll + + + <_ExplicitReference + Include='$(_ExplicitMSCorlibPath)' + Condition='Exists($(_ExplicitMSCorlibPath))'> + false + + + + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + root.FullPath = "ProjectInstanceTest.ConditionalExpression.proj"; + var proj = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection); + proj.Build (); + // make sure the property value expansion is done successfully. + Assert.IsTrue (!string.IsNullOrEmpty (proj.GetPropertyValue ("_ExplicitMSCorlibPath")), "premise: propertyValue by ToolLocationHelper func call"); + var items = proj.GetItems ("_ExplicitReference"); + // make sure items are stored after build. + Assert.IsTrue (items.Any (), "items.Any"); + Assert.IsTrue (!string.IsNullOrEmpty (items.First ().EvaluatedInclude), "item.EvaluatedInclude"); + } } namespace SubNamespace diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs index ebd662e249..16694f7622 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Internal/ExpressionParserTest.cs @@ -335,6 +335,22 @@ namespace MonoTests.Microsoft.Build.Internal var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)}); Assert.IsTrue (result, "#1: " + sw); } + + [Test] + public void FunctionCall () + { + string project_xml = @" + + + +"; + var xml = XmlReader.Create (new StringReader (project_xml)); + var root = ProjectRootElement.Create (xml); + var p = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection); + var sw = new StringWriter (); + var result = p.Build (new ILogger [] { new ConsoleLogger (LoggerVerbosity.Minimal, sw.WriteLine, null, null)}); + Assert.IsTrue (result, "#1: " + sw); + } } } diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs index 1eff46c1ec..57cb86cd8b 100644 --- a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs +++ b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs @@ -161,10 +161,10 @@ namespace Cairo { } } - [Obsolete ("Use SetSourceRGBA method")] + [Obsolete ("Use SetSourceColor method")] public Color Color { set { - NativeMethods.cairo_set_source_rgba (handle, value.R, value.G, value.B, value.A); + SetSourceColor (value); } } @@ -280,6 +280,12 @@ namespace Cairo { } } + public bool HasCurrentPoint { + get { + return NativeMethods.cairo_has_current_point (handle); + } + } + [Obsolete ("Use GetTarget/SetTarget")] public Cairo.Surface Target { set { @@ -331,6 +337,11 @@ namespace Cairo { get { return NativeMethods.cairo_get_reference_count (handle); } } + public void SetSourceColor (Color color) + { + NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A); + } + public void SetSourceRGB (double r, double g, double b) { NativeMethods.cairo_set_source_rgb (handle, r, g, b); @@ -548,6 +559,11 @@ namespace Cairo { NativeMethods.cairo_reset_clip (handle); } + public bool InClip (double x, double y) + { + return NativeMethods.cairo_in_clip (handle, x, y); + } + public bool InStroke (double x, double y) { return NativeMethods.cairo_in_stroke (handle, x, y); diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs index c53f0009c0..8509c6db25 100644 --- a/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs +++ b/mcs/class/Mono.Cairo/Mono.Cairo/NativeMethods.cs @@ -258,6 +258,10 @@ namespace Cairo [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern void cairo_glyph_path (IntPtr cr, IntPtr glyphs, int num_glyphs); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] + [return: MarshalAs (UnmanagedType.U1)] + internal static extern bool cairo_has_current_point (IntPtr cr); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern void cairo_identity_matrix (IntPtr cr); @@ -292,6 +296,10 @@ namespace Cairo [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] internal static extern int cairo_image_surface_get_width (IntPtr surface); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] + [return: MarshalAs (UnmanagedType.U1)] + internal static extern bool cairo_in_clip (IntPtr cr, double x, double y); + [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] [return: MarshalAs (UnmanagedType.U1)] internal static extern bool cairo_in_fill (IntPtr cr, double x, double y); diff --git a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs index 567d6bc1bf..d2ef1f6316 100644 --- a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs +++ b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/SQLite3.cs @@ -652,11 +652,37 @@ namespace Mono.Data.Sqlite return UnsafeNativeMethods.sqlite3_aggregate_count(context); } +#if MONOTOUCH + class FunctionData { + public SQLiteCallback Func; + public SQLiteCallback FuncStep; + public SQLiteFinalCallback FuncFinal; + } +#endif + internal override void CreateFunction(string strFunction, int nArgs, bool needCollSeq, SQLiteCallback func, SQLiteCallback funcstep, SQLiteFinalCallback funcfinal) { int n; -#if !SQLITE_STANDARD +#if MONOTOUCH + var data = new FunctionData(); + data.Func = func; + data.FuncStep = funcstep; + data.FuncFinal = funcfinal; + SQLiteCallback func_callback = func == null ? null : new SQLiteCallback(scalar_callback); + SQLiteCallback funcstep_callback = funcstep == null ? null : new SQLiteCallback(step_callback); + SQLiteFinalCallback funcfinal_callback = funcfinal == null ? null : new SQLiteFinalCallback(final_callback); + + IntPtr user_data; + user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data)); + n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 4, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback); + + if (n == 0) { + // sqlite3_create_function_v2 will call 'destroy_callback' if it fails, so we need to recreate the gchandle here. + user_data = GCHandle.ToIntPtr(GCHandle.Alloc(data)); + n = UnsafeNativeMethods.sqlite3_create_function_v2(_sql, ToUTF8(strFunction), nArgs, 1, user_data, func_callback, funcstep_callback, funcfinal_callback, destroy_callback); + } +#elif !SQLITE_STANDARD n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 4, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0); if (n == 0) n = UnsafeNativeMethods.sqlite3_create_function_interop(_sql, ToUTF8(strFunction), nArgs, 1, IntPtr.Zero, func, funcstep, funcfinal, (needCollSeq == true) ? 1 : 0); #else @@ -673,6 +699,38 @@ namespace Mono.Data.Sqlite if (n > 0) throw new SqliteException(n, SQLiteLastError()); } +#if MONOTOUCH + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))] + internal static void scalar_callback(IntPtr context, int nArgs, IntPtr argsptr) + { + var handle = GCHandle.FromIntPtr (UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.Func(context, nArgs, argsptr); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteCallback))] + internal static void step_callback(IntPtr context, int nArgs, IntPtr argsptr) + { + var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.FuncStep(context, nArgs, argsptr); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))] + internal static void final_callback(IntPtr context) + { + var handle = GCHandle.FromIntPtr(UnsafeNativeMethods.sqlite3_user_data(context)); + var func = (FunctionData)handle.Target; + func.FuncFinal(context); + } + + [MonoTouch.MonoPInvokeCallback(typeof(SQLiteFinalCallback))] + internal static void destroy_callback(IntPtr context) + { + GCHandle.FromIntPtr(context).Free(); + } +#endif + internal override int ContextCollateCompare(CollationEncodingEnum enc, IntPtr context, string s1, string s2) { #if !SQLITE_STANDARD diff --git a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs index 7e5c153906..bde7bdeb3d 100644 --- a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs +++ b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite_2.0/UnsafeNativeMethods.cs @@ -141,6 +141,13 @@ namespace Mono.Data.Sqlite #endif internal static extern int sqlite3_create_function(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal); +#if !PLATFORM_COMPACTFRAMEWORK + [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] +#else + [DllImport(SQLITE_DLL)] +#endif + internal static extern int sqlite3_create_function_v2(IntPtr db, byte[] strName, int nArgs, int nType, IntPtr pvUser, SQLiteCallback func, SQLiteCallback fstep, SQLiteFinalCallback ffinal, SQLiteFinalCallback fdestroy); + #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else @@ -692,7 +699,14 @@ namespace Mono.Data.Sqlite [DllImport(SQLITE_DLL)] #endif internal static extern int sqlite3_config (SQLiteConfig config); - + +#if !PLATFORM_COMPACTFRAMEWORK + [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] +#else + [DllImport(SQLITE_DLL)] +#endif + internal static extern IntPtr sqlite3_user_data (IntPtr context); + #if !PLATFORM_COMPACTFRAMEWORK [DllImport(SQLITE_DLL, CallingConvention = CallingConvention.Cdecl)] #else diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs index 55038e926f..294a591a81 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteFunctionTests.cs @@ -43,5 +43,27 @@ namespace MonoTests.Mono.Data.Sqlite return string.Compare (param1, param2); } } + + [SqliteFunction(Name = "TestScalar", FuncType = FunctionType.Scalar)] + public class TestScalar : SqliteFunction + { + public override object Invoke (object[] args) + { + return null; + } + } + + [SqliteFunction(Name = "TestAggregate", FuncType = FunctionType.Aggregate)] + public class TestAggregate : SqliteFunction + { + public override void Step(object[] args, int stepNumber, ref object contextData) + { + } + + public override object Final (object contextData) + { + return null; + } + } } } diff --git a/mcs/class/Mono.Debugger.Soft/Makefile b/mcs/class/Mono.Debugger.Soft/Makefile index 57e2b054b1..1c4dd2792a 100644 --- a/mcs/class/Mono.Debugger.Soft/Makefile +++ b/mcs/class/Mono.Debugger.Soft/Makefile @@ -8,6 +8,11 @@ LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:Mono.Cecil.dll /r:System.Core.dll TEST_MCS_FLAGS = /r:Mono.Cecil.dll /r:System.dll /r:System.Core.dll +VALID_TEST_PROFILE := $(filter net_4_5, $(PROFILE)) + +# The test exe is not profile specific, and compiling a 2.0 will make the 4.5 tests fail +ifdef VALID_TEST_PROFILE + test-local: dtest-app.exe dtest-excfilter.exe dtest-app.exe: Test/dtest-app.cs @@ -16,6 +21,13 @@ dtest-app.exe: Test/dtest-app.cs dtest-excfilter.exe: Test/dtest-excfilter.il MONO_PATH=$(topdir)/class/lib/$(PROFILE) $(INTERNAL_ILASM) -out:$@ /exe /debug Test/dtest-excfilter.il +else + +NO_TEST=1 +check: + +endif + CLEAN_FILES = dtest-app.exe dtest-app.exe.mdb dtest-excfilter.exe dtest-excfilter.exe.mdb EXTRA_DISTFILES = \ diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 6d196aabba..14bf701f46 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -157,7 +157,9 @@ namespace Mono.Debugger.Soft enum InvokeFlags { NONE = 0x0, DISABLE_BREAKPOINTS = 0x1, - SINGLE_THREADED = 0x2 + SINGLE_THREADED = 0x2, + OUT_THIS = 0x4, + OUT_ARGS = 0x8, } enum ElementType { @@ -404,8 +406,7 @@ namespace Mono.Debugger.Soft static readonly bool EnableConnectionLogging = !String.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONO_SDB_LOG")); static int ConnectionId; - readonly StreamWriter LoggingStream = EnableConnectionLogging ? - new StreamWriter (string.Format ("/tmp/sdb_conn_log_{0}", ConnectionId++), false) : null; + readonly StreamWriter LoggingStream; /* * Th version of the wire-protocol implemented by the library. The library @@ -415,7 +416,7 @@ namespace Mono.Debugger.Soft * with newer runtimes, and vice versa. */ internal const int MAJOR_VERSION = 2; - internal const int MINOR_VERSION = 34; + internal const int MINOR_VERSION = 35; enum WPSuspendPolicy { NONE = 0, @@ -1068,6 +1069,19 @@ namespace Mono.Debugger.Soft reply_cbs = new Dictionary (); reply_cb_counts = new Dictionary (); reply_packets_monitor = new Object (); + if (EnableConnectionLogging) { + var path = Environment.GetEnvironmentVariable ("MONO_SDB_LOG"); + if (path.Contains ("{0}")) { + //C:\SomeDir\sdbLog{0}.txt -> C:\SomeDir\sdbLog1.txt + LoggingStream = new StreamWriter (string.Format (path, ConnectionId++), false); + } else if (Path.HasExtension (path)) { + //C:\SomeDir\sdbLog.txt -> C:\SomeDir\sdbLog1.txt + LoggingStream = new StreamWriter (Path.GetDirectoryName (path) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension (path) + ConnectionId++ + "." + Path.GetExtension (path), false); + } else { + //C:\SomeDir\sdbLog -> C:\SomeDir\sdbLog1 + LoggingStream = new StreamWriter (path + ConnectionId++, false); + } + } } protected abstract int TransportReceive (byte[] buf, int buf_offset, int len); @@ -1432,18 +1446,18 @@ namespace Mono.Debugger.Soft // public void StartBuffering () { buffer_packets = true; - if (Version.AtLeast (3, 34)) + if (Version.AtLeast (2, 34)) VM_StartBuffering (); } public void StopBuffering () { - if (Version.AtLeast (3, 34)) + if (Version.AtLeast (2, 34)) VM_StopBuffering (); buffer_packets = false; WritePackets (buffered_packets); if (EnableConnectionLogging) { - LoggingStream.WriteLine (String.Format ("Sent {1} packets.", buffered_packets.Count)); + LoggingStream.WriteLine (String.Format ("Sent {0} packets.", buffered_packets.Count)); LoggingStream.Flush (); } buffered_packets.Clear (); @@ -1655,24 +1669,39 @@ namespace Mono.Debugger.Soft } } - internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state); + internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state); + + void read_invoke_res (PacketReader r, out ValueImpl v, out ValueImpl exc, out ValueImpl out_this, out ValueImpl[] out_args) { + int resflags = r.ReadByte (); + v = null; + exc = null; + out_this = null; + out_args = null; + if (resflags == 0) { + exc = r.ReadValue (); + } else { + v = r.ReadValue (); + if ((resflags & 2) != 0) + out_this = r.ReadValue (); + if ((resflags & 4) != 0) { + int nargs = r.ReadInt (); + out_args = new ValueImpl [nargs]; + for (int i = 0; i < nargs; ++i) + out_args [i] = r.ReadValue (); + } + } + } internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) { return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) { - ValueImpl v, exc; + ValueImpl v, exc, out_this = null; + ValueImpl[] out_args = null; if (r.ErrorCode != 0) { - callback (null, null, (ErrorCode)r.ErrorCode, state); + callback (null, null, null, null, (ErrorCode)r.ErrorCode, state); } else { - if (r.ReadByte () == 0) { - exc = r.ReadValue (); - v = null; - } else { - v = r.ReadValue (); - exc = null; - } - - callback (v, exc, 0, state); + read_invoke_res (r, out v, out exc, out out_this, out out_args); + callback (v, exc, out_this, out_args, 0, state); } }, 1); } @@ -1690,20 +1719,14 @@ namespace Mono.Debugger.Soft w.WriteValues (arguments [i]); } return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) { - ValueImpl v, exc; + ValueImpl v, exc, out_this = null; + ValueImpl[] out_args = null; if (r.ErrorCode != 0) { - callback (null, null, (ErrorCode)r.ErrorCode, state); + callback (null, null, null, null, (ErrorCode)r.ErrorCode, state); } else { - if (r.ReadByte () == 0) { - exc = r.ReadValue (); - v = null; - } else { - v = r.ReadValue (); - exc = null; - } - - callback (v, exc, 0, state); + read_invoke_res (r, out v, out exc, out out_this, out out_args); + callback (v, exc, out_this, out_args, 0, state); } }, methods.Length); } @@ -1983,21 +2006,20 @@ namespace Mono.Debugger.Soft return SendReceive (CommandSet.THREAD, (int)CmdThread.GET_NAME, new PacketWriter ().WriteId (id)).ReadString (); } - internal FrameInfo[] Thread_GetFrameInfo (long id, int start_frame, int length) { - var res = SendReceive (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length)); - int count = res.ReadInt (); - - var frames = new FrameInfo [count]; - for (int i = 0; i < count; ++i) { - var f = new FrameInfo (); - f.id = res.ReadInt (); - f.method = res.ReadId (); - f.il_offset = res.ReadInt (); - f.flags = (StackFrameFlags)res.ReadByte (); - frames [i] = f; - } - - return frames; + internal void Thread_GetFrameInfo (long id, int start_frame, int length, Action resultCallaback) { + Send (CommandSet.THREAD, (int)CmdThread.GET_FRAME_INFO, new PacketWriter ().WriteId (id).WriteInt (start_frame).WriteInt (length), (res) => { + int count = res.ReadInt (); + var frames = new FrameInfo[count]; + for (int i = 0; i < count; ++i) { + var f = new FrameInfo (); + f.id = res.ReadInt (); + f.method = res.ReadId (); + f.il_offset = res.ReadInt (); + f.flags = (StackFrameFlags)res.ReadByte (); + frames [i] = f; + } + resultCallaback (frames); + }, 1); } internal int Thread_GetState (long id) { diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs index e0175f36bd..b4d6073819 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ILInterpreter.cs @@ -23,67 +23,347 @@ namespace Mono.Debugger.Soft // IL_0008: br IL_000d // IL_000d: ldloc.0 // IL_000e: ret + // ... or returns a simple constant: + // IL_0000: ldc.i4 1024 + // IL_0005: conv.i8 + // IL_0006: ret if (args != null && args.Length != 0) - throw new NotSupportedException (); + throw new NotSupportedException (); + if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror)) throw new NotSupportedException (); var instructions = body.Instructions; - if (instructions.Count > 16) + if (instructions.Count < 1 || instructions.Count > 16) throw new NotSupportedException (); - Value[] stack = new Value [16]; - Value locals_0 = null; - Value res = null; - - int sp = 0; - int ins_count = 0; + var stack = new Value [16]; var ins = instructions [0]; + Value locals_0 = null; + int ins_count = 0; + int sp = 0; + while (ins != null) { if (ins_count > 16) throw new NotImplementedException (); - ins_count ++; + var next = ins.Next; + ins_count++; var op = ins.OpCode; if (op == OpCodes.Nop) { } else if (op == OpCodes.Ldarg_0) { - if (sp > 0) + if (sp != 0) throw new NotSupportedException (); + stack [sp++] = this_val; } else if (op == OpCodes.Ldfld) { if (sp != 1) throw new NotSupportedException (); - var obj = (ObjectMirror)stack [--sp]; - var field = (FieldInfoMirror)ins.Operand; + + var obj = (ObjectMirror) stack [--sp]; + var field = (FieldInfoMirror) ins.Operand; try { stack [sp++] = obj.GetValue (field); } catch (ArgumentException) { throw new NotSupportedException (); } + } else if (op == OpCodes.Ldc_I4_0) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 0); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_1) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 1); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_2) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 2); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_3) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 3); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 4); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_5) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 5); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_6) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 6); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_7) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 7); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, 8); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_M1) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, -1); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I4_S) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_I8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_R4) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Ldc_R8) { + if (sp != 0) + throw new NotSupportedException (); + + try { + stack [sp++] = new PrimitiveValue (method.VirtualMachine, ins.Operand); + } catch (ArgumentException) { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I1) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U1) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I2) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U2) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_I8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_U8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_R4) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value)); + } catch { + throw new NotSupportedException (); + } + } else if (op == OpCodes.Conv_R8) { + if (sp != 1) + throw new NotSupportedException (); + + try { + var primitive = (PrimitiveValue) stack [--sp]; + stack [sp++] = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value)); + } catch { + throw new NotSupportedException (); + } } else if (op == OpCodes.Stloc_0) { if (sp != 1) throw new NotSupportedException (); + locals_0 = stack [--sp]; } else if (op == OpCodes.Br) { - next = (ILInstruction)ins.Operand; + next = (ILInstruction) ins.Operand; } else if (op == OpCodes.Ldloc_0) { if (sp != 0) throw new NotSupportedException (); + stack [sp++] = locals_0; } else if (op == OpCodes.Ret) { - if (sp == 0) - res = null; - else - res = stack [--sp]; - break; + if (sp > 0) { + var res = stack [--sp]; + + var primitive = res as PrimitiveValue; + if (method.ReturnType.IsPrimitive && primitive != null) { + // cast the primitive value to the return type + try { + switch (method.ReturnType.CSharpName) { + case "double": res = new PrimitiveValue (method.VirtualMachine, Convert.ToDouble (primitive.Value)); break; + case "float": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSingle (primitive.Value)); break; + case "ulong": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt64 (primitive.Value)); break; + case "long": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt64 (primitive.Value)); break; + case "uint": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt32 (primitive.Value)); break; + case "int": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt32 (primitive.Value)); break; + case "ushort": res = new PrimitiveValue (method.VirtualMachine, Convert.ToUInt16 (primitive.Value)); break; + case "short": res = new PrimitiveValue (method.VirtualMachine, Convert.ToInt16 (primitive.Value)); break; + case "sbyte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToSByte (primitive.Value)); break; + case "byte": res = new PrimitiveValue (method.VirtualMachine, Convert.ToByte (primitive.Value)); break; + case "char": res = new PrimitiveValue (method.VirtualMachine, Convert.ToChar (primitive.Value)); break; + case "bool": res = new PrimitiveValue (method.VirtualMachine, Convert.ToBoolean (primitive.Value)); break; + } + } catch { + throw new NotSupportedException (); + } + } + + return res; + } + + return null; } else { throw new NotSupportedException (); } + ins = next; } - return res; + return null; } } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs index bc06479508..5ca987ec69 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs @@ -13,6 +13,15 @@ namespace Mono.Debugger.Soft /* * Only resume the target thread during the invoke */ - SingleThreaded = 2 + SingleThreaded = 2, + /* + * Return the changed receiver when invoking + * a valuetype method. + */ + ReturnOutThis = 4, + /* + * Return the values of out arguments + */ + ReturnOutArgs = 8 } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs index f3eedccaf5..d83e3a1a48 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs @@ -8,6 +8,22 @@ using System.Threading.Tasks; namespace Mono.Debugger.Soft { + public class InvokeResult { + public Value Result { get; set; } + // + // The value of the receiver after the call for calls to valuetype methods or null. + // Only set when using the InvokeOptions.ReturnOutThis flag. + // Since protocol version 2.35 + // + public Value OutThis { get; set; } + // + // The value of the arguments after the call + // Only set when using the InvokeOptions.ReturnOutArgs flag. + // Since protocol version 2.35 + // + public Value[] OutArgs { get; set; } + } + public class ObjectMirror : Value { TypeMirror type; AppDomainMirror domain; @@ -149,6 +165,10 @@ namespace Mono.Debugger.Soft return EndInvokeMethodInternal (asyncResult); } + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } + #if NET_4_5 public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { var tcs = new TaskCompletionSource (); @@ -164,6 +184,21 @@ namespace Mono.Debugger.Soft }, null); return tcs.Task; } + + public Task InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (EndInvokeMethodInternalWithResult (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; + } #endif // @@ -223,6 +258,14 @@ namespace Mono.Debugger.Soft get; set; } + public ValueImpl OutThis { + get; set; + } + + public ValueImpl[] OutArgs { + get; set; + } + public ValueImpl Exception { get; set; } @@ -260,16 +303,20 @@ namespace Mono.Debugger.Soft f |= InvokeFlags.DISABLE_BREAKPOINTS; if ((options & InvokeOptions.SingleThreaded) != 0) f |= InvokeFlags.SINGLE_THREADED; + if ((options & InvokeOptions.ReturnOutThis) != 0) + f |= InvokeFlags.OUT_THIS; + if ((options & InvokeOptions.ReturnOutArgs) != 0) + f |= InvokeFlags.OUT_ARGS; InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback }; - + thread.InvalidateFrames (); r.ID = vm.conn.VM_BeginInvokeMethod (thread.Id, method.Id, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), vm.EncodeValues (arguments), f, InvokeCB, r); return r; } // This is called when the result of an invoke is received - static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) { + static void InvokeCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) { InvokeAsyncResult r = (InvokeAsyncResult)state; if (error != 0) { @@ -279,6 +326,9 @@ namespace Mono.Debugger.Soft r.Exception = exc; } + r.OutThis = out_this; + r.OutArgs = out_args; + r.IsCompleted = true; ((ManualResetEvent)r.AsyncWaitHandle).Set (); @@ -286,7 +336,7 @@ namespace Mono.Debugger.Soft r.Callback.BeginInvoke (r, null, null); } - internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) { + internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) { if (asyncResult == null) throw new ArgumentNullException ("asyncResult"); @@ -301,18 +351,30 @@ namespace Mono.Debugger.Soft } catch (CommandException ex) { if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT) throw new ArgumentException ("Incorrect number or types of arguments", "arguments"); - else - throw; + + throw; } throw new NotImplementedException (); } else { if (r.Exception != null) throw new InvocationException ((ObjectMirror)r.VM.DecodeValue (r.Exception)); - else - return r.VM.DecodeValue (r.Value); + + Value out_this = null; + if (r.OutThis != null) + out_this = r.VM.DecodeValue (r.OutThis); + Value[] out_args = null; + if (r.OutArgs != null) + out_args = r.VM.DecodeValues (r.OutArgs); + + return new InvokeResult () { Result = r.VM.DecodeValue (r.Value), OutThis = out_this, OutArgs = out_args }; } } + internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) { + InvokeResult res = EndInvokeMethodInternalWithResult (asyncResult); + return res.Result; + } + internal static void EndInvokeMultipleInternal (IAsyncResult asyncResult) { if (asyncResult == null) throw new ArgumentNullException ("asyncResult"); @@ -370,13 +432,14 @@ namespace Mono.Debugger.Soft var args = new List (); for (int i = 0; i < methods.Length; ++i) args.Add (vm.EncodeValues (arguments [i])); + thread.InvalidateFrames (); r.ID = vm.conn.VM_BeginInvokeMethods (thread.Id, mids, this_obj != null ? vm.EncodeValue (this_obj) : vm.EncodeValue (vm.CreateValue (null)), args, f, InvokeMultipleCB, r); return r; } // This is called when the result of an invoke is received - static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) { + static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) { var r = (InvokeAsyncResult)state; Interlocked.Decrement (ref r.NumPending); diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs index 696f6493f4..2ba50c84d4 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs @@ -22,8 +22,11 @@ namespace Mono.Debugger.Soft public override bool Equals (object obj) { if (value == obj) return true; - if (obj != null && obj is PrimitiveValue) - return value == (obj as PrimitiveValue).Value; + + var primitive = obj as PrimitiveValue; + if (primitive != null) + return value == primitive.Value; + return base.Equals (obj); } @@ -52,5 +55,9 @@ namespace Mono.Debugger.Soft public Value EndInvokeMethod (IAsyncResult asyncResult) { return ObjectMirror.EndInvokeMethodInternal (asyncResult); } + + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } } } \ No newline at end of file diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs index b6e43eb4e2..1aa1a4ef5e 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs @@ -1,5 +1,8 @@ using System; using System.Collections.Generic; +#if NET_4_5 +using System.Threading.Tasks; +#endif namespace Mono.Debugger.Soft { @@ -83,7 +86,53 @@ namespace Mono.Debugger.Soft } public Value EndInvokeMethod (IAsyncResult asyncResult) { - return ObjectMirror.EndInvokeMethodInternal (asyncResult); + var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + var outThis = result.OutThis as StructMirror; + if (outThis != null) { + SetFields (outThis.Fields); + } + return result.Result; } + + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + var outThis = result.OutThis as StructMirror; + if (outThis != null) { + SetFields (outThis.Fields); + } + return result; + } + +#if NET_4_5 + public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (EndInvokeMethod (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; + } + + public Task InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { + var tcs = new TaskCompletionSource (); + BeginInvokeMethod (thread, method, arguments, options, iar => + { + try { + tcs.SetResult (ObjectMirror.EndInvokeMethodInternalWithResult (iar)); + } catch (OperationCanceledException) { + tcs.TrySetCanceled (); + } catch (Exception ex) { + tcs.TrySetException (ex); + } + }, null); + return tcs.Task; + } +#endif } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs index 38c733ccaf..541118d66d 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ThreadMirror.cs @@ -7,7 +7,12 @@ namespace Mono.Debugger.Soft public class ThreadMirror : ObjectMirror { string name; + bool cacheInvalid = true; + bool fetching; + object fetchingLocker = new object (); + ManualResetEvent fetchingEvent = new ManualResetEvent (false); ThreadInfo info; + StackFrame[] frames; internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) { } @@ -15,22 +20,58 @@ namespace Mono.Debugger.Soft internal ThreadMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) { } - // FIXME: Cache, invalidate when the thread/runtime is resumed public StackFrame[] GetFrames () { - FrameInfo[] frame_info = vm.conn.Thread_GetFrameInfo (id, 0, -1); + FetchFrames (true); + fetchingEvent.WaitOne (); + return frames; + } - var frames = new List (); + internal void InvalidateFrames () { + cacheInvalid = true; + } - for (int i = 0; i < frame_info.Length; ++i) { - FrameInfo info = (FrameInfo)frame_info [i]; - MethodMirror method = vm.GetMethod (info.method); - var f = new StackFrame (vm, info.id, this, method, info.il_offset, info.flags); - if (!(f.IsNativeTransition && !NativeTransitions)) - frames.Add (f); + internal void FetchFrames (bool mustFetch = false) { + lock (fetchingLocker) { + if (fetching || !cacheInvalid) + return; + cacheInvalid = false; + fetching = true; + fetchingEvent.Reset (); } + vm.conn.Thread_GetFrameInfo (id, 0, -1, (frame_info) => { + var framesList = new List (); + for (int i = 0; i < frame_info.Length; ++i) { + var frameInfo = (FrameInfo)frame_info [i]; + var method = vm.GetMethod (frameInfo.method); + var f = new StackFrame (vm, frameInfo.id, this, method, frameInfo.il_offset, frameInfo.flags); + if (!(f.IsNativeTransition && !NativeTransitions)) + framesList.Add (f); + } + lock (fetchingLocker) { + vm.AddThreadToInvalidateList (this); + fetching = false; + //In case it was invalidated during waiting for response from + //runtime and mustFetch was set refetch + if (cacheInvalid && mustFetch) { + FetchFrames (mustFetch); + return; + } + frames = framesList.ToArray (); + fetchingEvent.Set (); + } + }); + } - return frames.ToArray (); - } + public static void FetchFrames(IList threads) + { + if (threads.Count == 0) + return; + threads [0].vm.conn.StartBuffering (); + foreach (var thread in threads) { + thread.FetchFrames (); + } + threads [0].vm.conn.StopBuffering (); + } public string Name { get { @@ -38,7 +79,7 @@ namespace Mono.Debugger.Soft name = vm.conn.Thread_GetName (id); return name; } - } + } public new long Id { get { @@ -111,8 +152,8 @@ namespace Mono.Debugger.Soft } catch (CommandException ex) { if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT) throw new ArgumentException ("loc doesn't refer to a location in the current method of this thread.", "loc"); - else - throw; + + throw; } } } diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs index 437689163e..3970f2a576 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs @@ -806,6 +806,10 @@ namespace Mono.Debugger.Soft return ObjectMirror.EndInvokeMethodInternal (asyncResult); } + public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) { + return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult); + } + #if NET_4_5 public Task InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList arguments, InvokeOptions options = InvokeOptions.None) { var tcs = new TaskCompletionSource (); diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs index 61ee11c183..ee5806d472 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs @@ -121,12 +121,13 @@ namespace Mono.Debugger.Soft public void Resume () { try { + InvalidateThreadAndFrameCaches (); conn.VM_Resume (); } catch (CommandException ex) { if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED) throw new VMNotSuspendedException (); - else - throw; + + throw; } } @@ -151,12 +152,44 @@ namespace Mono.Debugger.Soft conn.ForceDisconnect (); } + HashSet threadsToInvalidate = new HashSet (); + ThreadMirror[] threadCache; + object threadCacheLocker = new object (); + + void InvalidateThreadAndFrameCaches () { + lock (threadsToInvalidate) { + foreach (var thread in threadsToInvalidate) + thread.InvalidateFrames (); + threadsToInvalidate.Clear (); + } + lock (threadCacheLocker) { + threadCache = null; + } + } + + internal void InvalidateThreadCache () { + lock (threadCacheLocker) { + threadCache = null; + } + } + + internal void AddThreadToInvalidateList (ThreadMirror threadMirror) + { + lock (threadsToInvalidate) { + threadsToInvalidate.Add (threadMirror); + } + } + public IList GetThreads () { - long[] ids = vm.conn.VM_GetThreads (); - ThreadMirror[] res = new ThreadMirror [ids.Length]; - for (int i = 0; i < ids.Length; ++i) - res [i] = GetThread (ids [i]); - return res; + lock (threadCacheLocker) { + if (threadCache == null) { + long[] ids = vm.conn.VM_GetThreads (); + threadCache = new ThreadMirror [ids.Length]; + for (int i = 0; i < ids.Length; ++i) + threadCache [i] = GetThread (ids [i]); + } + return threadCache; + } } // Same as the mirrorOf methods in JDI @@ -675,9 +708,11 @@ namespace Mono.Debugger.Soft vm.notify_vm_event (EventType.VMDeath, suspend_policy, req_id, thread_id, null, ei.ExitCode); break; case EventType.ThreadStart: + vm.InvalidateThreadCache (); l.Add (new ThreadStartEvent (vm, req_id, id)); break; case EventType.ThreadDeath: + vm.InvalidateThreadCache (); l.Add (new ThreadDeathEvent (vm, req_id, id)); break; case EventType.AssemblyLoad: @@ -718,8 +753,6 @@ namespace Mono.Debugger.Soft case EventType.UserLog: l.Add (new UserLogEvent (vm, req_id, thread_id, ei.Level, ei.Category, ei.Message)); break; - default: - break; } } diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index a057455538..3c9b2877c2 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -81,6 +81,7 @@ public struct AStruct { public string s; public byte k; public IntPtr j; + public int l; [MethodImplAttribute (MethodImplOptions.NoInlining)] public int foo (int val) { @@ -106,6 +107,11 @@ public struct AStruct { public IntPtr invoke_return_intptr () { return j; } + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public void invoke_mutate () { + l = 5; + } } public class GClass { @@ -953,6 +959,11 @@ public class Tests : TestsBase, ITest2 return 42; } + public void invoke_out (out int foo, out int[] arr) { + foo = 5; + arr = new int [10]; + } + [MethodImplAttribute (MethodImplOptions.NoInlining)] public static void exceptions () { try { diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs index 9d6e5c4127..9a671202a8 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs @@ -2110,6 +2110,21 @@ public class DebuggerTests Assert.AreEqual ("Exception", ex.Exception.Type.Name); } +#if NET_4_5 + // out argument + m = t.GetMethod ("invoke_out"); + var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }, InvokeOptions.ReturnOutArgs); + var out_args = out_task.Result.OutArgs; + AssertValue (5, out_args [0]); + Assert.IsTrue (out_args [1] is ArrayMirror); + Assert.AreEqual (10, (out_args [1] as ArrayMirror).Length); + + // without ReturnOutArgs flag + out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }); + out_args = out_task.Result.OutArgs; + Assert.IsNull (out_args); +#endif + // newobj m = t.GetMethod (".ctor"); v = t.InvokeMethod (e.Thread, m, null); @@ -2212,6 +2227,24 @@ public class DebuggerTests m = t.GetMethod ("invoke_return_int"); v = s.InvokeMethod (e.Thread, m, null); AssertValue (42, v); + +#if NET_4_5 + // Invoke a method which changes state + s = frame.GetArgument (1) as StructMirror; + t = s.Type; + m = t.GetMethod ("invoke_mutate"); + var task = s.InvokeMethodAsyncWithResult (e.Thread, m, null, InvokeOptions.ReturnOutThis); + var out_this = task.Result.OutThis as StructMirror; + AssertValue (5, out_this ["l"]); + + // Without the ReturnOutThis flag + s = frame.GetArgument (1) as StructMirror; + t = s.Type; + m = t.GetMethod ("invoke_mutate"); + task = s.InvokeMethodAsyncWithResult (e.Thread, m, null); + out_this = task.Result.OutThis as StructMirror; + Assert.AreEqual (null, out_this); +#endif } [Test] diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml deleted file mode 100644 index 7ea9123207..0000000000 --- a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/IMonoTaskScheduler.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Mono.Parallel - 4.0.0.0 - - - - The normal way to use another scheduler with ParalleFx is by creating a new type subclassing . However Mono's ParallelFx has a few specifities which aren't captured by the base API. Developpers can thus also implement this interface with their custom scheduler for better Mono integration. - The changes added by implementing this interface are totally non-breaking and the assembly will still work perfectly with .NET ParallelFx provided you implement correctly correctly. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - - - The task to wait on. - This method will be called when a thread decides to wait on a task completion. Developpers are free to simply wait on the supplied Task or provide a smarter cooperative waiting mechanism. - A simple waiting mechanism can be achieved via the following pattern: - - -public void PartiticipateUntil (Task task) -{ - ManualResetEventSlim evt = new ManualResetEventSlim (false); - task.ContinueWith (_ => evt.Set (), TaskContinuationOptions.ExecuteSynchronously); - evt.Wait (); -} - - - - - - - Method - - 4.0.0.0 - - - System.Boolean - - - - - - - - Task to wait on. - Additional preemptive conditions for stopping the waiting. - An countdown specifying the maximum amount of time the method can last before returning. - This method will be called when a thread decides to wait on a task completion or a set of condition summarized via the given . Developpers are free to simply wait on the supplied Task/event or provide a smarter cooperative waiting mechanism. - - if the method returns because of either event was set or timeout was reached, if the task completed. - To be added. - - - - diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml deleted file mode 100644 index f11a56cd2e..0000000000 --- a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/MonoTaskExtensions.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Mono.Parallel - 4.0.0.0 - - - System.Object - - - - Provide public wrappers around internal methods used in Mono implementation of type. - These extensions are targeted at developers coding custom schedulers so that they can tap into the specificities of the Mono implementation. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - - - - Task to run. - Action that will be called with the Task that is being scheduled while above Task is executed as a parameter. - Execute a body and track any other Task scheduling during it which is then passed to the supplied action for specific scheduling. - - - - If the inner Task that is scheduled has been created with TaskCreationOptions.PreferFairness, the supplied action won't be called and instead the Task will be scheduled normally on the current - - -The following example retrieve a task from a local deque, execute it and add any eventual child Task created/scheduled to its local deque using PushBottom (safe since we are on the same thread the whole time). - - - Task task; - IConcurrentDeque<Task> deque = new CyclicDeque<Task> (); - - if (deque.PopBottom (out task) == PopResult.Succeed)) - task.Execute (deque.PushBottom); - - - - - diff --git a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml b/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml deleted file mode 100644 index 0063297c1f..0000000000 --- a/mcs/class/Mono.Parallel/Documentation/en/Mono.Threading.Tasks/ThreadWorker.xml +++ /dev/null @@ -1,351 +0,0 @@ - - - - - Mono.Parallel - 4.0.0.0 - - - System.Object - - - - System.IDisposable - - - - This class wraps a to provide a suitable ParallelFx worker (i.e. something that process ). - To be added. - - - - - - Constructor - - 4.0.0.0 - - - - - - - - - - - This is an array containing all other workers created. It's necessary if you want worker cooperating together for getting extra work. - The position in the previous array where this worker will be placed. - This is the global data structures that holds the Task when the system starts and is not yet bootstraped. It's also where tasks end up if they are executed with fairness enabled. - The personnal instance of a deque type used by the worker when storing the tasks its responsible of and letting other workers retrieve them. - The priority of the underlying thread. - This is a handle shared (ideally) by all workers to synchronize and deep sleep when there is no more work to do. Setting the handle will wake them up. - Build a new worker instance. - To be added. - - - - - - Property - - 4.0.0.0 - - - Mono.Threading.Tasks.ThreadWorker - - - This [ThreadStatic] field is automatically updated when WorkerMethod method run so that you can check if you are making a re-entrant call on the same thread. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - - - Task being scheduled - This method is called when the currently executing Task tries to schedule another Task as part of its computation. This method allows to redirect the scheduling to a specific place. - By default the supplied task is added to the ThreadWorker deque via the PushBottom operation. - - - - - - Property - - 4.0.0.0 - - - Mono.Threading.Tasks.IConcurrentDeque<System.Threading.Tasks.Task> - - - Allow access to the used by the ThreadWorker. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Boolean - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Boolean - - - - - - To be added. - To be added. - To be added. - To be added. - - - - - - Property - - 4.0.0.0 - - - System.Boolean - - - Tells if the underlying thread has exited or not. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Int32 - - - - To be added. - To be added. - To be added. - - - - - - Property - - 4.0.0.0 - - - System.Int32 - - - Return the Id of the underlying thread used by the ThreadWorker. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - Property - - 4.0.0.0 - - - Mono.Threading.Tasks.ThreadWorker[] - - - Returns the array of existing ThreadWorker that been initially supplied. - To be added. - If you are iterating the array, make sure you skip the current instance of ThreadWorker with value of - - - - - - Property - - 4.0.0.0 - - - System.Threading.ThreadPriority - - - The priority the underlying thread is running with. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - Stop the underlying thread of this ThreadWorker. - To be added. - - - - - - Property - - 4.0.0.0 - - - System.Threading.ManualResetEvent - - - Acces the WaitHandle normally shared by all your ThreadWorker instances to deep sleep or otherwise synchronize on. - To be added. - To be added. - - - - - - Method - - 4.0.0.0 - - - System.Boolean - - - - This is the method executed by WorkerMethod to do the actual processing of tasks. - - if the method processed a while it ran, otherwise. - By default this method applies the following algorithm: -Check if the global data structures contains task and fetch as much as possible into its own dequeExecute whatever its deque containsDo a couple of pass over the other workers to try to steal some work to do - - - - - - Method - - 4.0.0.0 - - - System.Void - - - - This is the method executed by the underlying thread. - By default this method consists of a while loop calling repeatedly and sleeping accordingly when there is no more work to do. - - - - - - Property - - 4.0.0.0 - - - System.Int32 - - - Position of the current instance in the array. - To be added. - To be added. - - - - diff --git a/mcs/class/Mono.Parallel/Documentation/en/index.xml b/mcs/class/Mono.Parallel/Documentation/en/index.xml index ab8e4e2994..6739a80561 100644 --- a/mcs/class/Mono.Parallel/Documentation/en/index.xml +++ b/mcs/class/Mono.Parallel/Documentation/en/index.xml @@ -29,36 +29,8 @@ - - - Mono.Parallel - - - - - - - - - ExtensionMethod - - System.Void - - - - - - - Task to run. - Action that will be called with the Task that is being scheduled while above Task is executed as a parameter. - Execute a body and track any other Task scheduling during it which is then passed to the supplied action for specific scheduling. - - - - - diff --git a/mcs/class/Mono.Parallel/Mono.Parallel.dll.sources b/mcs/class/Mono.Parallel/Mono.Parallel.dll.sources index 31f320c2ce..57ec8a4604 100644 --- a/mcs/class/Mono.Parallel/Mono.Parallel.dll.sources +++ b/mcs/class/Mono.Parallel/Mono.Parallel.dll.sources @@ -11,7 +11,3 @@ Mono.Threading/ReaderWriterLockSlimmer.cs ../corlib/System.Threading.Tasks/CyclicDeque.cs ../corlib/System.Threading.Tasks/IConcurrentDeque.cs ../corlib/System.Threading.Tasks/PopResult.cs -Mono.Threading.Tasks/ThreadWorker.cs -Mono.Threading.Tasks/MonoTaskExtensions.cs -Mono.Threading.Tasks/MonoTaskScheduler.cs -Mono.Threading.Tasks/FixedTaskScheduler.cs diff --git a/mcs/class/Mono.Parallel/Mono.Parallel_test.dll.sources b/mcs/class/Mono.Parallel/Mono.Parallel_test.dll.sources index 19baf2d774..1eb8276dbd 100644 --- a/mcs/class/Mono.Parallel/Mono.Parallel_test.dll.sources +++ b/mcs/class/Mono.Parallel/Mono.Parallel_test.dll.sources @@ -2,5 +2,3 @@ Mono.Collections.Concurrent/CollectionStressTestHelper.cs Mono.Collections.Concurrent/ConcurrentSkipListTests.cs Mono.Threading/ParallelTestHelper.cs Mono.Threading/SnziTests.cs -Mono.Threading.Tasks/MonoTaskExtensionsTests.cs -Mono.Threading.Tasks/MonoTaskSchedulerTests.cs diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs deleted file mode 100644 index da656a5786..0000000000 --- a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/FixedTaskScheduler.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Scheduler.cs -// -// Copyright (c) 2008 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -#if NET_4_0 -using System; -using System.Threading; -using System.Threading.Tasks; -using System.Collections.Concurrent; - -namespace Mono.Threading.Tasks -{ - public class FixedTaskScheduler: TaskScheduler, IMonoTaskScheduler - { - readonly IProducerConsumerCollection workQueue; - readonly ThreadWorker[] workers; - readonly ManualResetEvent pulseHandle = new ManualResetEvent (false); - - public FixedTaskScheduler () - : this (Environment.ProcessorCount, ThreadPriority.Normal) - { - - } - - public FixedTaskScheduler (int maxWorker, ThreadPriority priority) - { - workQueue = new ConcurrentQueue (); - workers = new ThreadWorker [maxWorker]; - - for (int i = 0; i < maxWorker; i++) { - workers [i] = new ThreadWorker (workers, i, workQueue, new CyclicDeque (), priority, pulseHandle); - workers [i].Pulse (); - } - } - - protected override void QueueTask (Task t) - { - // Add to the shared work pool - workQueue.TryAdd (t); - // Wake up some worker if they were asleep - PulseAll (); - } - - public void MonoParticipateUntil (Task task) - { - if (task.IsCompleted) - return; - - ManualResetEventSlim evt = new ManualResetEventSlim (false); - task.ContinueWith (_ => evt.Set (), TaskContinuationOptions.ExecuteSynchronously); - if (evt.IsSet || task.IsCompleted) - return; - - ParticipateUntilInternal (task, evt, -1); - } - - public bool MonoParticipateUntil (Task task, ManualResetEventSlim evt, int millisecondsTimeout) - { - if (task.IsCompleted) - return false; - - bool isFromPredicate = true; - task.ContinueWith (_ => { isFromPredicate = false; evt.Set (); }, TaskContinuationOptions.ExecuteSynchronously); - - ParticipateUntilInternal (task, evt, millisecondsTimeout); - - if (task.IsCompleted) - return false; - - return isFromPredicate; - } - - public void ParticipateUntilInternal (Task self, ManualResetEventSlim evt, int millisecondsTimeout) - { - ThreadWorker.ParticipativeWorkerMethod (self, evt, millisecondsTimeout, workQueue, workers, pulseHandle, (a, b) => true); - } - - static bool TaskCompletedPredicate (Task self) - { - return self.IsCompleted; - } - - public void PulseAll () - { - pulseHandle.Set (); - } - - public void Dispose () - { - foreach (ThreadWorker w in workers) - w.Dispose (); - } - - #region Scheduler dummy stubs - protected override System.Collections.Generic.IEnumerable GetScheduledTasks () - { - throw new System.NotImplementedException(); - } - - protected override bool TryDequeue (Task task) - { - throw new System.NotImplementedException(); - } - - protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) - { - task.Execute (null); - return true; - } - - public override int MaximumConcurrencyLevel { - get { - return base.MaximumConcurrencyLevel; - } - } - #endregion - } -} -#endif diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs deleted file mode 100644 index 1b52857040..0000000000 --- a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskExtensions.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// MonoTaskExtensions.cs -// -// Author: -// Jérémie "Garuma" Laval -// -// Copyright (c) 2011 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if NET_4_0 - -using System; -using System.Threading.Tasks; -using System.Reflection; - -namespace Mono.Threading.Tasks -{ - public static class MonoTaskExtensions - { - readonly static Action> internalExecute = null; - - static MonoTaskExtensions () - { - // Initialize internal execute - var method = typeof(Task).GetMethod ("Execute", BindingFlags.Instance | BindingFlags.NonPublic); - internalExecute = (Action>)Delegate.CreateDelegate (typeof(Action>), method); - } - - // Allow external worker to call into the otherwise internal corresponding method of Task - public static void Execute (this Task task, Action childWorkAdder) - { - internalExecute (task, childWorkAdder); - } - } -} - -#endif diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs deleted file mode 100644 index a21c323138..0000000000 --- a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/MonoTaskScheduler.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// MonoTaskScheduler.cs -// -// Author: -// Jérémie "Garuma" Laval -// -// Copyright (c) 2011 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if NET_4_0 - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Mono.Threading.Tasks -{ - public interface IMonoTaskScheduler - { - void MonoParticipateUntil (Task task); - bool MonoParticipateUntil (Task task, ManualResetEventSlim predicateEvt, int millisecondsTimeout); - } -} - -#endif diff --git a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs b/mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs deleted file mode 100644 index 575763cc43..0000000000 --- a/mcs/class/Mono.Parallel/Mono.Threading.Tasks/ThreadWorker.cs +++ /dev/null @@ -1,421 +0,0 @@ -// ThreadWorker.cs -// -// Copyright (c) 2008 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -#if NET_4_0 -using System; -using System.Threading; -using System.Collections.Concurrent; -using System.Threading.Tasks; -using Watch = System.Diagnostics.Stopwatch; - -namespace Mono.Threading.Tasks -{ - public class ThreadWorker : IDisposable - { - Thread workerThread; - - /* This field is used when a TheadWorker have to call Task.Wait - * which bring him back here with the static WorkerMethod although - * it's more optimized for him to continue calling its own WorkerMethod - */ - [ThreadStatic] - static ThreadWorker autoReference; - - readonly IConcurrentDeque dDeque; - readonly ThreadWorker[] others; - readonly ManualResetEvent waitHandle; - readonly IProducerConsumerCollection sharedWorkQueue; - readonly ThreadPriority threadPriority; - - // Flag to tell if workerThread is running - int started = 0; - - readonly int workerLength; - readonly int workerPosition; - const int maxRetry = 3; - - const int sleepThreshold = 100; - int deepSleepTime = 8; - readonly Action adder; - - Task currentTask; - - public ThreadWorker (ThreadWorker[] others, - int workerPosition, - IProducerConsumerCollection sharedWorkQueue, - IConcurrentDeque dDeque, - ThreadPriority priority, - ManualResetEvent handle) - { - this.others = others; - this.dDeque = dDeque; - this.sharedWorkQueue = sharedWorkQueue; - this.workerLength = others.Length; - this.workerPosition = workerPosition; - this.waitHandle = handle; - this.threadPriority = priority; - this.adder = new Action (ChildWorkAdder); - - InitializeUnderlyingThread (); - } - - protected virtual void InitializeUnderlyingThread () - { - this.workerThread = new Thread (WorkerMethodWrapper); - - this.workerThread.IsBackground = true; - this.workerThread.Priority = threadPriority; - this.workerThread.Name = "ParallelFxThreadWorker"; - } - - public virtual void Dispose () - { - Stop (); - if (workerThread.ThreadState != ThreadState.Stopped) - workerThread.Abort (); - } - - public virtual void Pulse () - { - if (started == 1) - return; - - // If the thread was stopped then set it in use and restart it - int result = Interlocked.Exchange (ref started, 1); - if (result != 0) - return; - - if (this.workerThread.ThreadState != ThreadState.Unstarted) { - InitializeUnderlyingThread (); - } - - workerThread.Start (); - } - - public virtual void Stop () - { - // Set the flag to stop so that the while in the thread will stop - // doing its infinite loop. - started = 0; - } - - // This is the actual method called in the Thread - protected virtual void WorkerMethodWrapper () - { - int sleepTime = 0; - autoReference = this; - bool wasWokenUp = false; - - // Main loop - while (started == 1) { - bool result = false; - - result = WorkerMethod (); - if (!result && wasWokenUp) - waitHandle.Reset (); - wasWokenUp = false; - - Thread.Yield (); - - if (result) { - deepSleepTime = 8; - sleepTime = 0; - continue; - } - - // If we are spinning too much, have a deeper sleep - if (++sleepTime > sleepThreshold && sharedWorkQueue.Count == 0) { - wasWokenUp = waitHandle.WaitOne ((deepSleepTime = deepSleepTime >= 0x4000 ? 0x4000 : deepSleepTime << 1)); - } - } - - started = 0; - } - - // Main method, used to do all the logic of retrieving, processing and stealing work. - protected virtual bool WorkerMethod () - { - bool result = false; - bool hasStolenFromOther; - - do { - hasStolenFromOther = false; - - Task value; - - // We fill up our work deque concurrently with other ThreadWorker - while (sharedWorkQueue.Count > 0) { - waitHandle.Set (); - - while (sharedWorkQueue.TryTake (out value)) { - dDeque.PushBottom (value); - } - - // Now we process our work - while (dDeque.PopBottom (out value) == PopResult.Succeed) { - waitHandle.Set (); - ExecuteTask (value, ref result); - } - } - - // When we have finished, steal from other worker - ThreadWorker other; - - // Repeat the operation a little so that we can let other things process. - for (int j = 0; j < maxRetry; ++j) { - int len = workerLength + workerPosition; - // Start stealing with the ThreadWorker at our right to minimize contention - for (int it = workerPosition + 1; it < len; ++it) { - int i = it % workerLength; - if ((other = others [i]) == null || other == this) - continue; - - // Maybe make this steal more than one item at a time, see TODO. - while (other.dDeque.PopTop (out value) == PopResult.Succeed) { - if (!hasStolenFromOther) - waitHandle.Set (); - - hasStolenFromOther = true; - ExecuteTask (value, ref result); - } - } - } - } while (sharedWorkQueue.Count > 0 || hasStolenFromOther); - - return result; - } - - void ExecuteTask (Task value, ref bool result) - { - if (value == null) - return; - - var saveCurrent = currentTask; - currentTask = value; - value.Execute (adder); - result = true; - currentTask = saveCurrent; - } - - // Almost same as above but with an added predicate and treating one item at a time. - // It's used by Scheduler Participate(...) method for special waiting case like - // Task.WaitAll(someTasks) or Task.WaitAny(someTasks) - // Predicate should be really fast and not blocking as it is called a good deal of time - // Also, the method skip tasks that are LongRunning to avoid blocking (Task are not LongRunning by default) - public static void ParticipativeWorkerMethod (Task self, - ManualResetEventSlim predicateEvt, - int millisecondsTimeout, - IProducerConsumerCollection sharedWorkQueue, - ThreadWorker[] others, - ManualResetEvent evt, - Func checkTaskFitness) - { - const int stage1 = 5, stage2 = 0; - int tries = 50; - WaitHandle[] handles = null; - Watch watch = Watch.StartNew (); - if (millisecondsTimeout == -1) - millisecondsTimeout = int.MaxValue; - bool aggressive = false; - bool hasAutoReference = autoReference != null; - Action adder = null; - - while (!predicateEvt.IsSet && watch.ElapsedMilliseconds < millisecondsTimeout && !self.IsCompleted) { - // We try to execute the self task as it may be the simplest way to unlock - // the situation - if (self.Status == TaskStatus.WaitingToRun) { - self.Execute (hasAutoReference ? autoReference.adder : (Action)null); - if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout) - return; - } - - Task value; - - // If we are in fact a normal ThreadWorker, use our own deque - if (hasAutoReference) { - var enumerable = autoReference.dDeque.GetEnumerable (); - if (adder == null) - adder = hasAutoReference ? autoReference.adder : (Action)null; - - if (enumerable != null) { - foreach (var t in enumerable) { - if (t == null) - continue; - - if (checkTaskFitness (self, t)) - t.Execute (adder); - - if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout) - return; - } - } - } - - int count = sharedWorkQueue.Count; - - // Dequeue only one item as we have restriction - while (--count >= 0 && sharedWorkQueue.TryTake (out value) && value != null) { - evt.Set (); - if (checkTaskFitness (self, value) || aggressive) - value.Execute (null); - else { - if (autoReference == null) - sharedWorkQueue.TryAdd (value); - else - autoReference.dDeque.PushBottom (value); - evt.Set (); - } - - if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout) - return; - } - - // First check to see if we comply to predicate - if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout) - return; - - // Try to complete other work by stealing since our desired tasks may be in other worker - ThreadWorker other; - for (int i = 0; i < others.Length; i++) { - if ((other = others [i]) == autoReference || other == null) - continue; - - if (other.dDeque.PopTop (out value) == PopResult.Succeed && value != null) { - evt.Set (); - if (checkTaskFitness (self, value) || aggressive) - value.Execute (null); - else { - if (autoReference == null) - sharedWorkQueue.TryAdd (value); - else - autoReference.dDeque.PushBottom (value); - evt.Set (); - } - } - - if (predicateEvt.IsSet || watch.ElapsedMilliseconds > millisecondsTimeout) - return; - } - - /* Waiting is split in 4 phases - * - until stage 1 we simply yield the thread to let others add data - * - between stage 1 and stage2 we use ManualResetEventSlim light waiting mechanism - * - after stage2 we fall back to the heavier WaitHandle waiting mechanism - * - if really the situation isn't evolving after a couple of sleep, we disable - * task fitness check altogether - */ - if (--tries > stage1) - Thread.Yield (); - else if (tries >= stage2) - predicateEvt.Wait (ComputeTimeout (5, millisecondsTimeout, watch)); - else { - if (tries == stage2 - 1) - handles = new [] { predicateEvt.WaitHandle, evt }; - System.Threading.WaitHandle.WaitAny (handles, ComputeTimeout (1000, millisecondsTimeout, watch)); - if (tries == stage2 - 10) - aggressive = true; - } - } - } - - public static ThreadWorker AutoReference { - get { - return autoReference; - } - set { - autoReference = value; - } - } - - protected IConcurrentDeque Deque { - get { - return dDeque; - } - } - - protected ThreadWorker[] Others { - get { - return others; - } - } - - protected ManualResetEvent WaitHandle { - get { - return waitHandle; - } - } - - protected ThreadPriority Priority { - get { - return threadPriority; - } - } - - protected int WorkerPosition { - get { - return workerPosition; - } - } - - protected virtual void ChildWorkAdder (Task t) - { - dDeque.PushBottom (t); - waitHandle.Set (); - } - - static int ComputeTimeout (int proposed, int timeout, Watch watch) - { - return timeout == int.MaxValue ? proposed : System.Math.Min (proposed, System.Math.Max (0, (int)(timeout - watch.ElapsedMilliseconds))); - } - - public bool Finished { - get { - return started == 0; - } - } - - public int Id { - get { - return workerThread.ManagedThreadId; - } - } - - public virtual bool Equals (ThreadWorker other) - { - return (other == null) ? false : object.ReferenceEquals (this.dDeque, other.dDeque); - } - - public override bool Equals (object obj) - { - ThreadWorker temp = obj as ThreadWorker; - return temp == null ? false : Equals (temp); - } - - public override int GetHashCode () - { - return workerThread.ManagedThreadId.GetHashCode (); - } - } -} -#endif diff --git a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs b/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs deleted file mode 100644 index 62f939b963..0000000000 --- a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskExtensionsTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// MonoTaskExtensionsTests.cs -// -// Author: -// Jérémie "Garuma" Laval -// -// Copyright (c) 2011 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if NET_4_0 - -using System; -using System.Threading; -using System.Threading.Tasks; - -using Mono.Threading.Tasks; - -using NUnit.Framework; - -namespace MonoTests.Mono.Threading.Tasks -{ - [TestFixtureAttribute] - public class MonoTaskExtensionsTests - { - [Test] - public void SimpleExecutionTest () - { - bool executed = false; - Task t = new Task (() => executed = true); - t.Execute (delegate {}); - - Assert.IsTrue (executed); - } - - [Test] - public void ExecutionWithChildCreationTest () - { - bool executed = false; - bool childRetrieved = false; - - Task t = new Task (() => { Task.Factory.StartNew (() => Console.WriteLine ("execution")); executed = true; }); - t.Execute ((child) => childRetrieved = child != null); - - Assert.IsTrue (executed); - Assert.IsTrue (childRetrieved); - } - } -} - -#endif diff --git a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs b/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs deleted file mode 100644 index 31d3b614a1..0000000000 --- a/mcs/class/Mono.Parallel/Test/Mono.Threading.Tasks/MonoTaskSchedulerTests.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// MonoTaskSchedulerTests.cs -// -// Author: -// Jérémie "Garuma" Laval -// -// Copyright (c) 2011 Jérémie "Garuma" Laval -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#if NET_4_0 - -using System; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using System.Collections.Generic; - -using Mono.Threading.Tasks; - -using NUnit.Framework; - -namespace MonoTests.Mono.Threading.Tasks -{ - [TestFixtureAttribute] - public class MonoTaskSchedulerTests - { - class DummyScheduler : TaskScheduler, IMonoTaskScheduler - { - public bool ParticipateMethod1 { - get; set; - } - - public bool ParticipateMethod2 { - get; set; - } - - protected override IEnumerable GetScheduledTasks () - { - return Enumerable.Empty (); - } - - protected override void QueueTask (Task task) - { - - } - - protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) - { - throw new NotSupportedException (); - } - - public void MonoParticipateUntil (Task task) - { - ParticipateMethod1 = true; - } - - public bool MonoParticipateUntil (Task task, ManualResetEventSlim predicateEvt, int millisecondsTimeout) - { - ParticipateMethod2 = true; - return true; - } - } - - [Test] - public void MethodRegisteringTest () - { - DummyScheduler sched = new DummyScheduler (); - - Task t = new Task (delegate { Thread.Sleep (100); }); - t.Start (sched); - t.Wait (); - - Assert.IsTrue (sched.ParticipateMethod1); - } - - [Test] - public void Method2RegisteringTest () - { - DummyScheduler sched = new DummyScheduler (); - - Task t = new Task (delegate { Thread.Sleep (100); }); - t.Start (sched); - t.Wait (100); - - Assert.IsTrue (sched.ParticipateMethod2); - } - - } -} - -#endif diff --git a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs.REMOVED.git-id b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs.REMOVED.git-id index f1a69089a3..8fd3f2fdb3 100644 --- a/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs.REMOVED.git-id +++ b/mcs/class/Mono.Posix/Mono.Unix.Native/Syscall.cs.REMOVED.git-id @@ -1 +1 @@ -7ba53e922bf7d1dd53db2206246a8281c522af7c \ No newline at end of file +0b8f1e6fa028cea47e904a1fbb9ce1a061dbc9c7 \ No newline at end of file diff --git a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs index 3fae43a492..38b1dea8de 100644 --- a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs +++ b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs @@ -156,9 +156,9 @@ namespace Mono.Security.Cryptography { // clear keys protected override void Dispose(bool disposing) { if (!m_Disposed) { - m_P.Clear(); - m_G.Clear(); - m_X.Clear(); + if (m_P != null) m_P.Clear(); + if (m_G != null) m_G.Clear(); + if (m_X != null) m_X.Clear(); } m_Disposed = true; } diff --git a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources index 5072270d8f..ac779fcd51 100644 --- a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources +++ b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources @@ -22,10 +22,8 @@ src/ComponentModel/Microsoft/Internal/GenerationServices.cs src/ComponentModel/Microsoft/Internal/Runtime/Serialization/SerializationServices.cs src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.cs src/ComponentModel/Microsoft/Internal/Collections/WeakReferenceCollection.cs -src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.CollectionOfObject.cs src/ComponentModel/Microsoft/Internal/Collections/EnumerableCardinality.cs -src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs src/ComponentModel/System/LazyOfTTMetadata.cs src/ComponentModel/System/ComponentModel/Composition/PartMetadataAttribute.cs src/ComponentModel/System/ComponentModel/Composition/ExceptionBuilder.cs diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs deleted file mode 100644 index 03269317f5..0000000000 --- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs +++ /dev/null @@ -1,106 +0,0 @@ -// ----------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation. All rights reserved. -// ----------------------------------------------------------------------- -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using Microsoft.Internal; - -// This is using the desktop namespace for ReadOnlyDictionary, the source code is in Microsoft\Internal\Collections to keep it seperate from the main MEF codebase. -namespace System.Collections.ObjectModel -{ - - [DebuggerDisplay("Count = {Count}")] - [DebuggerTypeProxy(typeof(ReadOnlyDictionaryDebuggerProxy<,>))] - internal sealed partial class ReadOnlyDictionary : IDictionary - { - private readonly IDictionary _innerDictionary; - - public ReadOnlyDictionary(IDictionary dictionary) - { - this._innerDictionary = dictionary ?? new Dictionary(0); - } - - public int Count - { - get { return this._innerDictionary.Count; } - } - - public bool IsReadOnly - { - get { return true; } - } - - public ICollection Keys - { - get { return this._innerDictionary.Keys; } - } - - public TValue this[TKey key] - { - get { return this._innerDictionary[key]; } - set { throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); } - } - - public ICollection Values - { - get { return this._innerDictionary.Values; } - } - - public bool Contains(KeyValuePair item) - { - return this._innerDictionary.Contains(item); - } - - public bool ContainsKey(TKey key) - { - return this._innerDictionary.ContainsKey(key); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - this._innerDictionary.CopyTo(array, arrayIndex); - } - - public IEnumerator> GetEnumerator() - { - return this._innerDictionary.GetEnumerator(); - } - - public bool TryGetValue(TKey key, out TValue value) - { - return this._innerDictionary.TryGetValue(key, out value); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this._innerDictionary.GetEnumerator(); - } - - void IDictionary.Add(TKey key, TValue value) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - void ICollection>.Add(KeyValuePair item) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - void ICollection>.Clear() - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - bool IDictionary.Remove(TKey key) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - - bool ICollection>.Remove(KeyValuePair item) - { - throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); - } - } -} diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs deleted file mode 100644 index 9dda8f4bc5..0000000000 --- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs +++ /dev/null @@ -1,34 +0,0 @@ -// ----------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation. All rights reserved. -// ----------------------------------------------------------------------- -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using Microsoft.Internal; - -namespace System.Collections.ObjectModel -{ - - // NOTE: This type cannot be a nested proxy of ReadOnlyDictionary due to a bug - // in the Visual Studio Debugger which causes it to ignore nested generic proxies. - internal class ReadOnlyDictionaryDebuggerProxy - { - private readonly ReadOnlyDictionary _dictionary; - - public ReadOnlyDictionaryDebuggerProxy(ReadOnlyDictionary dictionary) - { - Requires.NotNull(dictionary, "dictionary"); - - _dictionary = dictionary; - } - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public KeyValuePair[] Items - { - // NOTE: This shouldn't be cached, so that on every query of - // the current value of the underlying dictionary is respected. - get { return this._dictionary.ToArray(); } - } - } -} diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs index 3208718e7d..256da0cfa1 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs @@ -136,10 +136,10 @@ namespace Mono.Data.SqlExpressions { string str = sb.ToString (); - if (str.IndexOf(".") == -1) - return Int64.Parse (str); - else - return double.Parse (str); + if (str.IndexOf ('.') < 0) + return Int64.Parse (str, CultureInfo.InvariantCulture); + + return double.Parse (str, CultureInfo.InvariantCulture); } private char ProcessEscapes(char c) @@ -327,7 +327,7 @@ namespace Mono.Data.SqlExpressions { case '#': string date = ReadString ('#'); - val = DateTime.Parse (date); + val = DateTime.Parse (date, CultureInfo.InvariantCulture); return Token.DateLiteral; case '\'': diff --git a/mcs/class/System.Data/System.Data/DataColumn.cs b/mcs/class/System.Data/System.Data/DataColumn.cs index 166be8d8f4..7e7cedae6f 100644 --- a/mcs/class/System.Data/System.Data/DataColumn.cs +++ b/mcs/class/System.Data/System.Data/DataColumn.cs @@ -474,7 +474,7 @@ namespace System.Data { public string Expression { get { return _expression; } set { - if (value == null) + if (value == null || value.Trim () == string.Empty) value = String.Empty; CompileExpression (value); diff --git a/mcs/class/System.Data/System.Data/DataRow.cs b/mcs/class/System.Data/System.Data/DataRow.cs index 6b6299f41a..f3fa2a8e77 100644 --- a/mcs/class/System.Data/System.Data/DataRow.cs +++ b/mcs/class/System.Data/System.Data/DataRow.cs @@ -134,10 +134,7 @@ namespace System.Data { public object this [string columnName] { get { return this [columnName, DataRowVersion.Default]; } set { - DataColumn column = _table.Columns [columnName]; - if (column == null) - throw new ArgumentException ("The column '" + columnName + - "' does not belong to the table : " + _table.TableName); + DataColumn column = GetColumn (columnName); this [column.Ordinal] = value; } } @@ -202,10 +199,7 @@ namespace System.Data { /// public object this [string columnName, DataRowVersion version] { get { - DataColumn column = _table.Columns [columnName]; - if (column == null) - throw new ArgumentException ("The column '" + columnName + - "' does not belong to the table : " + _table.TableName); + DataColumn column = GetColumn (columnName); return this [column.Ordinal, version]; } } @@ -1248,7 +1242,7 @@ namespace System.Data { /// public bool IsNull (string columnName) { - return IsNull (Table.Columns [columnName]); + return IsNull (GetColumn (columnName)); } /// @@ -1257,6 +1251,17 @@ namespace System.Data { /// public bool IsNull (DataColumn column, DataRowVersion version) { + if (column == null) + throw new ArgumentNullException ("column"); + + // use the expresion if there is one + if (column.Expression != String.Empty) { + // FIXME: how does this handle 'version'? + // TODO: Can we avoid the Eval each time by using the cached value? + object o = column.CompiledExpression.Eval (this); + return o == null && o == DBNull.Value; + } + return column.DataContainer.IsNull (IndexFromVersion (version)); } @@ -1692,5 +1697,15 @@ namespace System.Data { } } #endif // NET_2_0 + + DataColumn GetColumn (string columnName) + { + DataColumn column = _table.Columns [columnName]; + + if (column == null) + throw new ArgumentException ("The column '" + columnName + "' does not belong to the table " + _table.TableName); + + return column; + } } } diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs index f0f68c3207..096c72fd1c 100644 --- a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs @@ -542,6 +542,23 @@ namespace MonoTests.System.Data Assert.AreEqual(sExpression,dc.Expression, "dce#2"); } + [Test] + public void Expression_Whitespace () + { + DataColumn dc = new DataColumn ("ColName", typeof(string)); + + string plainWhitespace = " "; + string surroundWhitespace = " 'abc' "; + + Assert.AreEqual (string.Empty, dc.Expression, "dce#1"); + + dc.Expression = plainWhitespace; + Assert.AreEqual (string.Empty, dc.Expression, "dce#2"); + + dc.Expression = surroundWhitespace; + Assert.AreEqual (surroundWhitespace, dc.Expression, "dce#3"); + } + [Test] public void Expression_Exceptions() { diff --git a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs index 14333e2201..4dc0d77495 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs @@ -2125,6 +2125,59 @@ namespace MonoTests.System.Data #endregion } + [Test] + public void IsNull_BeforeGetValue () + { + DataTable table = new DataTable (); + + // add the row, with the value in the column + DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); // static + DataRow row = table.Rows.Add ("the value"); + Assert.IsFalse (row.IsNull ("static"), "static null check failed"); + Assert.AreEqual ("the value", row ["static"], "static value check failed"); + + // add the first derived column + DataColumn firstColumn = table.Columns.Add ("first", typeof(string), "static"); // first -> static + Assert.IsFalse (row.IsNull ("first"), "first level null check failed"); + Assert.AreEqual ("the value", row ["first"], "first level value check failed"); + + // add the second level of related + DataColumn secondColumn = table.Columns.Add ("second", typeof(string), "first"); // second -> first -> static + Assert.IsFalse (row.IsNull ("second"), "second level null check failed"); + Assert.AreEqual ("the value", row ["second"], "second level value check failed"); + } + + [Test] + public void IsNull_NullValueArguments () + { + DataTable table = new DataTable (); + + // add the row, with the value in the column + DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); + DataRow row = table.Rows.Add ("the value"); + + try { + row.IsNull ((string)null); + Assert.Fail ("expected an arg null exception for passing a null string"); + } catch (ArgumentNullException) { + // do nothing as null columns aren't allowed + } + + try { + row.IsNull (""); + Assert.Fail ("expected an arg exception for passing an empty string"); + } catch (ArgumentException) { + // do nothing as we can't find a col with no name + } + + try { + row.IsNull (null, DataRowVersion.Default); + Assert.Fail ("null column with version check failed"); + } catch (ArgumentNullException) { + // do nothing as null columns aren't allowed + } + } + [Test] public void Item() { // init table with columns diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs index 827bdee088..6e18fe690d 100644 --- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs +++ b/mcs/class/System.Drawing/System.Drawing/Graphics.cs @@ -1744,7 +1744,7 @@ namespace System.Drawing if (GDIPlus.Display == IntPtr.Zero) { GDIPlus.Display = GDIPlus.XOpenDisplay (IntPtr.Zero); if (GDIPlus.Display == IntPtr.Zero) - throw new NotSupportedException ("Could not open display (X-Server required. Check you DISPLAY environment variable)"); + throw new NotSupportedException ("Could not open display (X-Server required. Check your DISPLAY environment variable)"); } if (hwnd == IntPtr.Zero) { hwnd = GDIPlus.XRootWindow (GDIPlus.Display, GDIPlus.XDefaultScreen (GDIPlus.Display)); diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs index b07e5b9415..444e1e6066 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs @@ -28,6 +28,7 @@ using System; +using System.IO; using System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; @@ -125,6 +126,7 @@ namespace MonoTests.System.Drawing.Drawing2D // save the drawing string file = "TestHatchBrush" + getOutSufix() + ".png"; bmp.Save (file, ImageFormat.Png); + File.Delete (file); } private void Constructors () diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs index 784e19b0ed..dcca275389 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs @@ -27,6 +27,7 @@ // using System; +using System.IO; using System.Drawing; using System.Drawing.Imaging; using System.Security.Permissions; @@ -114,6 +115,8 @@ namespace MonoTests.System.Drawing.Imaging { private void Bug80323 (Color c) { + string fileName = String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X")); + // test case from bug #80323 ColorMatrix cm = new ColorMatrix (new float[][] { new float[] {1, 0, 0, 0, 0}, //R @@ -138,12 +141,14 @@ namespace MonoTests.System.Drawing.Imaging { g.DrawImage (bmp, new Rectangle (0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, null); g.DrawImage (bmp, new Rectangle (100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, ia); } - b.Save (String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X"))); + b.Save (fileName); Assert.AreEqual (Color.FromArgb (255, 255, 155, 155), b.GetPixel (50, 50), "50,50"); Assert.AreEqual (Color.FromArgb (255, 255, 205, 205), b.GetPixel (150, 50), "150,50"); } } } + + File.Delete (fileName); } [Test] diff --git a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs index ea7f6d3818..8158dfd757 100644 --- a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs +++ b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs @@ -58,6 +58,8 @@ namespace MonoTests.System.IO.Compression var nullEntry = archive.GetEntry("nonexisting"); Assert.IsNull(nullEntry); } + + File.Delete ("test.zip"); } [Test] @@ -75,6 +77,8 @@ namespace MonoTests.System.IO.Compression Assert.Fail(); } + + File.Delete ("test.zip"); } [Test] @@ -90,6 +94,8 @@ namespace MonoTests.System.IO.Compression var nullEntry = archive.GetEntry("nonexisting"); Assert.IsNull(nullEntry); } + + File.Delete ("test.zip"); } [Test] @@ -104,6 +110,8 @@ namespace MonoTests.System.IO.Compression var foo = entry.Open(); } + + File.Delete ("test.zip"); } [Test] @@ -125,6 +133,8 @@ namespace MonoTests.System.IO.Compression var entry = archive.GetEntry("foo.txt"); Assert.IsNull(entry); } + + File.Delete ("delete.zip"); } [Test] @@ -146,6 +156,8 @@ namespace MonoTests.System.IO.Compression var entry = archive.GetEntry("foo.txt"); Assert.IsNull(entry); } + + File.Delete ("delete.zip"); } [Test] @@ -157,6 +169,8 @@ namespace MonoTests.System.IO.Compression var entry = archive.CreateEntry("foo.txt"); using (var stream = entry.Open()) { + using (var streamWriter = new StreamWriter(stream)) + streamWriter.Write("foo"); } } @@ -165,7 +179,14 @@ namespace MonoTests.System.IO.Compression { var entry = archive.GetEntry("foo.txt"); Assert.IsNotNull(entry); + + var streamReader = new StreamReader(entry.Open()); + var text = streamReader.ReadToEnd(); + + Assert.AreEqual("foo", text); } + + File.Delete ("create.zip"); } [Test] @@ -184,6 +205,8 @@ namespace MonoTests.System.IO.Compression Assert.AreEqual("foobar/bar.txt", entries[3].FullName); Assert.AreEqual("foobar/foo.txt", entries[4].FullName); } + + File.Delete ("test.zip"); } [Test] @@ -202,6 +225,8 @@ namespace MonoTests.System.IO.Compression Assert.AreEqual("foobar/bar.txt", entries[3].FullName); Assert.AreEqual("foobar/foo.txt", entries[4].FullName); } + + File.Delete ("test.zip"); } [Test] @@ -219,6 +244,8 @@ namespace MonoTests.System.IO.Compression Assert.Fail(); } + + File.Delete ("test.zip"); } } } diff --git a/mcs/class/System.IO.Compression/ZipArchiveEntry.cs b/mcs/class/System.IO.Compression/ZipArchiveEntry.cs index acfb8f3f2a..cd783b8eb0 100644 --- a/mcs/class/System.IO.Compression/ZipArchiveEntry.cs +++ b/mcs/class/System.IO.Compression/ZipArchiveEntry.cs @@ -112,15 +112,9 @@ namespace System.IO.Compression if (Archive.Mode == ZipArchiveMode.Create && openStream != null) throw new IOException("The archive for this entry was opened with the Create mode, and this entry has already been written to."); - var memoryStream = new MemoryStream(); - openStream = memoryStream; + openStream = entry.OpenEntryStream(); - if (Archive.Mode == ZipArchiveMode.Read || Archive.Mode == ZipArchiveMode.Update) - entry.WriteTo(memoryStream); - - memoryStream.Seek(0, SeekOrigin.Begin); - - return memoryStream; + return openStream; } } } diff --git a/mcs/class/System.Json/System.Json/JsonPrimitive.cs b/mcs/class/System.Json/System.Json/JsonPrimitive.cs index 64518785b8..5d47eb4a4e 100644 --- a/mcs/class/System.Json/System.Json/JsonPrimitive.cs +++ b/mcs/class/System.Json/System.Json/JsonPrimitive.cs @@ -163,7 +163,16 @@ namespace System.Json return (string) value; throw new NotImplementedException ("GetFormattedString from value type " + value.GetType ()); case JsonType.Number: - return ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo); + string s; + if (value is float || value is double) + // Use "round-trip" format + s = ((IFormattable) value).ToString ("R", NumberFormatInfo.InvariantInfo); + else + s = ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo); + if (s == "NaN" || s == "Infinity" || s == "-Infinity") + return "\"" + s + "\""; + else + return s; default: throw new InvalidOperationException (); } diff --git a/mcs/class/System.Json/System.Json/JsonValue.cs b/mcs/class/System.Json/System.Json/JsonValue.cs index 1d16b88e3f..d703edd551 100644 --- a/mcs/class/System.Json/System.Json/JsonValue.cs +++ b/mcs/class/System.Json/System.Json/JsonValue.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Globalization; using System.IO; using System.Linq; using System.Runtime.Serialization.Json; @@ -218,8 +219,8 @@ namespace System.Json if (src [i] == '"' || src [i] == '\\') { sb.Append (src, start, i - start); sb.Append ('\\'); - sb.Append (src [i++]); - start = i; + sb.Append (src [i]); + start = i + 1; } sb.Append (src, start, src.Length - start); return sb.ToString (); @@ -328,70 +329,70 @@ namespace System.Json { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToBoolean (((JsonPrimitive) value).Value); + return Convert.ToBoolean (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator byte (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToByte (((JsonPrimitive) value).Value); + return Convert.ToByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator char (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToChar (((JsonPrimitive) value).Value); + return Convert.ToChar (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator decimal (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToDecimal (((JsonPrimitive) value).Value); + return Convert.ToDecimal (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator double (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToDouble (((JsonPrimitive) value).Value); + return Convert.ToDouble (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator float (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToSingle (((JsonPrimitive) value).Value); + return Convert.ToSingle (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator int (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt32 (((JsonPrimitive) value).Value); + return Convert.ToInt32 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator long (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt64 (((JsonPrimitive) value).Value); + return Convert.ToInt64 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator sbyte (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToSByte (((JsonPrimitive) value).Value); + return Convert.ToSByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator short (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToInt16 (((JsonPrimitive) value).Value); + return Convert.ToInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator string (JsonValue value) @@ -405,21 +406,21 @@ namespace System.Json { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt16 (((JsonPrimitive) value).Value); + return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator ulong (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt64(((JsonPrimitive) value).Value); + return Convert.ToUInt64(((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator ushort (JsonValue value) { if (value == null) throw new ArgumentNullException ("value"); - return Convert.ToUInt16 (((JsonPrimitive) value).Value); + return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo); } public static implicit operator DateTime (JsonValue value) diff --git a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs index 2459c1fc3a..02dd106dfd 100644 --- a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs +++ b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs @@ -11,6 +11,8 @@ using System; using System.IO; using System.Text; using System.Json; +using System.Globalization; +using System.Threading; namespace MonoTests.System { @@ -24,6 +26,14 @@ namespace MonoTests.System Assert.AreEqual (1, j.Count, "itemcount"); Assert.AreEqual (JsonType.String, j ["a"].JsonType, "type"); Assert.AreEqual ("b", (string) j ["a"], "value"); + + JsonValue.Parse ("[{ \"a\": \"b\",}]"); + } + + [Test] + public void LoadWithTrailingComma2 () + { + JsonValue.Parse ("[{ \"a\": \"b\",}]"); } // Test that we correctly serialize JsonArray with null elements. @@ -35,5 +45,141 @@ namespace MonoTests.System var str = j.ToString (); Assert.AreEqual (str, "[1, 2, 3, null]"); } + + [Test] + public void QuoteEscapeBug_20869 () + { + Assert.AreEqual ((new JsonPrimitive ("\"\"")).ToString (), "\"\\\"\\\"\""); + } + + void ExpectError (string s) + { + try { + JsonValue.Parse (s); + Assert.Fail ("Expected ArgumentException for `" + s + "'"); + } catch (ArgumentException) { + } + } + + // Test whether an exception is thrown for invalid JSON + [Test] + public void CheckErrors () + { + ExpectError (@"-"); + ExpectError (@"- "); + ExpectError (@"1."); + ExpectError (@"1. "); + ExpectError (@"1e+"); + ExpectError (@"1 2"); + ExpectError (@"077"); + + ExpectError (@"[1,]"); + + //ExpectError (@"{""a"":1,}"); // Not valid JSON, allowed anyway + } + + // Parse a json string and compare to the expected value + void CheckDouble (double expected, string json) + { + double jvalue = (double) JsonValue.Parse (json); + Assert.AreEqual (expected, jvalue); + } + + // Convert a number to json and parse the string, then compare the result to the original value + void CheckDouble (double number) + { + double jvalue = (double) JsonValue.Parse (new JsonPrimitive (number).ToString ()); + Assert.AreEqual (number, jvalue); // should be exactly the same + } + + [Test] + public void CheckNumbers () + { + CheckDouble (0, "0"); + CheckDouble (0, "-0"); + CheckDouble (0, "0.00"); + CheckDouble (0, "-0.00"); + CheckDouble (1, "1"); + CheckDouble (1.1, "1.1"); + CheckDouble (-1, "-1"); + CheckDouble (-1.1, "-1.1"); + CheckDouble (1e-10, "1e-10"); + CheckDouble (1e+10, "1e+10"); + CheckDouble (1e-30, "1e-30"); + CheckDouble (1e+30, "1e+30"); + + CheckDouble (1, "\"1\""); + CheckDouble (1.1, "\"1.1\""); + CheckDouble (-1, "\"-1\""); + CheckDouble (-1.1, "\"-1.1\""); + + CheckDouble (double.NaN, "\"NaN\""); + CheckDouble (double.PositiveInfinity, "\"Infinity\""); + CheckDouble (double.NegativeInfinity, "\"-Infinity\""); + + ExpectError ("NaN"); + ExpectError ("Infinity"); + ExpectError ("-Infinity"); + + Assert.AreEqual ("1.1", new JsonPrimitive (1.1).ToString ()); + Assert.AreEqual ("-1.1", new JsonPrimitive (-1.1).ToString ()); + Assert.AreEqual ("1E-20", new JsonPrimitive (1e-20).ToString ()); + Assert.AreEqual ("1E+20", new JsonPrimitive (1e+20).ToString ()); + Assert.AreEqual ("1E-30", new JsonPrimitive (1e-30).ToString ()); + Assert.AreEqual ("1E+30", new JsonPrimitive (1e+30).ToString ()); + Assert.AreEqual ("\"NaN\"", new JsonPrimitive (double.NaN).ToString ()); + Assert.AreEqual ("\"Infinity\"", new JsonPrimitive (double.PositiveInfinity).ToString ()); + Assert.AreEqual ("\"-Infinity\"", new JsonPrimitive (double.NegativeInfinity).ToString ()); + + Assert.AreEqual ("1E-30", JsonValue.Parse ("1e-30").ToString ()); + Assert.AreEqual ("1E+30", JsonValue.Parse ("1e+30").ToString ()); + + CheckDouble (1); + CheckDouble (1.1); + CheckDouble (1.25); + CheckDouble (-1); + CheckDouble (-1.1); + CheckDouble (-1.25); + CheckDouble (1e-20); + CheckDouble (1e+20); + CheckDouble (1e-30); + CheckDouble (1e+30); + CheckDouble (3.1415926535897932384626433); + CheckDouble (3.1415926535897932384626433e-20); + CheckDouble (3.1415926535897932384626433e+20); + CheckDouble (double.NaN); + CheckDouble (double.PositiveInfinity); + CheckDouble (double.NegativeInfinity); + CheckDouble (double.MinValue); + CheckDouble (double.MaxValue); + + // A number which needs 17 digits (see http://stackoverflow.com/questions/6118231/why-do-i-need-17-significant-digits-and-not-16-to-represent-a-double) + CheckDouble (18014398509481982.0); + + // Values around the smallest positive decimal value + CheckDouble (1.123456789e-29); + CheckDouble (1.123456789e-28); + + CheckDouble (1.1E-29, "0.000000000000000000000000000011"); + // This is being parsed as a decimal and rounded to 1e-28, even though it can be more accurately be represented by a double + //CheckDouble (1.1E-28, "0.00000000000000000000000000011"); + } + + // Retry the test with different locales + [Test] + public void CheckNumbersCulture () + { + CultureInfo old = Thread.CurrentThread.CurrentCulture; + try { + Thread.CurrentThread.CurrentCulture = new CultureInfo ("en"); + CheckNumbers (); + Thread.CurrentThread.CurrentCulture = new CultureInfo ("fr"); + CheckNumbers (); + Thread.CurrentThread.CurrentCulture = new CultureInfo ("de"); + CheckNumbers (); + } finally { + Thread.CurrentThread.CurrentCulture = old; + } + } } } diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs index 9dd41b3d33..0e28b72838 100644 --- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs +++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs @@ -211,6 +211,10 @@ namespace System.Net.Http.Headers static string EncodeBase64Value (string value) { + bool quoted = value.Length > 1 && value [0] == '"' && value [value.Length - 1] == '"'; + if (quoted) + value = value.Substring (1, value.Length - 2); + for (int i = 0; i < value.Length; ++i) { var ch = value[i]; if (ch > 127) { @@ -220,7 +224,7 @@ namespace System.Net.Http.Headers } } - if (!Lexer.IsValidToken (value)) + if (quoted || !Lexer.IsValidToken (value)) return "\"" + value + "\""; return value; diff --git a/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs index 2458975d68..fe940df896 100644 --- a/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs +++ b/mcs/class/System.Net.Http/System.Net.Http/DelegatingHandler.cs @@ -34,6 +34,7 @@ namespace System.Net.Http public abstract class DelegatingHandler : HttpMessageHandler { bool disposed; + HttpMessageHandler handler; protected DelegatingHandler () { @@ -47,13 +48,24 @@ namespace System.Net.Http InnerHandler = innerHandler; } - public HttpMessageHandler InnerHandler { get; set; } + public HttpMessageHandler InnerHandler { + get { + return handler; + } + set { + if (value == null) + throw new ArgumentNullException ("InnerHandler"); + + handler = value; + } + } protected override void Dispose (bool disposing) { if (disposing && !disposed) { disposed = true; - InnerHandler.Dispose (); + if (InnerHandler != null) + InnerHandler.Dispose (); } base.Dispose (disposing); diff --git a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources index e5ce8f7505..29d4d75f5e 100644 --- a/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources +++ b/mcs/class/System.Net.Http/System.Net.Http_test.dll.sources @@ -1,3 +1,4 @@ +System.Net.Http/DelegatingHandlerTest.cs System.Net.Http/ByteArrayContentTest.cs System.Net.Http/FormUrlEncodedContentTest.cs System.Net.Http/HttpClientHandlerTest.cs diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs index 87bd1a95fe..800ab30251 100644 --- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs +++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs @@ -215,6 +215,14 @@ namespace MonoTests.System.Net.Http.Headers value.FileName = "(@)"; Assert.AreEqual ("\"(@)\"", value.FileName, "#21"); Assert.AreEqual (new NameValueHeaderValue ("filename", "\"(@)\""), value.Parameters.First (), "#22"); + + value.FileName = "\"č\""; + Assert.AreEqual ("č", value.FileName, "#31"); + Assert.AreEqual (new NameValueHeaderValue ("filename", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#32"); + + value.FileName = "\"quoted\""; + Assert.AreEqual ("\"quoted\"", value.FileName, "#41"); + Assert.AreEqual (new NameValueHeaderValue ("filename", "\"quoted\""), value.Parameters.First (), "#42"); } [Test] diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs new file mode 100644 index 0000000000..d6812e7f1d --- /dev/null +++ b/mcs/class/System.Net.Http/Test/System.Net.Http/DelegatingHandlerTest.cs @@ -0,0 +1,63 @@ +// +// DelegatingHandlerTest.cs +// +// Authors: +// Marek Safar +// +// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using System; +using NUnit.Framework; +using System.Net.Http; +using System.IO; +using System.Threading.Tasks; + +namespace MonoTests.System.Net.Http +{ + [TestFixture] + public class DelegatingHandlerTest + { + class DefaultHandler : DelegatingHandler + { + } + + + [Test] + public void DisposeTest () + { + var handler = new DefaultHandler (); + handler.Dispose (); + } + + [Test] + public void InnerHandler_Invalid () + { + var handler = new DefaultHandler (); + try { + handler.InnerHandler = null; + Assert.Fail ("#1"); + } catch (ArgumentNullException) { + } + } + } +} diff --git a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs index b067997cb7..329f91eed1 100644 --- a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs +++ b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs @@ -315,12 +315,14 @@ namespace System.Numerics { word = (uint)sub; borrow = (uint)(sub >> 32) & 0x1u; - data [data.Length - 1] = ~word & store_mask; + if ((~word & store_mask) == 0) + data = Resize (data, data.Length - 1); + else + data [data.Length - 1] = ~word & store_mask; } if (borrow != 0) //FIXME I believe this can't happen, can someone write a test for it? throw new Exception ("non zero final carry"); } - } public bool IsEven { diff --git a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs index 4aa0ffbd02..817d13e40c 100644 --- a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs +++ b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs @@ -550,13 +550,18 @@ namespace MonoTests.System.Numerics { long[] values = new long [] { 0, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL, 0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL, - 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L }; + 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L, 4294967295L, -4294967295L, 4294967296L, -4294967296L }; foreach (var val in values) { - var a = new BigInteger (val); - var b = new BigInteger (a.ToByteArray ()); + try { + var a = new BigInteger (val); + var b = new BigInteger (a.ToByteArray ()); - Assert.AreEqual (val, (long)a, "#a_" + val); - Assert.AreEqual (val, (long)b, "#b_" + val); + Assert.AreEqual (val, (long)a, "#a_" + val); + Assert.AreEqual (val, (long)b, "#b_" + val); + Assert.AreEqual (a, b, "#a == #b (" + val + ")"); + } catch (Exception e) { + Assert.Fail ("could not roundtrip {0}", val); + } } } diff --git a/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs b/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs index 2c9cafb0f6..39b66d9ca1 100644 --- a/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs +++ b/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs @@ -1254,7 +1254,7 @@ namespace MonoTests.System.Runtime.Caching // add some short duration entries for (int i = 0; i < HEAP_RESIZE_SHORT_ENTRIES; i++) { - var expireAt = DateTimeOffset.Now.AddSeconds (1); + var expireAt = DateTimeOffset.Now.AddSeconds (3); mc.Add ("short-" + i, i.ToString (), expireAt); } @@ -1262,20 +1262,20 @@ namespace MonoTests.System.Runtime.Caching // add some long duration entries for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) { - var expireAt = DateTimeOffset.Now.AddSeconds (10); + var expireAt = DateTimeOffset.Now.AddSeconds (12); mc.Add ("long-" + i, i.ToString (), expireAt); } Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_SHORT_ENTRIES, mc.GetCount(), "#CS3"); // wait for the cache thread to expire the short duration items, this will also shrink the size of the cache - global::System.Threading.Thread.Sleep (3 * 1000); + global::System.Threading.Thread.Sleep (5 * 1000); Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS4"); // add some new items into the cache, this will grow the cache again for (int i = 0; i < HEAP_RESIZE_LONG_ENTRIES; i++) { - mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (2)); + mc.Add("final-" + i, i.ToString (), DateTimeOffset.Now.AddSeconds (4)); } Assert.AreEqual (HEAP_RESIZE_LONG_ENTRIES + HEAP_RESIZE_LONG_ENTRIES, mc.GetCount (), "#CS5"); diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs index 891be5db3e..2d11b1727a 100644 --- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs +++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs @@ -26,7 +26,7 @@ namespace System.Runtime.Serialization.Json { object v = ReadCore (); SkipSpaces (); - if (r.Read () >= 0) + if (ReadChar () >= 0) throw JsonError (String.Format ("extra characters in JSON input")); return v; } @@ -68,8 +68,10 @@ namespace System.Runtime.Serialization.Json } while (true) { SkipSpaces (); - if (PeekChar () == '}') + if (PeekChar () == '}') { + ReadChar (); break; + } string name = ReadStringLiteral (); SkipSpaces (); Expect (':'); @@ -160,98 +162,89 @@ namespace System.Runtime.Serialization.Json // It could return either int, long or decimal, depending on the parsed value. object ReadNumericLiteral () { + var sb = new StringBuilder (); + bool negative = false; if (PeekChar () == '-') { negative = true; - ReadChar (); - if (PeekChar () < 0) - throw JsonError ("Invalid JSON numeric literal; extra negation"); + sb.Append ((char) ReadChar ()); } int c; - decimal val = 0; int x = 0; bool zeroStart = PeekChar () == '0'; for (; ; x++) { c = PeekChar (); if (c < '0' || '9' < c) break; - val = val * 10 + (c - '0'); - ReadChar (); - if (zeroStart && x == 1 && c == '0') - throw JsonError ("leading multiple zeros are not allowed"); + sb.Append ((char) ReadChar ()); + if (zeroStart && x == 1) + throw JsonError ("leading zeros are not allowed"); } + if (x == 0) // Reached e.g. for "- " + throw JsonError ("Invalid JSON numeric literal; no digit found"); // fraction - bool hasFrac = false; - decimal frac = 0; int fdigits = 0; if (PeekChar () == '.') { hasFrac = true; - ReadChar (); + sb.Append ((char) ReadChar ()); if (PeekChar () < 0) throw JsonError ("Invalid JSON numeric literal; extra dot"); - decimal d = 10; while (true) { c = PeekChar (); if (c < '0' || '9' < c) break; - ReadChar (); - frac += (c - '0') / d; - d *= 10; + sb.Append ((char) ReadChar ()); fdigits++; } if (fdigits == 0) throw JsonError ("Invalid JSON numeric literal; extra dot"); } - frac = Decimal.Round (frac, fdigits); c = PeekChar (); if (c != 'e' && c != 'E') { if (!hasFrac) { - if (negative && int.MinValue <= -val || - !negative && val <= int.MaxValue) - return (int) (negative ? -val : val); - if (negative && long.MinValue <= -val || - !negative && val <= long.MaxValue) - return (long) (negative ? -val : val); + int valueInt; + if (int.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueInt)) + return valueInt; + + long valueLong; + if (long.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueLong)) + return valueLong; + + ulong valueUlong; + if (ulong.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueUlong)) + return valueUlong; } - var v = val + frac; - return negative ? -v : v; - } - - // exponent - - ReadChar (); - - int exp = 0; - if (PeekChar () < 0) - throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent"); + decimal valueDecimal; + if (decimal.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueDecimal) && valueDecimal != 0) + return valueDecimal; + } else { + // exponent + sb.Append ((char) ReadChar ()); + if (PeekChar () < 0) + throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent"); - bool negexp = false; - c = PeekChar (); - if (c == '-') { - ReadChar (); - negexp = true; - } - else if (c == '+') - ReadChar (); - - if (PeekChar () < 0) - throw JsonError ("Invalid JSON numeric literal; incomplete exponent"); - while (true) { c = PeekChar (); - if (c < '0' || '9' < c) - break; - exp = exp * 10 + (c - '0'); - ReadChar (); + if (c == '-') { + sb.Append ((char) ReadChar ()); + } + else if (c == '+') + sb.Append ((char) ReadChar ()); + + if (PeekChar () < 0) + throw JsonError ("Invalid JSON numeric literal; incomplete exponent"); + while (true) { + c = PeekChar (); + if (c < '0' || '9' < c) + break; + sb.Append ((char) ReadChar ()); + } } - // it is messy to handle exponent, so I just use Decimal.Parse() with assured JSON format. - if (negexp) - return new Decimal ((double) (val + frac) / Math.Pow (10, exp)); - int [] bits = Decimal.GetBits (val + frac); - return new Decimal (bits [0], bits [1], bits [2], negative, (byte) exp); + + return double.Parse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture); } StringBuilder vb = new StringBuilder (); diff --git a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs index cf1038dac2..99376fbcd6 100644 --- a/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs +++ b/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Web/WebServiceHostTest.cs @@ -45,7 +45,7 @@ namespace MonoTests.System.ServiceModel.Web [Category("NotWorking")] public void ServiceDebugBehaviorTest () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); Assert.AreEqual (true, host.Description.Behaviors.Find ().HttpHelpPageEnabled, "HttpHelpPageEnabled #1"); @@ -63,7 +63,7 @@ namespace MonoTests.System.ServiceModel.Web [Category ("NotWorking")] public void WebHttpBehaviorTest1 () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); ServiceEndpoint basicHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new BasicHttpBinding (), "BasicHttpBinding"); @@ -83,7 +83,7 @@ namespace MonoTests.System.ServiceModel.Web [Category("NotWorking")] public void WebHttpBehaviorTest2 () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); ServiceEndpoint webHttp = host.AddServiceEndpoint ("MonoTests.System.ServiceModel.Web.WebServiceHostTest+MyService", new WebHttpBinding (), "WebHttpBinding"); MyWebHttpBehavior behavior = new MyWebHttpBehavior (); behavior.ApplyDispatchBehaviorBegin += delegate { @@ -103,7 +103,7 @@ namespace MonoTests.System.ServiceModel.Web [Test] public void ServiceBaseUriTest () { - var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:8080/")); + var host = new WebServiceHost (typeof (MyService), new Uri ("http://localhost:30158/")); Assert.AreEqual (0, host.Description.Endpoints.Count, "no endpoints yet"); host.Open (); Assert.AreEqual (1, host.Description.Endpoints.Count, "default endpoint after open"); @@ -136,4 +136,4 @@ namespace MonoTests.System.ServiceModel.Web } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs index 50ae808fcb..d145ed18e4 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelFactory.cs @@ -52,11 +52,7 @@ namespace System.ServiceModel.Channels MessageEncoder = CreateEncoder (mbe); continue; } -#if NET_2_1 - var cbe = be as HttpCookieContainerBindingElement; - if (cbe != null) - cookie_manager = cbe.GetProperty (ctx); -#elif NET_4_0 +#if NET_2_1 || NET_4_0 var tbe = be as HttpTransportBindingElement; if (tbe != null) cookie_manager = tbe.GetProperty (ctx); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs index 8f0be289fd..35cd408af1 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/MetadataExchangeBindingsTest.cs @@ -69,7 +69,7 @@ namespace MonoTests.System.ServiceModel.Description Assert.AreEqual (MessageVersion.Soap12WSAddressing10, b.GetProperty (new BindingParameterCollection ()), "#6"); var host = new ServiceHost (typeof (MetadataExchange)); - host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:8080")); + host.AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings.CreateMexHttpBinding (), CreateUri ("http://localhost:30158")); host.Open (); try { // it still does not rewrite MessageVersion.None. It's rather likely ServiceMetadataExtension which does overwriting. @@ -96,7 +96,7 @@ namespace MonoTests.System.ServiceModel.Description Assert.AreEqual(Uri.UriSchemeHttps, b.Scheme, "#8"); var host = new ServiceHost(typeof(MetadataExchange)); - host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:8080")); + host.AddServiceEndpoint(typeof(IMetadataExchange), MetadataExchangeBindings.CreateMexHttpsBinding(), CreateUri("https://localhost:30158")); host.Open(); try { diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs index 38bece2f99..a4a22cb18d 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Description/ServiceMetadataBehaviorTest.cs @@ -56,7 +56,7 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void InitializeRuntime1 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), "e1"); host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true }); @@ -93,10 +93,10 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void InitializeRuntime2 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex_and_help") }); - host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:8080/mex_and_help"); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex_and_help") }); + host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:30158/mex_and_help"); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -125,10 +125,10 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void InitializeRuntime3 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); - host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:8080/help"); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); + host.Description.Behaviors.Find ().HttpHelpPageUrl = new Uri ("http://localhost:30158/help"); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -176,9 +176,9 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void InitializeRuntime4 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); Assert.AreEqual (0, host.ChannelDispatchers.Count, "ChannelDispatchers.Count #1"); @@ -204,7 +204,7 @@ namespace MonoTests.System.ServiceModel.Description Assert.AreEqual (0, ed.FilterPriority, "FilterPriority"); EndpointAddress ea = ed.EndpointAddress; - Assert.AreEqual (new Uri ("http://localhost:8080/mex"), ea.Uri, "Uri"); + Assert.AreEqual (new Uri ("http://localhost:30158/mex"), ea.Uri, "Uri"); DispatchRuntime dr = ed.DispatchRuntime; Assert.AreEqual (1, dr.Operations.Count, "Operations.Count"); @@ -221,9 +221,9 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void ServiceMetadataExtension1 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); host.Open (); @@ -237,9 +237,9 @@ namespace MonoTests.System.ServiceModel.Description [Test] public void ServiceMetadataExtension2 () { - using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:8080"))) { + using (ServiceHost host = new ServiceHost (typeof (MyService), new Uri ("http://localhost:30158"))) { host.AddServiceEndpoint (typeof (IMyContract), new BasicHttpBinding (), ""); - host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:8080/mex") }); + host.Description.Behaviors.Add (new ServiceMetadataBehavior () { HttpGetEnabled = true, HttpGetUrl = new Uri ("http://localhost:30158/mex") }); host.Description.Behaviors.Remove (); ServiceMetadataExtension extension = new ServiceMetadataExtension (); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs index adff5706c8..3607b4f2a0 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Dispatcher/DispatchRuntimeTest.cs @@ -53,7 +53,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher // free to change if MS implementation does not make // sense. DispatchRuntime r = new EndpointDispatcher ( - new EndpointAddress ("http://localhost:8080"), "IFoo", "urn:foo").DispatchRuntime; + new EndpointAddress ("http://localhost:30158"), "IFoo", "urn:foo").DispatchRuntime; Assert.AreEqual (AuditLogLocation.Default, r.SecurityAuditLogLocation, "#1"); @@ -153,7 +153,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher void TestInstanceBehavior (MessageInspectBehavior b, string expected, Result actual, int invocations) { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); try { h.AddServiceEndpoint (typeof (IAllActions).FullName, new BasicHttpBinding (), "AllActions"); h.Description.Behaviors.Add (b); @@ -167,7 +167,7 @@ namespace MonoTests.System.ServiceModel.Dispatcher Assert.AreEqual (typeof (AllActions), ed.DispatchRuntime.Type, "Type property: " + ed.ContractName); } } - AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:8080/AllActions")); + AllActionsProxy p = new AllActionsProxy (new BasicHttpBinding () { SendTimeout = TimeSpan.FromSeconds (5), ReceiveTimeout = TimeSpan.FromSeconds (5) }, new EndpointAddress ("http://localhost:30158/AllActions")); for (int i = 0; i < invocations; ++i) p.Get (10); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs index a6bc6c5e6f..593ded1b01 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs @@ -30,6 +30,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers } [Test] + [Category ("NotWorking")] public void CloseTest () { cprs.Open (); @@ -79,6 +80,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers [Test] [ExpectedException (typeof (InvalidOperationException))] + [Category ("NotWorking")] public void OpenTest4 () { cprs.Open (); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs index 427127e946..70efef2761 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ChannelFactory_1Test.cs @@ -483,12 +483,12 @@ namespace MonoTests.System.ServiceModel var host = new ServiceHost (typeof (OneWayService)); host.AddServiceEndpoint (typeof (IOneWayService), new BasicHttpBinding (), - new Uri ("http://localhost:8080")); + new Uri ("http://localhost:30158")); host.Open (); try { var cf = new ChannelFactory ( new BasicHttpBinding (), - new EndpointAddress ("http://localhost:8080")); + new EndpointAddress ("http://localhost:30158")); var ch = cf.CreateChannel (); ch.GiveMessage ("test"); diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs index a5684e24b5..d73d516cbb 100644 --- a/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs +++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel/ServiceHostBaseTest.cs @@ -159,7 +159,7 @@ namespace MonoTests.System.ServiceModel [Test] public void ChannelDispatchers_NoDebug () { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address"); ServiceDebugBehavior b = h.Description.Behaviors.Find (); @@ -173,7 +173,7 @@ namespace MonoTests.System.ServiceModel Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#2"); EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter; Assert.IsNotNull (filter, "#3"); - Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080/address")), "#4"); + Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158/address")), "#4"); Assert.IsFalse (filter.IncludeHostNameInComparison, "#5"); Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#6"); } finally { @@ -183,11 +183,11 @@ namespace MonoTests.System.ServiceModel [Test] public void ChannelDispatchers_WithDebug () { - ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (AllActions), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (AllActions).FullName, new BasicHttpBinding (), "address"); ServiceMetadataBehavior b = new ServiceMetadataBehavior (); b.HttpGetEnabled = true; - b.HttpGetUrl = new Uri( "http://localhost:8080" ); + b.HttpGetUrl = new Uri( "http://localhost:30158" ); h.Description.Behaviors.Add (b); h.Open (); @@ -197,7 +197,7 @@ namespace MonoTests.System.ServiceModel Assert.IsTrue (channelDispatcher.Endpoints.Count == 1, "#3"); EndpointAddressMessageFilter filter = channelDispatcher.Endpoints [0].AddressFilter as EndpointAddressMessageFilter; Assert.IsNotNull (filter, "#4"); - Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:8080")), "#5"); + Assert.IsTrue (filter.Address.Equals (new EndpointAddress ("http://localhost:30158")), "#5"); Assert.IsFalse (filter.IncludeHostNameInComparison, "#6"); Assert.IsTrue (channelDispatcher.Endpoints [0].ContractFilter is MatchAllMessageFilter, "#7"); h.Close (); @@ -207,7 +207,7 @@ namespace MonoTests.System.ServiceModel public void SpecificActionTest () { //EndpointDispatcher d = new EndpointDispatcher( - ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "address"); h.Open (); @@ -222,7 +222,7 @@ namespace MonoTests.System.ServiceModel [Test] public void InitializeRuntimeBehaviors1 () { HostState st = new HostState (); - ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction2), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (SpecificAction2), new BasicHttpBinding (), "temp"); h.Description.Behaviors.Add (new MyServiceBehavior (st, h)); @@ -241,7 +241,7 @@ namespace MonoTests.System.ServiceModel [Test] public void InitializeRuntimeBehaviors2 () { HostState st = new HostState (); - ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:8080")); + ServiceHost h = new ServiceHost (typeof (SpecificAction), new Uri ("http://localhost:30158")); h.AddServiceEndpoint (typeof (Action1Interface), new BasicHttpBinding (), "temp"); h.AddServiceEndpoint (typeof (Action2Interface), new BasicHttpBinding (), "temp2"); @@ -368,7 +368,7 @@ namespace MonoTests.System.ServiceModel public void AddServiceEndpoint_Directly () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var binding = new BasicHttpBinding (); var contract = ContractDescription.GetContract (typeof (IDummyService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address)); @@ -389,7 +389,7 @@ namespace MonoTests.System.ServiceModel public void AddServiceEndpoint_Directly_NullBinding () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var contract = ContractDescription.GetContract (typeof (IDummyService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, null, address)); } @@ -407,7 +407,7 @@ namespace MonoTests.System.ServiceModel public void AddServiceEndpoint_Directly_ContractMismatch () { var host = new ServiceHost (typeof (DummyService)); - var address = new EndpointAddress ("http://localhost:8080"); + var address = new EndpointAddress ("http://localhost:30158"); var binding = new BasicHttpBinding (); var contract = ContractDescription.GetContract (typeof (INotImplementedService)); host.AddServiceEndpoint (new ServiceEndpoint (contract, binding, address)); diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs index f8f65c52e8..70e6fc9beb 100644 --- a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs +++ b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs @@ -180,16 +180,20 @@ namespace System.Web.Script.Serialization return c.ConvertFrom (obj); } - /* - * Take care of the special case whereas in JSON an empty string ("") really means - * an empty value - * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836) - */ - if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition() == typeof(Nullable<>))) - { - string s = obj as String; - if (String.IsNullOrEmpty(s)) + if ((targetType.IsGenericType) && (targetType.GetGenericTypeDefinition () == typeof (Nullable<>))) { + if (obj is String) { + /* + * Take care of the special case whereas in JSON an empty string ("") really means + * an empty value + * (see: https://bugzilla.novell.com/show_bug.cgi?id=328836) + */ + if(String.IsNullOrEmpty ((String)obj)) return null; + } else if (c.CanConvertFrom (typeof (string))) { + TypeConverter objConverter = TypeDescriptor.GetConverter (obj); + string s = objConverter.ConvertToInvariantString (obj); + return c.ConvertFromInvariantString (s); + } } return Convert.ChangeType (obj, targetType); diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs index 5883104a95..995590eeb2 100644 --- a/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs +++ b/mcs/class/System.Web.Extensions/Test/System.Web.Script.Serialization/JavaScriptSerializerTest.cs @@ -1365,5 +1365,28 @@ namespace MonoTests.System.Web.Script.Serialization var ret2vad = (IDictionary) ret2va [0]; Assert.AreEqual ("subval", ret2vad ["subkey"], "#2.4"); } + + class ClassWithNullableEnum + { + public MyEnum? Value { get; set; } + } + + [Test] + public void DeserializeNullableEnum () + { + var jsonValues = new Dictionary { + { "{\"Value\":0}", MyEnum.AAA}, + { "{\"Value\":\"0\"}", MyEnum.AAA}, + { "{\"Value\":null}", null} + }; + + var ser = new JavaScriptSerializer (); + + foreach (var kv in jsonValues) + { + var obj = ser.Deserialize (kv.Key); + Assert.AreEqual (kv.Value, obj.Value); + } + } } } diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs index ad18b88a3c..2491c9035d 100644 --- a/mcs/class/System.Web/System.Web/HttpResponse.cs +++ b/mcs/class/System.Web/System.Web/HttpResponse.cs @@ -446,7 +446,7 @@ namespace System.Web } [MonoTODO ("Not implemented")] - public void AddCacheDependency (CacheDependency[] dependencies) + public void AddCacheDependency (params CacheDependency[] dependencies) { throw new NotImplementedException (); } diff --git a/mcs/class/System.Web/System.Web/MimeTypes.cs b/mcs/class/System.Web/System.Web/MimeTypes.cs index 82ce306f60..8b7bfcadf7 100644 --- a/mcs/class/System.Web/System.Web/MimeTypes.cs +++ b/mcs/class/System.Web/System.Web/MimeTypes.cs @@ -195,6 +195,7 @@ namespace System.Web mimeTypes.Add ("htx", "text/html"); mimeTypes.Add ("ice", "x-conference/x-cooltalk"); mimeTypes.Add ("ico", "image/x-icon"); + mimeTypes.Add ("ics", "text/calendar"); mimeTypes.Add ("idc", "text/plain"); mimeTypes.Add ("ief", "image/ief"); mimeTypes.Add ("iefs", "image/ief"); @@ -271,11 +272,11 @@ namespace System.Web mimeTypes.Add ("mme", "application/base64"); mimeTypes.Add ("mny", "application/x-msmoney"); mimeTypes.Add ("mod", "audio/mod"); - mimeTypes.Add ("moov", "video/quicktime"); - mimeTypes.Add ("movie", "video/x-sgi-movie"); mimeTypes.Add ("mov", "video/quicktime"); + mimeTypes.Add ("movie", "video/x-sgi-movie"); + mimeTypes.Add ("moov", "video/quicktime"); mimeTypes.Add ("mp2", "video/mpeg"); - mimeTypes.Add ("mp3", "audio/mpeg3"); + mimeTypes.Add ("mp3", "audio/mpeg"); mimeTypes.Add ("mp4", "video/mp4"); //mimeTypes.Add ("mp4a", "audio/mp4"); // A common but unofficial alternative to m4a mimeTypes.Add ("mpa", "audio/mpeg"); diff --git a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs index d2bd8ce643..1440358de4 100644 --- a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs @@ -135,8 +135,8 @@ namespace MonoTests.System.Web.Caching static readonly byte[] badSubstitutionResponseElement = { 0x0, 0x1, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC, 0x2, 0x0, 0x0, 0x0, 0x4D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2C, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x30, 0x2C, 0x20, 0x43, 0x75, 0x6C, 0x74, 0x75, 0x72, 0x65, 0x3D, 0x6E, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6C, 0x2C, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, 0x65, 0x79, 0x54, 0x6F, 0x6B, 0x65, 0x6E, 0x3D, 0x62, 0x30, 0x33, 0x66, 0x35, 0x66, 0x37, 0x66, 0x31, 0x31, 0x64, 0x35, 0x30, 0x61, 0x33, 0x61, 0x5, 0x1, 0x0, 0x0, 0x0, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x52, 0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x2, 0x0, 0x0, 0x0, 0xF, 0x5F, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4E, 0x61, 0x6D, 0x65, 0xB, 0x5F, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x4E, 0x61, 0x6D, 0x65, 0x1, 0x1, 0x2, 0x0, 0x0, 0x0, 0x6, 0x3, 0x0, 0x0, 0x0, 0x41, 0x4D, 0x6F, 0x6E, 0x6F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x4F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2C, 0x20, 0x44, 0x6F, 0x74, 0x4E, 0x65, 0x74, 0x34, 0x5F, 0x4E, 0x55, 0x6E, 0x69, 0x74, 0x5F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x6, 0x4, 0x0, 0x0, 0x0, 0x1C, 0x44, 0x75, 0x6D, 0x6D, 0x79, 0x42, 0x61, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x43, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0xB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; #else #if NET_4_5 - static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; - static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; + static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xA,0x0,0x0,0x0,0x9,0xB,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xC,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; + static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xD,0x0,0x0,0x0,0x9,0xE,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xF,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; #else static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; @@ -208,7 +208,7 @@ namespace MonoTests.System.Web.Caching AssertExtensions.AreEqual (bytes, substitutionResponseElement, "#B3"); bytes = SerializeElement (sreBad); - AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B3"); + AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B4"); } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs index db2ea35666..1990089323 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs @@ -165,7 +165,6 @@ namespace MonoTests.System.Web.UI.Adapters pd.SaveStateComplete = RenderPostBackEvent_OnSaveStateComplete; t.Invoker = new PageInvoker (pd); string html = t.Run (); - File.WriteAllText("response.html", html); } public static void RenderPostBackEvent_OnSaveStateComplete (Page p) diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs index 0b1254fa5e..03ced5c391 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.cs @@ -18,11 +18,6 @@ namespace MonoTests.SystemWeb.Framework { internal class MyHost : MarshalByRefObject { - AutoResetEvent _done; - AutoResetEvent _doNext; - WebTest _currentTest; - Exception _e; - #region MyData class MyData { @@ -30,40 +25,12 @@ namespace MonoTests.SystemWeb.Framework public Exception exception; } #endregion - - public MyHost () - { - _done = new AutoResetEvent (false); - _doNext = new AutoResetEvent (false); - ThreadPool.QueueUserWorkItem (new WaitCallback (param => { - try { - AsyncRun (param); - } catch {} - }), null); - } public AppDomain AppDomain { get { return AppDomain.CurrentDomain; } } public WebTest Run (WebTest t) { - _currentTest = t; - _doNext.Set (); - _done.WaitOne (); - if (_e != null) { - Exception e = _e; - _e = null; - throw e; - } - return t; - } - - void AsyncRun (object param) - { - for (;;) { - _doNext.WaitOne (); - try { - WebTest t = _currentTest; HttpWorkerRequest wr = t.Request.CreateWorkerRequest (); MyData data = GetMyData (wr); data.currentTest = t; @@ -74,12 +41,8 @@ namespace MonoTests.SystemWeb.Framework if (data.exception != null) RethrowException (data.exception); - } catch (Exception e) { - _e = e; - } - - _done.Set (); - } + + return t; } private static void RethrowException (Exception inner) diff --git a/mcs/class/System.XML/Makefile b/mcs/class/System.XML/Makefile index 2160578776..c52a56468f 100644 --- a/mcs/class/System.XML/Makefile +++ b/mcs/class/System.XML/Makefile @@ -65,8 +65,8 @@ EXTRA_DISTFILES = \ $(xmlfiles_files:%=Test/XmlFiles/%) \ $(nist_dom_files:%=Test/System.Xml/nist_dom/%) -System.Xml.XPath/Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs - (cd System.Xml.XPath; $(topdir)/../jay/jay -ct < $(topdir)/../jay/skeleton.cs Parser.jay >> Parser.cs) +System.Xml.XPath/$(PROFILE)_Parser.cs: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs + (cd System.Xml.XPath; $(topdir)/../jay/jay -ct < $(topdir)/../jay/skeleton.cs Parser.jay >> $(PROFILE)_Parser.cs) Mono.Xml.Xsl/$(PROFILE)_PatternParser.jay: System.Xml.XPath/Parser.jay $(topdir)/jay/skeleton.cs sed "s/\%start Expr/\%start Pattern/" $< >$@ @@ -80,12 +80,12 @@ Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs: System.Xml.XPath/Tokenizer.cs cat $< >>$@ ifneq (moonlight_raw, $(PROFILE)) -BUILT_SOURCES = System.Xml.XPath/Parser.cs \ +BUILT_SOURCES = System.Xml.XPath/$(PROFILE)_Parser.cs \ Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \ Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs CLEAN_FILES = Test/XmlFiles/xsl/result.xml \ - System.Xml.XPath/Parser.cs \ + System.Xml.XPath/$(PROFILE)_Parser.cs \ Mono.Xml.Xsl/$(PROFILE)_PatternParser.cs \ Mono.Xml.Xsl/$(PROFILE)_PatternTokenizer.cs endif diff --git a/mcs/class/System.Xaml/Makefile b/mcs/class/System.Xaml/Makefile index 04ad2dda79..17d1613291 100644 --- a/mcs/class/System.Xaml/Makefile +++ b/mcs/class/System.Xaml/Makefile @@ -18,7 +18,7 @@ TEST_EXTRA_DISTFILES = \ Test/XmlFiles/*.xml \ Test/XmlFiles/*.xaml -VALID_PROFILE := $(filter 4, $(FRAMEWORK_VERSION_MAJOR)) +VALID_PROFILE := $(filter 4 monodroid monotouch, $(FRAMEWORK_VERSION_MAJOR)) ifndef VALID_PROFILE LIBRARY_NAME = dummy-System.Xaml.dll NO_INSTALL = yes diff --git a/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs index ff55aefc7c..003f0c789e 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/AmbientAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class AmbientAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs index 7a99b79601..e3da18695d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ArrayExtension.cs @@ -32,9 +32,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Array))] [ContentProperty ("Items")] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class ArrayExtension : MarkupExtension { public ArrayExtension () @@ -62,9 +60,7 @@ namespace System.Windows.Markup public Type Type { get; set; } IList items; -#if !NET_2_1 [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)] -#endif public IList Items { get { return items; } } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs index 69a8b3f0ba..7708fe7c07 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ConstructorArgumentAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Property, AllowMultiple = false, Inherited = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ConstructorArgumentAttribute : Attribute { public ConstructorArgumentAttribute (string argumentName) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs index f772a2bd82..5b3c078b70 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ContentPropertyAttribute.cs @@ -29,9 +29,7 @@ namespace System.Windows.Markup // member regardless of this attribute. [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ContentPropertyAttribute : Attribute { public ContentPropertyAttribute () diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs index 12e10c5e15..d64a2a9645 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ContentWrapperAttribute : Attribute { public ContentWrapperAttribute (Type contentWrapper) @@ -36,7 +34,8 @@ namespace System.Windows.Markup } public Type ContentWrapper { get; private set; } -#if !NET_2_1 + +#if !__MOBILE__ public override Object TypeId { get { return this; } } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs b/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs index 5556e7f43c..720a3517dc 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DateTimeValueSerializer.cs @@ -28,9 +28,7 @@ using System.Globalization; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public class DateTimeValueSerializer : ValueSerializer { const DateTimeStyles styles = DateTimeStyles.RoundtripKind | DateTimeStyles.NoCurrentDateDefault | DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite; diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs index f49ce4fb5b..361df14ed6 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DependsOnAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class DependsOnAttribute : Attribute { public DependsOnAttribute (string name) @@ -37,7 +35,7 @@ namespace System.Windows.Markup public string Name { get; private set; } -#if !NET_2_1 +#if !__MOBILE__ // really? I doubt it should be overriden. public override Object TypeId { get { return this; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs index df7f4482bd..1664fe23a8 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/DictionaryKeyPropertyAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class DictionaryKeyPropertyAttribute : Attribute { public DictionaryKeyPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs b/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs index 8b143b9279..5e6081628f 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IComponentConnector.cs @@ -28,9 +28,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IComponentConnector { void Connect (int connectionId, object target); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs b/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs index 5c142ec0af..3035a7cbc1 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/INameScope.cs @@ -25,9 +25,7 @@ using System.Collections.Generic; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface INameScope { object FindName (string name); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs b/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs index 65c124bfc3..6a44ce005d 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IProvideValueTarget.cs @@ -28,9 +28,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public interface IProvideValueTarget { object TargetObject { get; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs b/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs index 7ace4b70cd..252ab6964c 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IUriContext.cs @@ -28,9 +28,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationCore_3_5)] -#endif public interface IUriContext { Uri BaseUri { get; set; } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs b/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs index 011c32e983..bfc1e0a372 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IValueSerializerContext.cs @@ -29,9 +29,7 @@ using System.Xaml; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IValueSerializerContext : ITypeDescriptorContext, IServiceProvider { ValueSerializer GetValueSerializerFor (PropertyDescriptor descriptor); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs b/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs index c78be09747..563387c842 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/IXamlTypeResolver.cs @@ -28,9 +28,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public interface IXamlTypeResolver { Type Resolve (string qualifiedTypeName); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs index 9277a3ca7a..f79cefd6e0 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/MarkupExtension.cs @@ -29,9 +29,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public abstract class MarkupExtension { public abstract object ProvideValue (IServiceProvider serviceProvider); diff --git a/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs index 3ecd55b200..8e33e017cf 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/NameScopePropertyAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class NameScopePropertyAttribute : Attribute { public NameScopePropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs index 9aef4b4d78..19cd2cbf59 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/NullExtension.cs @@ -29,9 +29,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Object))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class NullExtension : MarkupExtension { public override Object ProvideValue (IServiceProvider serviceProvider) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs index 392968b432..040f1945a7 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/RootNamespaceAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class RootNamespaceAttribute : Attribute { public RootNamespaceAttribute (string nameSpace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs index ccd2cbc95b..44c3706b50 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/RuntimeNamePropertyAttribute.cs @@ -25,9 +25,7 @@ using System; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class RuntimeNamePropertyAttribute : Attribute { public RuntimeNamePropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs index 465ba56521..24df4f5a16 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/StaticExtension.cs @@ -30,9 +30,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (object))] [TypeConverter (typeof (StaticExtensionConverter))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class StaticExtension : MarkupExtension { public StaticExtension () diff --git a/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs index bf4309d6e3..371e3e06f8 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/TrimSurroundingWhitespaceAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class TrimSurroundingWhitespaceAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs b/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs index 00af705581..42da7a1378 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/TypeExtension.cs @@ -30,9 +30,7 @@ namespace System.Windows.Markup { [MarkupExtensionReturnType (typeof (Type))] [TypeConverter (typeof (TypeExtensionConverter))] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyPresentationFramework_3_5)] -#endif public class TypeExtension : MarkupExtension { public TypeExtension () @@ -56,9 +54,7 @@ namespace System.Windows.Markup [ConstructorArgument ("type")] [DefaultValue (null)] public Type Type { get; set; } -#if !NET_2_1 [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] -#endif public string TypeName { get; set; } public override object ProvideValue (IServiceProvider serviceProvider) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs index bd66ca2614..1898e16a20 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/UidPropertyAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class UidPropertyAttribute : Attribute { public UidPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs index bee7ad6590..45adefabec 100644 --- a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializer.cs @@ -32,24 +32,19 @@ using System.Xaml.Schema; namespace System.Windows.Markup { -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public abstract class ValueSerializer { -#if !NET_2_1 public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor) { return GetSerializerFor (descriptor, null); } -#endif public static ValueSerializer GetSerializerFor (Type type) { return GetSerializerFor (type, null); } -#if !NET_2_1 // untested public static ValueSerializer GetSerializerFor (PropertyDescriptor descriptor, IValueSerializerContext context) { @@ -63,7 +58,6 @@ namespace System.Windows.Markup return new TypeConverterValueSerializer (tc); return null; } -#endif public static ValueSerializer GetSerializerFor (Type type, IValueSerializerContext context) { diff --git a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs index fdb4e951e2..37dec5262a 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/ValueSerializerAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Interface, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class ValueSerializerAttribute : Attribute { public ValueSerializerAttribute (string valueSerializerTypeName) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs index 893d79c1aa..36cdf56aa2 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/WhitespaceSignificantCollectionAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class WhitespaceSignificantCollectionAttribute : Attribute { } diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs index 18978a8464..4789120383 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlLangPropertyAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Class, AllowMultiple = false)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlLangPropertyAttribute : Attribute { public XmlLangPropertyAttribute (string name) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs index e77ae35972..0e16db2f15 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsCompatibleWithAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsCompatibleWithAttribute : Attribute { public XmlnsCompatibleWithAttribute (string oldNamespace, string newNamespace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs index 078623fb08..81be2dae73 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsDefinitionAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsDefinitionAttribute : Attribute { public XmlnsDefinitionAttribute (string xmlNamespace, string clrNamespace) diff --git a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs index 4bdf0d97af..c907c8eb42 100755 --- a/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs +++ b/mcs/class/System.Xaml/System.Windows.Markup/XmlnsPrefixAttribute.cs @@ -31,9 +31,7 @@ using System.Xaml.Schema; namespace System.Windows.Markup { [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] -#if !NET_2_1 [System.Runtime.CompilerServices.TypeForwardedFrom (Consts.AssemblyWindowsBase)] -#endif public sealed class XmlnsPrefixAttribute : Attribute { public XmlnsPrefixAttribute (string xmlNamespace, string prefix) diff --git a/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs b/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs index e65e23faf1..10e1858726 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlDuplicateMemberException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlDuplicateMemberException : XamlException { public XamlDuplicateMemberException () @@ -54,25 +52,21 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlDuplicateMemberException (SerializationInfo info, StreamingContext context) : base (info, context) { DuplicateMember = (XamlMember) info.GetValue ("member", typeof (XamlMember)); ParentType = (XamlType) info.GetValue ("type", typeof (XamlType)); } -#endif public XamlMember DuplicateMember { get; set; } public XamlType ParentType { get; set; } -#if !NET_2_1 public override void GetObjectData (SerializationInfo info, StreamingContext context) { base.GetObjectData (info, context); info.AddValue ("member", DuplicateMember); info.AddValue ("type", ParentType); } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlException.cs b/mcs/class/System.Xaml/System.Xaml/XamlException.cs index ecccbb4ced..669b2245ec 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlException : Exception { public XamlException () @@ -63,14 +61,12 @@ namespace System.Xaml LinePosition = linePosition; } -#if !NET_2_1 protected XamlException (SerializationInfo info, StreamingContext context) : base (info, context) { LineNumber = info.GetInt32 ("lineNumber"); LinePosition = info.GetInt32 ("linePosition"); } -#endif public int LineNumber { get; protected internal set; } public int LinePosition { get; protected internal set; } @@ -78,12 +74,10 @@ namespace System.Xaml get { return FormatLine (base.Message, LineNumber, LinePosition); } } -#if !NET_2_1 public override void GetObjectData (SerializationInfo info, StreamingContext context) { info.AddValue ("lineNumber", LineNumber); info.AddValue ("linePosition", LinePosition); } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs b/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs index a24cffe420..d98aa4c4df 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlInternalException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlInternalException : XamlException { public XamlInternalException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlInternalException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlMember.cs b/mcs/class/System.Xaml/System.Xaml/XamlMember.cs index 7b85eb322d..ad03cbf628 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlMember.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlMember.cs @@ -166,7 +166,6 @@ namespace System.Xaml get { return directive_ns ?? (DeclaringType == null ? null : DeclaringType.PreferredXamlNamespace); } } -#if !NET_2_1 public DesignerSerializationVisibility SerializationVisibility { get { var c= GetCustomAttributeProvider (); @@ -174,7 +173,6 @@ namespace System.Xaml return a != null ? a.Visibility : DesignerSerializationVisibility.Visible; } } -#endif public bool IsAttachable { get { return is_attachable; } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs index 89c64fe1ad..0bad880d68 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectReaderException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlObjectReaderException : XamlException { public XamlObjectReaderException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlObjectReaderException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs index b5ce0b3b80..17708cc034 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlObjectWriterException : XamlException { public XamlObjectWriterException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlObjectWriterException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs index 4ecbe75e6f..a46dded4ed 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlObjectWriterSettings.cs @@ -25,7 +25,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Windows.Markup; -#if !NET_2_1 +#if !__MOBILE__ using System.Xaml.Permissions; #endif using System.Xaml.Schema; @@ -42,7 +42,7 @@ namespace System.Xaml : base (settings) { var s = settings; -#if !NET_2_1 +#if !__MOBILE__ AccessLevel = s.AccessLevel; #endif AfterBeginInitHandler = s.AfterBeginInitHandler; @@ -65,7 +65,7 @@ namespace System.Xaml public EventHandler BeforePropertiesHandler { get; set; } public EventHandler XamlSetValueHandler { get; set; } -#if !NET_2_1 +#if !__MOBILE__ [MonoTODO ("Ignored")] public XamlAccessLevel AccessLevel { get; set; } #endif diff --git a/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs b/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs index 1ae1667b53..4bb8340a48 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlParseException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlParseException : XamlException { public XamlParseException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlParseException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs b/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs index de31e46de2..64cf91ea71 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlSchemaContext.cs @@ -57,10 +57,8 @@ namespace System.Xaml { if (referenceAssemblies != null) reference_assemblies = new List (referenceAssemblies); -#if !NET_2_1 else AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoaded; -#endif if (settings == null) return; @@ -69,13 +67,11 @@ namespace System.Xaml SupportMarkupExtensionsWithDuplicateArity = settings.SupportMarkupExtensionsWithDuplicateArity; } -#if !NET_2_1 ~XamlSchemaContext () { if (reference_assemblies == null) AppDomain.CurrentDomain.AssemblyLoad -= OnAssemblyLoaded; } -#endif IList reference_assemblies; @@ -255,7 +251,6 @@ namespace System.Xaml return compat_nss.TryGetValue (xamlNamespace, out compatibleNamespace); } -#if !NET_2_1 void OnAssemblyLoaded (object o, AssemblyLoadEventArgs e) { if (reference_assemblies != null) @@ -270,8 +265,7 @@ namespace System.Xaml if (all_xaml_types != null) FillAllXamlTypes (e.LoadedAssembly); } -#endif - + // cache updater methods void FillXamlNamespaces (Assembly ass) { diff --git a/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs b/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs index 9681927b39..78de4f8e48 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlSchemaException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlSchemaException : XamlException { public XamlSchemaException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlSchemaException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System.Xaml/System.Xaml/XamlServices.cs b/mcs/class/System.Xaml/System.Xaml/XamlServices.cs index cf686d8506..c8026d195a 100755 --- a/mcs/class/System.Xaml/System.Xaml/XamlServices.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlServices.cs @@ -71,13 +71,11 @@ namespace System.Xaml return sw.ToString (); } -#if !NET_2_1 public static void Save (string fileName, object instance) { using (var xw = XmlWriter.Create (fileName, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true })) Save (xw, instance); } -#endif public static void Save (Stream stream, object instance) { diff --git a/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs b/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs index d784b9df2d..ffa402cc7d 100644 --- a/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs +++ b/mcs/class/System.Xaml/System.Xaml/XamlXmlWriterException.cs @@ -27,9 +27,7 @@ using System.Runtime.Serialization; namespace System.Xaml { -#if !NET_2_1 [Serializable] -#endif public class XamlXmlWriterException : XamlException { public XamlXmlWriterException () @@ -47,11 +45,9 @@ namespace System.Xaml { } -#if !NET_2_1 protected XamlXmlWriterException (SerializationInfo info, StreamingContext context) : base (info, context) { } -#endif } } diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs index 829deeceda..4188a96c32 100644 --- a/mcs/class/System/System.Net.Mail/SmtpClient.cs +++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs @@ -550,8 +550,12 @@ namespace System.Net.Mail { MailAddress from = message.From; if (from == null) from = defaultFrom; - - SendHeader (HeaderName.Date, DateTime.Now.ToString ("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo)); + + string dt = DateTime.Now.ToString("ddd, dd MMM yyyy HH':'mm':'ss zzz", DateTimeFormatInfo.InvariantInfo); + // remove ':' from time zone offset (e.g. from "+01:00") + dt = dt.Remove(dt.Length - 3, 1); + SendHeader(HeaderName.Date, dt); + SendHeader (HeaderName.From, EncodeAddress(from)); SendHeader (HeaderName.To, EncodeAddresses(message.To)); if (message.CC.Count > 0) @@ -762,7 +766,7 @@ namespace System.Net.Mail { static void SendMailAsyncCompletedHandler (TaskCompletionSource source, AsyncCompletedEventArgs e, SendCompletedEventHandler handler, SmtpClient client) { - if (handler != e.UserState) + if ((object) handler != e.UserState) return; client.SendCompleted -= handler; diff --git a/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs b/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs index 940a993f7c..840fc53103 100644 --- a/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs +++ b/mcs/class/System/System.Net.NetworkInformation/MacOsNetworkInterfaceMarshal.cs @@ -79,4 +79,23 @@ namespace System.Net.NetworkInformation { LOOPBACK = 0x18, FDDI = 0xf } + + internal enum MacOsInterfaceFlags { + IFF_UP = 0x1, /* interface is up */ + IFF_BROADCAST = 0x2, /* broadcast address valid */ + IFF_DEBUG = 0x4, /* turn on debugging */ + IFF_LOOPBACK = 0x8, /* is a loopback net */ + IFF_POINTOPOINT = 0x10, /* interface is point-to-point link */ + IFF_NOTRAILERS = 0x20, /* avoid use of trailers */ + IFF_RUNNING = 0x40, /* resources allocated */ + IFF_NOARP = 0x80, /* no address resolution protocol */ + IFF_PROMISC = 0x100, /* receive all packets */ + IFF_ALLMULTI = 0x200, /* receive all multicast packets */ + IFF_OACTIVE = 0x400, /* transmission in progress */ + IFF_SIMPLEX = 0x800, /* can't hear own transmissions */ + IFF_LINK0 = 0x1000, /* per link layer defined bit */ + IFF_LINK1 = 0x2000, /* per link layer defined bit */ + IFF_LINK2 = 0x4000, /* per link layer defined bit */ + IFF_MULTICAST = 0x8000 /* supports multicast */ + } } diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs index 4ad2720909..18b3b47164 100644 --- a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs +++ b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs @@ -446,6 +446,8 @@ namespace System.Net.NetworkInformation { const int AF_INET = 2; const int AF_INET6 = 30; const int AF_LINK = 18; + + private uint _ifa_flags; public static NetworkInterface [] ImplGetAllNetworkInterfaces () { @@ -465,6 +467,7 @@ namespace System.Net.NetworkInformation { NetworkInterfaceType type = NetworkInterfaceType.Unknown; if (addr.ifa_addr != IntPtr.Zero) { + // optain IPAddress MacOsStructs.sockaddr sockaddr = (MacOsStructs.sockaddr) Marshal.PtrToStructure (addr.ifa_addr, typeof (MacOsStructs.sockaddr)); if (sockaddr.sa_family == AF_INET6) { @@ -478,7 +481,10 @@ namespace System.Net.NetworkInformation { sockaddrdl.Read (addr.ifa_addr); macAddress = new byte [(int) sockaddrdl.sdl_alen]; + // copy mac address from sdl_data field starting at last index pos of interface name into array macaddress, starting + // at index 0 Array.Copy (sockaddrdl.sdl_data, sockaddrdl.sdl_nlen, macAddress, 0, Math.Min (macAddress.Length, sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen)); + index = sockaddrdl.sdl_index; int hwtype = (int) sockaddrdl.sdl_type; @@ -515,14 +521,17 @@ namespace System.Net.NetworkInformation { MacOsNetworkInterface iface = null; + // create interface if not already present if (!interfaces.TryGetValue (name, out iface)) { - iface = new MacOsNetworkInterface (name); + iface = new MacOsNetworkInterface (name, addr.ifa_flags); interfaces.Add (name, iface); } + // if a new address has been found, add it if (!address.Equals (IPAddress.None)) iface.AddAddress (address); + // set link layer info, if iface has macaddress or is loopback device if (macAddress != null || type == NetworkInterfaceType.Loopback) iface.SetLinkLayerInfo (index, macAddress, type); @@ -541,9 +550,10 @@ namespace System.Net.NetworkInformation { return result; } - MacOsNetworkInterface (string name) + MacOsNetworkInterface (string name, uint ifa_flags) : base (name) { + _ifa_flags = ifa_flags; } public override IPInterfaceProperties GetIPProperties () @@ -562,13 +572,16 @@ namespace System.Net.NetworkInformation { public override OperationalStatus OperationalStatus { get { + if(((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_UP) == MacOsInterfaceFlags.IFF_UP){ + return OperationalStatus.Up; + } return OperationalStatus.Unknown; } } public override bool SupportsMulticast { get { - return false; + return ((MacOsInterfaceFlags)_ifa_flags & MacOsInterfaceFlags.IFF_MULTICAST) == MacOsInterfaceFlags.IFF_MULTICAST; } } } diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs index 609583a73f..a7eeb67d88 100644 --- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs +++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs @@ -231,7 +231,7 @@ namespace System.Net.Sockets else if (op == SocketAsyncOperation.Disconnect) args.DisconnectCallback (ares); else if (op == SocketAsyncOperation.Connect) - args.ConnectCallback (); + args.ConnectCallback (ares); /* else if (op == Socket.SocketOperation.ReceiveMessageFrom) else if (op == Socket.SocketOperation.SendPackets) @@ -254,10 +254,12 @@ namespace System.Net.Sockets } } - void ConnectCallback () + void ConnectCallback (IAsyncResult ares) { try { - SocketError = (SocketError) Worker.result.error; + curSocket.EndConnect (ares); + } catch (SocketException se) { + SocketError = se.SocketErrorCode; } finally { OnCompleted (this); } diff --git a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs index 11a7eda8a4..7616b88c78 100644 --- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs +++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs @@ -1253,7 +1253,7 @@ namespace System.Net.Sockets { throw new SocketException (error); } - if (socket_type == SocketType.Dgram && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))) + if (socket_type == SocketType.Dgram && ep != null && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))) connected = false; else connected = true; diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs index 3778c74053..bfa085885e 100644 --- a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs +++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs @@ -196,7 +196,30 @@ namespace System.Net.WebSockets underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None); }); } + + const int messageTypeText = 1; + const int messageTypeBinary = 2; + const int messageTypeClose = 8; + static WebSocketMessageType WireToMessageType (byte msgType) + { + + if (msgType == messageTypeText) + return WebSocketMessageType.Text; + if (msgType == messageTypeBinary) + return WebSocketMessageType.Binary; + return WebSocketMessageType.Close; + } + + static byte MessageTypeToWire (WebSocketMessageType type) + { + if (type == WebSocketMessageType.Text) + return messageTypeText; + if (type == WebSocketMessageType.Binary) + return messageTypeBinary; + return messageTypeClose; + } + public override Task ReceiveAsync (ArraySegment buffer, CancellationToken cancellationToken) { EnsureWebSocketConnected (); @@ -208,7 +231,7 @@ namespace System.Net.WebSockets var isLast = (headerBuffer[0] >> 7) > 0; var isMasked = (headerBuffer[1] >> 7) > 0; int mask = 0; - var type = (WebSocketMessageType)(headerBuffer[0] & 0xF); + var type = WireToMessageType ((byte)(headerBuffer[0] & 0xF)); long length = headerBuffer[1] & 0x7F; int offset = 0; if (length == 126) { @@ -279,7 +302,7 @@ namespace System.Net.WebSockets int WriteHeader (WebSocketMessageType type, ArraySegment buffer, bool endOfMessage) { - var opCode = (byte)type; + var opCode = MessageTypeToWire (type); var length = buffer.Count; headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0 : 0x80)); diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs index 50cbc003c0..f6cb2fc2a8 100644 --- a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs +++ b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs @@ -35,9 +35,9 @@ namespace System.Net.WebSockets { public enum WebSocketMessageType { - Text = 1, - Binary = 2, - Close = 8 + Text = 0, + Binary = 1, + Close = 2 } } diff --git a/mcs/class/System/System.Net/ChunkStream.cs b/mcs/class/System/System.Net/ChunkStream.cs index 1337fce4fc..addcc28907 100644 --- a/mcs/class/System/System.Net/ChunkStream.cs +++ b/mcs/class/System/System.Net/ChunkStream.cs @@ -39,6 +39,7 @@ namespace System.Net { enum State { None, + PartialSize, Body, BodyFinished, Trailer @@ -139,9 +140,9 @@ namespace System.Net void InternalWrite (byte [] buffer, ref int offset, int size) { - if (state == State.None) { + if (state == State.None || state == State.PartialSize) { state = GetChunkSize (buffer, ref offset, size); - if (state == State.None) + if (state == State.PartialSize) return; saved.Length = 0; @@ -262,7 +263,7 @@ namespace System.Net ThrowProtocolViolation ("Cannot parse chunk size."); } - return State.None; + return State.PartialSize; } chunkRead = 0; diff --git a/mcs/class/System/System.Net/DigestClient.cs b/mcs/class/System/System.Net/DigestClient.cs index be618771eb..f570a73965 100644 --- a/mcs/class/System/System.Net/DigestClient.cs +++ b/mcs/class/System/System.Net/DigestClient.cs @@ -181,7 +181,7 @@ namespace System.Net } value = header.Substring (beginQ, pos - beginQ); - pos += 2; + pos += useQuote ? 2 : 1; return true; } } diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs index 7ee338a0a2..97f9759dcc 100644 --- a/mcs/class/System/System.Net/WebClient.cs +++ b/mcs/class/System/System.Net/WebClient.cs @@ -1405,10 +1405,12 @@ namespace System.Net string data2 = UploadString ((Uri) args [0], (string) args [1], (string) args [2]); OnUploadStringCompleted ( new UploadStringCompletedEventArgs (data2, null, false, args [3])); - } catch (ThreadInterruptedException){ - OnUploadStringCompleted ( - new UploadStringCompletedEventArgs (null, null, true, args [3])); } catch (Exception e){ + if (e is ThreadInterruptedException || e.InnerException is ThreadInterruptedException) { + OnUploadStringCompleted ( + new UploadStringCompletedEventArgs (null, null, true, args [3])); + return; + } OnUploadStringCompleted ( new UploadStringCompletedEventArgs (null, e, false, args [3])); }}); diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs index 54af1f4499..0f35c49b3e 100644 --- a/mcs/class/System/System.Net/WebConnection.cs +++ b/mcs/class/System/System.Net/WebConnection.cs @@ -356,8 +356,6 @@ namespace System.Net byte [] buffer = new byte [1024]; MemoryStream ms = new MemoryStream (); - bool gotStatus = false; - WebHeaderCollection headers = null; while (true) { int n = stream.Read (buffer, 0, 1024); @@ -369,7 +367,8 @@ namespace System.Net ms.Write (buffer, 0, n); int start = 0; string str = null; - headers = new WebHeaderCollection (); + bool gotStatus = false; + WebHeaderCollection headers = new WebHeaderCollection (); while (ReadLine (ms.GetBuffer (), ref start, (int) ms.Length, ref str)) { if (str == null) { int contentLen = 0; @@ -399,13 +398,22 @@ namespace System.Net continue; } - int spaceidx = str.IndexOf (' '); - if (spaceidx == -1) { + string[] parts = str.Split (' '); + if (parts.Length < 2) { HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2"); return null; } - status = (int) UInt32.Parse (str.Substring (spaceidx + 1, 3)); + if (String.Compare (parts [0], "HTTP/1.1", true) == 0) + Data.ProxyVersion = HttpVersion.Version11; + else if (String.Compare (parts [0], "HTTP/1.0", true) == 0) + Data.ProxyVersion = HttpVersion.Version10; + else { + HandleError (WebExceptionStatus.ServerProtocolViolation, null, "ReadHeaders2"); + return null; + } + + status = (int)UInt32.Parse (parts [1]); gotStatus = true; } } @@ -841,6 +849,8 @@ namespace System.Net string header = (sPoint.UsesProxy) ? "Proxy-Connection" : "Connection"; string cncHeader = (Data.Headers != null) ? Data.Headers [header] : null; bool keepAlive = (Data.Version == HttpVersion.Version11 && this.keepAlive); + if (Data.ProxyVersion != null && Data.ProxyVersion != HttpVersion.Version11) + keepAlive = false; if (cncHeader != null) { cncHeader = cncHeader.ToLower (); keepAlive = (this.keepAlive && cncHeader.IndexOf ("keep-alive", StringComparison.Ordinal) != -1); diff --git a/mcs/class/System/System.Net/WebConnectionData.cs b/mcs/class/System/System.Net/WebConnectionData.cs index 216b57f16c..77d19540be 100644 --- a/mcs/class/System/System.Net/WebConnectionData.cs +++ b/mcs/class/System/System.Net/WebConnectionData.cs @@ -39,6 +39,7 @@ namespace System.Net public string StatusDescription; public WebHeaderCollection Headers; public Version Version; + public Version ProxyVersion; public Stream stream; public string[] Challenge; ReadState _readState; diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs index 701b4c534d..229999df71 100644 --- a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs +++ b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Certificate2.cs @@ -428,7 +428,19 @@ namespace System.Security.Cryptography.X509Certificates { private MX.X509Certificate ImportPkcs12 (byte[] rawData, string password) { - MX.PKCS12 pfx = (password == null) ? new MX.PKCS12 (rawData) : new MX.PKCS12 (rawData, password); + MX.PKCS12 pfx = null; + if (string.IsNullOrEmpty (password)) { + try { + // Support both unencrypted PKCS#12.. + pfx = new MX.PKCS12 (rawData, (string)null); + } catch { + // ..and PKCS#12 encrypted with an empty password + pfx = new MX.PKCS12 (rawData, string.Empty); + } + } else { + pfx = new MX.PKCS12 (rawData, password); + } + if (pfx.Certificates.Count == 0) { // no certificate was found return null; diff --git a/mcs/class/System/System_test.dll.sources b/mcs/class/System/System_test.dll.sources index 33f8326b2d..fc7b978364 100644 --- a/mcs/class/System/System_test.dll.sources +++ b/mcs/class/System/System_test.dll.sources @@ -246,6 +246,7 @@ System.Net.Sockets/TcpClientTest.cs System.Net.Sockets/TcpListenerTest.cs System.Net.Sockets/SocketTest.cs System.Net.Sockets/SocketAsyncEventArgsTest.cs +System.Net.Sockets/SocketConnectAsyncTest.cs System.Net.Sockets/UdpClientTest.cs System.Net.Sockets/SocketAsyncTest.cs System.Net.Mail/LinkedResourceTest.cs diff --git a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs index 92a6253db9..43faa5cc10 100644 --- a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs @@ -639,6 +639,62 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (1, count, "1"); } + + private class Person : INotifyPropertyChanged + { + private string _lastName; + private string _firstName; + + public string FirstName { + get { return _firstName; } + set { + _firstName = value; + OnPropertyChanged ("FirstName"); // string matches property name + } + } + + public string LastName { + get { return _lastName; } + set { + _lastName = value; + OnPropertyChanged ("Apepe"); // string doesn't match property name + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void OnPropertyChanged (string propertyName = null) + { + PropertyChangedEventHandler handler = PropertyChanged; + if (handler != null) + handler (this, new PropertyChangedEventArgs (propertyName)); + } + } + + [Test] // https://bugzilla.xamarin.com/show_bug.cgi?id=20672 + public void Bug20672 () + { + string changedPropertyName = string.Empty; + bool isEventRaised = false; + bool? hasPropertyDescriptor = false; + + var persons = new BindingList(); + persons.Add (new Person() { FirstName = "Stefaan", LastName = "de Vogelaere" }); + persons.Add (new Person() { FirstName = "Christophe", LastName = "De Langhe" }); + persons.ListChanged += (object sender, ListChangedEventArgs e) => { + isEventRaised = true; + hasPropertyDescriptor = e.PropertyDescriptor != null; + }; + + //if the OnPropertyChanged string matches a valid property name, PropertyDescriptor should be generated + persons[0].FirstName = "Stefan"; + Assert.IsTrue (isEventRaised); + Assert.IsTrue ((bool) hasPropertyDescriptor, "#1"); + + //if the OnPropertyChanged string doesn't match a valid property name, no PropertyDescriptor should be generated + persons[0].LastName = "de le Vulu"; + Assert.IsFalse ((bool) hasPropertyDescriptor, "#2"); + } } } diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs new file mode 100644 index 0000000000..99c4804801 --- /dev/null +++ b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections; +using System.Threading; +using System.Net; +using System.Net.Sockets; +using NUnit.Framework; + +namespace MonoTests.System.Net.Sockets +{ + [TestFixture] + public class SocketConnectAsyncTest + { + Socket serverSocket; + Socket clientSocket; + SocketAsyncEventArgs clientSocketAsyncArgs; + ManualResetEvent readyEvent; + ManualResetEvent mainEvent; + Exception error; + + [TestFixtureSetUp] + public void SetUp () + { + readyEvent = new ManualResetEvent (false); + mainEvent = new ManualResetEvent (false); + } + + [TestFixtureTearDown] + public void TearDown () + { + readyEvent.Close (); + mainEvent.Close (); + } + + void StartServer() + { + readyEvent.Reset(); + mainEvent.Reset(); + ThreadPool.QueueUserWorkItem (_ => DoWork ()); + readyEvent.WaitOne (); + } + + void StopServer() + { + if (serverSocket != null) + serverSocket.Close (); + } + + void DoWork () + { + serverSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + serverSocket.Bind (new IPEndPoint (IPAddress.Loopback, 0)); + serverSocket.Listen (1); + + var async = new SocketAsyncEventArgs (); + async.Completed += (s,e) => OnAccepted (e); + + readyEvent.Set (); + + if (!serverSocket.AcceptAsync (async)) + OnAccepted (async); + } + + void OnAccepted (SocketAsyncEventArgs e) + { + var acceptSocket = e.AcceptSocket; + mainEvent.Set (); + } + + [Test] + [Category("Test")] + public void Connect () + { + StartServer(); + + EndPoint serverEndpoint = serverSocket.LocalEndPoint; + + var m = new ManualResetEvent (false); + var e = new SocketAsyncEventArgs (); + + clientSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + clientSocketAsyncArgs = new SocketAsyncEventArgs(); + clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint; + clientSocketAsyncArgs.Completed += (s,o) => { + if (o.SocketError != SocketError.Success) + error = new SocketException ((int)o.SocketError); + m.Set (); + }; + bool res = clientSocket.ConnectAsync(clientSocketAsyncArgs); + if (res) { + if (!m.WaitOne (1500)) + throw new TimeoutException (); + } + + if (!mainEvent.WaitOne (1500)) + throw new TimeoutException (); + if (error != null) + throw error; + + m.Reset (); + mainEvent.Reset (); + + StopServer(); + + // Try again to non-listening endpoint, expect error + + error = null; + clientSocket = new Socket ( + AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + clientSocketAsyncArgs = new SocketAsyncEventArgs (); + clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint; + clientSocketAsyncArgs.Completed += (s,o) => { + if (o.SocketError != SocketError.Success) + error = new SocketException ((int)o.SocketError); + m.Set (); + }; + res = clientSocket.ConnectAsync (clientSocketAsyncArgs); + if (res) { + if (!m.WaitOne (1500)) + throw new TimeoutException (); + } + + Assert.IsTrue (error != null, "Connect - no error"); + SocketException socketException = (SocketException)error; + Assert.IsTrue(socketException.ErrorCode == (int)SocketError.ConnectionRefused); + + m.Reset (); + mainEvent.Reset (); + } + + } +} \ No newline at end of file diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id index 549d3c7834..5a53138b46 100644 --- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id +++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs.REMOVED.git-id @@ -1 +1 @@ -0ae72b4c29ac57ce57fafde17a909f16b88df913 \ No newline at end of file +b6ddbf164a5e04ef05fc2d35b59923c2f82abef6 \ No newline at end of file diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs index c919391922..488518c38b 100644 --- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs @@ -74,6 +74,13 @@ namespace MonoTests.System.Net.Sockets { //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); #endif +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + client = new MyUdpClient (AddressFamily.InterNetworkV6); s = client.Client; Assert.IsNotNull (s, "#B:Client"); @@ -297,6 +304,13 @@ namespace MonoTests.System.Net.Sockets { Assert.AreEqual (AddressFamily.InterNetwork, localEP.AddressFamily, "#A:Client:LocalEndPoint/AddressFamily"); } +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + using (MyUdpClient client = new MyUdpClient (IPEndPoint.MaxPort, AddressFamily.InterNetworkV6)) { s = client.Client; @@ -656,6 +670,13 @@ namespace MonoTests.System.Net.Sockets { [Test] // JoinMulticastGroup (Int32, IPAddress) public void JoinMulticastGroup2_Socket_Closed () { +#if NET_2_0 + if (!Socket.OSSupportsIPv6) +#else + if (!Socket.SupportsIPv6) +#endif + Assert.Ignore ("IPv6 not enabled."); + IPAddress mcast_addr = null; UdpClient client = new UdpClient (new IPEndPoint (IPAddress.IPv6Any, 1234)); diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs index 4479764065..f240f8eae4 100644 --- a/mcs/class/System/Test/System.Net/DnsTest.cs +++ b/mcs/class/System/Test/System.Net/DnsTest.cs @@ -28,8 +28,8 @@ namespace MonoTests.System.Net [TestFixture] public class DnsTest { - private String site1Name = "mono-project.com", - site1Dot = "96.126.105.110", + private String site1Name = "xamarin.com", + site1Dot = "50.19.126.231", site2Name = "info.diku.dk", site2Dot = "130.225.96.4", noneExistingSite = "unlikely.xamarin.com"; @@ -44,7 +44,7 @@ namespace MonoTests.System.Net IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null); IPHostEntry entry = Dns.EndGetHostByName (async); SubTestValidIPHostEntry (entry); - Assert.IsTrue (entry.HostName == "www.mono-project.com" || entry.HostName == "mono-project.com"); + Assert.IsTrue (entry.HostName == "www.xamarin.com" || entry.HostName == "xamarin.com"); } void GetHostByNameCallback (IAsyncResult ar) @@ -191,7 +191,7 @@ namespace MonoTests.System.Net [Test] public void GetHostByName () { - SubTestGetHostByName ("www.mono-project.com", site1Dot); + SubTestGetHostByName ("www.xamarin.com", site1Dot); SubTestGetHostByName (site2Name, site2Dot); try { var entry = Dns.GetHostByName (noneExistingSite); diff --git a/mcs/class/System/Test/System.Net/HttpListener2Test.cs b/mcs/class/System/Test/System.Net/HttpListener2Test.cs index abff4e15a9..f499921e47 100644 --- a/mcs/class/System/Test/System.Net/HttpListener2Test.cs +++ b/mcs/class/System/Test/System.Net/HttpListener2Test.cs @@ -144,7 +144,7 @@ namespace MonoTests.System.Net { Send (ns, "GET / HTTP/1.1\r\n\r\n"); // No host string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", response); } [Test] @@ -155,7 +155,7 @@ namespace MonoTests.System.Net { Send (ns, "GET / HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // no prefix string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", response); } [Test] @@ -192,7 +192,7 @@ namespace MonoTests.System.Net { string response = Receive (ns, 512); ns.Close (); listener.Close (); - Assert.AreEqual (true, response.StartsWith ("HTTP/1.1 400"), String.Format ("Failed on {0}", (int) b)); + StringAssert.StartsWith ("HTTP/1.1 400", response, String.Format ("Failed on {0}", (int) b)); } } @@ -204,7 +204,7 @@ namespace MonoTests.System.Net { Send (ns, "POST /test4/ HTTP/1.1\r\nHost: 127.0.0.1\r\n\r\n"); // length required string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -215,7 +215,7 @@ namespace MonoTests.System.Net { Send (ns, "POST / HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: pepe\r\n\r\n"); // not implemented string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 501")); + StringAssert.StartsWith ("HTTP/1.1 501", response); } [Test] @@ -227,7 +227,7 @@ namespace MonoTests.System.Net { Send (ns, "POST /test6/ HTTP/1.1\r\nHost: 127.0.0.1\r\nTransfer-Encoding: identity\r\n\r\n"); string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 501")); + StringAssert.StartsWith ("HTTP/1.1 501", response); } [Test] @@ -241,8 +241,8 @@ namespace MonoTests.System.Net { ctx.Response.Close (); string response = Receive (ns, 1024); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); - Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked")); + StringAssert.StartsWith ("HTTP/1.1 200", response); + StringAssert.Contains ("Transfer-Encoding: chunked", response); } [Test] @@ -257,7 +257,7 @@ namespace MonoTests.System.Net { ctx.Response.Close (); string response = Receive (ns, 512); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); + StringAssert.StartsWith ("HTTP/1.1 200", response); Assert.IsTrue (-1 == response.IndexOf ("Transfer-Encoding: chunked")); } @@ -272,7 +272,7 @@ namespace MonoTests.System.Net { string response = ReceiveWithTimeout (ns, 512, 1000, out timeout); ns.Close (); Assert.IsFalse (timeout); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -287,7 +287,7 @@ namespace MonoTests.System.Net { string response = ReceiveWithTimeout (ns, 512, 1000, out timeout); ns.Close (); Assert.IsFalse (timeout); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 411")); + StringAssert.StartsWith ("HTTP/1.1 411", response); } [Test] @@ -300,7 +300,7 @@ namespace MonoTests.System.Net { ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } [Test] @@ -313,7 +313,7 @@ namespace MonoTests.System.Net { ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } [Test] @@ -326,7 +326,7 @@ namespace MonoTests.System.Net { ns.GetSocket ().Shutdown (SocketShutdown.Send); string input = Receive (ns, 512); ns.Close (); - Assert.IsTrue (input.StartsWith ("HTTP/1.1 400")); + StringAssert.StartsWith ("HTTP/1.1 400", input); } HttpListenerRequest test14_request; @@ -418,8 +418,8 @@ namespace MonoTests.System.Net { ctx.Response.Close (); string response = Receive (ns, 1024); ns.Close (); - Assert.IsTrue (response.StartsWith ("HTTP/1.1 200")); - Assert.IsTrue (-1 != response.IndexOf ("Transfer-Encoding: chunked")); + StringAssert.StartsWith ("HTTP/1.1 200", response); + StringAssert.Contains ("Transfer-Encoding: chunked", response); } [Test] @@ -723,11 +723,11 @@ namespace MonoTests.System.Net { public void ClosePort () { var h = new HttpListener (); - h.Prefixes.Add ("http://127.0.0.1:8080/"); + h.Prefixes.Add ("http://127.0.0.1:30158/"); h.Start (); h.BeginGetContext (null, null); h.Stop (); - TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 8080); + TcpListener t = new TcpListener (IPAddress.Parse ("127.0.0.1"), 30158); t.Start (); t.Stop (); } diff --git a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs.REMOVED.git-id b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs.REMOVED.git-id index 2da2b3932d..7b9d738c8a 100644 --- a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs.REMOVED.git-id +++ b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs.REMOVED.git-id @@ -1 +1 @@ -f0826d1c9902938fe975f2a12554f06926ef5876 \ No newline at end of file +ccf2484dfdddf2db7e554b5b4176c004fc9f9a94 \ No newline at end of file diff --git a/mcs/class/System/Test/System.Net/WebClientTest.cs b/mcs/class/System/Test/System.Net/WebClientTest.cs index 3505926f41..48722d4551 100644 --- a/mcs/class/System/Test/System.Net/WebClientTest.cs +++ b/mcs/class/System/Test/System.Net/WebClientTest.cs @@ -2156,5 +2156,97 @@ namespace MonoTests.System.Net // and return the same instance as WebRequest.DefaultWebProxy Assert.AreSame (wc.Proxy, WebRequest.DefaultWebProxy); } + +#if NET_4_5 + [Test] + public void UploadStringAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + + webClient.UploadStringCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadStringAsync (uri, "PUT", "text"); + }); + } + + [Test] + public void UploadDataAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + webClient.UploadDataCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadDataAsync (uri, "PUT", new byte[] { }); + }); + } + + [Test] + public void UploadValuesAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + webClient.UploadValuesCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadValuesAsync (uri, "PUT", new NameValueCollection ()); + }); + } + + [Test] + public void UploadFileAsyncCancelEvent () + { + UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) => + { + string tempFile = Path.Combine (_tempFolder, "upload.tmp"); + File.Create (tempFile).Close (); + + webClient.UploadFileCompleted += (sender, args) => + { + if (args.Cancelled) + cancelEvent.Set (); + }; + + webClient.UploadFileAsync (uri, "PUT", tempFile); + }); + } +#endif + +#if NET_4_0 + public void UploadAsyncCancelEventTest (Action uploadAction) + { + var ep = new IPEndPoint (IPAddress.Loopback, 8000); + string url = "http://" + IPAddress.Loopback + ":8000/test/"; + + using (var responder = new SocketResponder (ep, EchoRequestHandler)) + { + responder.Start (); + + var webClient = new WebClient (); + + var cancellationTokenSource = new CancellationTokenSource (); + cancellationTokenSource.Token.Register (webClient.CancelAsync); + + var cancelEvent = new ManualResetEvent (false); + + uploadAction.Invoke (webClient, new Uri (url), cancelEvent); + + cancellationTokenSource.Cancel (); + + Assert.IsTrue (cancelEvent.WaitOne (1000)); + } + } +#endif } } diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs.REMOVED.git-id b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs.REMOVED.git-id index b594e40af3..dffde551e6 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs.REMOVED.git-id +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs.REMOVED.git-id @@ -1 +1 @@ -19a7c19f82126a787143c28fdb89daf1b66116bb \ No newline at end of file +9fceaca05cac364bf580c8b503efd8b7f5465e22 \ No newline at end of file diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs index 8e02384f58..d6586ab4d5 100644 --- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs +++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs @@ -165,7 +165,7 @@ namespace System.IO.Packaging { if (node.Attributes["TargetMode"] != null) mode = (TargetMode) Enum.Parse (typeof(TargetMode), node.Attributes ["TargetMode"].Value); - CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.Relative), + CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.RelativeOrAbsolute), mode, node.Attributes["Type"].Value.ToString (), node.Attributes["Id"].Value.ToString (), diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs index a0f2aa6766..b9184aac05 100644 --- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs +++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs @@ -257,7 +257,14 @@ namespace System.IO.Packaging if (ContentType != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "contentType", NSPackageProperties)).InnerXml = ContentType; if (Created.HasValue) - coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)).InnerXml = Created.Value.ToString (); + { + XmlAttribute att = doc.CreateAttribute ("xsi", "type", NSXsi); + att.Value = "dcterms:W3CDTF"; + + XmlNode created = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)); + created.Attributes.Append (att); + created.InnerXml = Created.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; + } if (Creator != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dc", "creator", NSDc)).InnerXml = Creator; if (Description != null) @@ -271,7 +278,11 @@ namespace System.IO.Packaging if (LastModifiedBy != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastModifiedBy", NSPackageProperties)).InnerXml = LastModifiedBy; if (LastPrinted.HasValue) - coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)).InnerXml = LastPrinted.Value.ToString (); + { + XmlNode lastPrinted = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)); + + lastPrinted.InnerXml = LastPrinted.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; + } if (Revision != null) coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "revision", NSPackageProperties)).InnerXml = Revision; if (Subject != null) @@ -288,7 +299,7 @@ namespace System.IO.Packaging XmlNode modified = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "modified", NSDcTerms)); modified.Attributes.Append (att); - modified.InnerXml = Modified.Value.ToString (); + modified.InnerXml = Modified.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z"; } doc.WriteContentTo (writer); diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile index e716ed1a06..f3126697a0 100644 --- a/mcs/class/corlib/Makefile +++ b/mcs/class/corlib/Makefile @@ -134,7 +134,7 @@ $(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializati @mkdir -p $(dir $@) $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^ -$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll +$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(test_nunit_dep) $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \ -r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \ $(vtsdir)/BinarySerializationOverVersions.cs -out:$@ diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs index e5a26ce28d..8098cdbc58 100644 --- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs +++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs @@ -262,7 +262,11 @@ namespace System.Collections.Concurrent bool ICollection>.Contains (KeyValuePair pair) { - return ContainsKey (pair.Key); + TValue value; + if (!TryGetValue (pair.Key, out value)) + return false; + + return EqualityComparer.Default.Equals (value, pair.Value); } public KeyValuePair[] ToArray () diff --git a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs index d19cc4cec7..ea8984394b 100644 --- a/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs +++ b/mcs/class/corlib/System.Collections.Concurrent/ConcurrentQueue.cs @@ -97,12 +97,13 @@ namespace System.Collections.Concurrent public bool TryDequeue (out T result) { result = default (T); + Node oldNext = null; bool advanced = false; while (!advanced) { Node oldHead = head; Node oldTail = tail; - Node oldNext = oldHead.Next; + oldNext = oldHead.Next; if (oldHead == head) { // Empty case ? @@ -122,6 +123,8 @@ namespace System.Collections.Concurrent } } + oldNext.Value = default (T); + Interlocked.Decrement (ref count); return true; @@ -129,14 +132,24 @@ namespace System.Collections.Concurrent public bool TryPeek (out T result) { - Node first = head.Next; + result = default (T); + bool update = true; + + while (update) + { + Node oldHead = head; + Node oldNext = oldHead.Next; - if (first == null) { - result = default (T); - return false; + if (oldNext == null) { + result = default (T); + return false; + } + + result = oldNext.Value; + + //check if head has been updated + update = head != oldHead; } - - result = first.Value; return true; } diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs index 74ee14d9a5..9fcc747562 100644 --- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs +++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs @@ -79,7 +79,7 @@ namespace System.Collections.Generic { // to be ORed with HASH_FLAG before comparing it with the save hashcode. // "touchedSlots" and "emptySlot" manage the free space in the heap - const int INITIAL_SIZE = 10; + const int INITIAL_SIZE = 4; const float DEFAULT_LOAD_FACTOR = (90f / 100); const int NO_SLOT = -1; const int HASH_FLAG = -2147483648; @@ -233,22 +233,25 @@ namespace System.Collections.Generic { } public Dictionary (int capacity) + : this (capacity, null) { - Init (capacity, null); } public Dictionary (IDictionary dictionary, IEqualityComparer comparer) { if (dictionary == null) throw new ArgumentNullException ("dictionary"); - int capacity = dictionary.Count; - Init (capacity, comparer); + + Init (dictionary.Count, comparer); foreach (KeyValuePair entry in dictionary) this.Add (entry.Key, entry.Value); } public Dictionary (int capacity, IEqualityComparer comparer) { + if (capacity < 0) + throw new ArgumentOutOfRangeException ("capacity"); + Init (capacity, comparer); } @@ -257,22 +260,16 @@ namespace System.Collections.Generic { serialization_info = info; } - private void Init (int capacity, IEqualityComparer hcp) + void Init (int capacity, IEqualityComparer hcp) { - if (capacity < 0) - throw new ArgumentOutOfRangeException ("capacity"); - this.hcp = (hcp != null) ? hcp : EqualityComparer.Default; - if (capacity == 0) - capacity = INITIAL_SIZE; + this.hcp = hcp ?? EqualityComparer.Default; - /* Modify capacity so 'capacity' elements can be added without resizing */ - capacity = (int)(capacity / DEFAULT_LOAD_FACTOR) + 1; - + capacity = Math.Max (1, (int)(capacity / DEFAULT_LOAD_FACTOR)); InitArrays (capacity); - generation = 0; } - private void InitArrays (int size) { + void InitArrays (int size) + { table = new int [size]; linkSlots = new Link [size]; @@ -456,6 +453,9 @@ namespace System.Collections.Generic { public void Clear () { + if (count == 0) + return; + count = 0; // clear the hash table Array.Clear (table, 0, table.Length); diff --git a/mcs/class/corlib/System.IO/FileInfo.cs b/mcs/class/corlib/System.IO/FileInfo.cs index 0911f8152c..cad54a4d55 100644 --- a/mcs/class/corlib/System.IO/FileInfo.cs +++ b/mcs/class/corlib/System.IO/FileInfo.cs @@ -37,7 +37,7 @@ using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Security; -#if !NET_2_1 +#if !MOBILE using System.Security.AccessControl; #endif @@ -93,7 +93,6 @@ namespace System.IO { } } -#if !NET_2_1 public bool IsReadOnly { get { if (!Exists) @@ -138,7 +137,6 @@ namespace System.IO { // handling this exception to work properly. throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system.")); } -#endif public long Length { get { @@ -265,15 +263,10 @@ namespace System.IO { public override string ToString () { -#if NET_2_1 - // for Moonlight we *never* return paths, since ToString is not [SecurityCritical] we simply return the Name - return Name; -#else return OriginalPath; -#endif } -#if !NET_2_1 +#if !MOBILE public FileSecurity GetAccessControl () { return File.GetAccessControl (FullPath); diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs index 578a7ab057..64b5bf4bde 100644 --- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs @@ -44,19 +44,17 @@ using System.Security; using System.Security.Permissions; using System.Diagnostics.SymbolStore; +#if !NET_4_5 +using TypeInfo = System.Type; +#endif + namespace System.Reflection.Emit { [ComVisible (true)] [ComDefaultInterface (typeof (_TypeBuilder))] [ClassInterface (ClassInterfaceType.None)] [StructLayout (LayoutKind.Sequential)] - public sealed class TypeBuilder : -#if NET_4_5 - TypeInfo -#else - Type -#endif - , _TypeBuilder + public sealed class TypeBuilder : TypeInfo, _TypeBuilder { #pragma warning disable 169 #region Sync with reflection.h @@ -82,7 +80,7 @@ namespace System.Reflection.Emit private IntPtr generic_container; private GenericTypeParameterBuilder[] generic_params; private RefEmitPermissionSet[] permissions; - private Type created; + private TypeInfo created; #endregion #pragma warning restore 169 @@ -727,7 +725,7 @@ namespace System.Reflection.Emit } [MethodImplAttribute(MethodImplOptions.InternalCall)] - private extern Type create_runtime_class (TypeBuilder tb); + private extern TypeInfo create_runtime_class (TypeBuilder tb); private bool is_nested_in (Type t) { @@ -753,8 +751,16 @@ namespace System.Reflection.Emit return false; } + + public Type CreateType () + { + return CreateTypeInfo (); + } - public Type CreateType() +#if NET_4_5 + public +#endif + TypeInfo CreateTypeInfo () { /* handle nesting_type */ if (createTypeCalled) diff --git a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs index ca849bd6ad..e1fa6e36ec 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs @@ -32,30 +32,58 @@ namespace System.Security.Claims { public static class ClaimTypes { + public const string Actor = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims/actor"; + public const string Anonymous = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/anonymous"; public const string Authentication = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authentication"; + public const string AuthenticationInstant = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationinstant"; + + public const string AuthenticationMethod = "http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod"; + public const string AuthorizationDecision = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision"; + public const string ClaimsType2005Namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims"; + + public const string ClaimsType2009Namespace = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims"; + + public const string ClaimsTypeNamespace = "http://schemas.microsoft.com/ws/2008/06/identity/claims"; + + public const string CookiePath = "http://schemas.microsoft.com/ws/2008/06/identity/claims/cookiepath"; + public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country"; public const string DateOfBirth = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth"; + public const string DenyOnlyPrimaryGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroup"; + + public const string DenyOnlyPrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarysid"; + public const string DenyOnlySid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/denyonlysid"; public const string Dns = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns"; - public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"; + public const string Dsa = "http://schemas.microsoft.com/ws/2008/06/identity/claims/dsa"; + + public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email"; + + public const string Expiration = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration"; + + public const string Expired = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expired"; public const string Gender = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/gender"; public const string GivenName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"; + public const string GroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/groupsid"; + public const string Hash = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/hash"; public const string HomePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/homephone"; + public const string IsPersistent = "http://schemas.microsoft.com/ws/2008/06/identity/claims/ispersistent"; + public const string Locality = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/locality"; public const string MobilePhone = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/mobilephone"; @@ -70,8 +98,16 @@ namespace System.Security.Claims public const string PPID = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier"; + public const string PrimaryGroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid"; + + public const string PrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid"; + + public const string Role = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"; + public const string Rsa = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/rsa"; + public const string SerialNumber = "http://schemas.microsoft.com/ws/2008/06/identity/claims/serialnumber"; + public const string Sid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/sid"; public const string Spn = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn"; @@ -90,9 +126,15 @@ namespace System.Security.Claims public const string Uri = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/uri"; + public const string UserData = "http://schemas.microsoft.com/ws/2008/06/identity/claims/userdata"; + + public const string Version = "http://schemas.microsoft.com/ws/2008/06/identity/claims/version"; + public const string Webpage = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/webpage"; + public const string WindowsAccountName = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname"; + public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname"; } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs index 852e4f4008..24066a1da8 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs @@ -49,6 +49,10 @@ namespace System.Security.Claims { : this (claims: null, authenticationType: null, nameType: null, roleType: null) { } + public ClaimsIdentity(IEnumerable claims) + : this (claims: claims, authenticationType: null, nameType: null, roleType: null) + { } + public ClaimsIdentity (string authenticationType) : this (claims: null, authenticationType: authenticationType, nameType: null, roleType: null) { } @@ -97,13 +101,16 @@ namespace System.Security.Claims { foreach (var c in ci.Claims) this.claims.Add (c); - foreach (var c in claims) - this.claims.Add (c); Label = ci.Label; NameClaimType = ci.NameClaimType; RoleClaimType = ci.RoleClaimType; auth_type = ci.AuthenticationType; } + + if (claims != null) { + foreach (var c in claims) + this.claims.Add (c); + } } [MonoTODO] @@ -264,4 +271,4 @@ namespace System.Security.Claims { } } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs index d3827b8d1a..cf1fe29e9d 100644 --- a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs +++ b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs @@ -59,14 +59,16 @@ namespace System.Security.Claims { if (identities == null) throw new ArgumentNullException ("identities"); - identities = new List (identities); + this.identities = new List (identities); } public ClaimsPrincipal (IIdentity identity) { if (identity == null) throw new ArgumentNullException ("identity"); - // TODO + + identities = new List (); + identities.Add (new ClaimsIdentity (identity)); } public ClaimsPrincipal (IPrincipal principal) @@ -187,4 +189,4 @@ namespace System.Security.Claims { } } -#endif \ No newline at end of file +#endif diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs index 3fe5c6aaae..0e5339969a 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs @@ -38,7 +38,7 @@ namespace System.Security.Cryptography { [ComVisible (true)] public class CryptographicException : SystemException, _Exception { public CryptographicException () - : base (Locale.GetText ("Error occured during a cryptographic operation.")) + : base (Locale.GetText ("Error occurred during a cryptographic operation.")) { // default to CORSEC_E_CRYPTO // defined as EMAKEHR(0x1430) in CorError.h diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs index 7720e8e851..3f5d52e92a 100644 --- a/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptographicUnexpectedOperationExcpetion.cs @@ -38,7 +38,7 @@ namespace System.Security.Cryptography { public class CryptographicUnexpectedOperationException : CryptographicException { public CryptographicUnexpectedOperationException () - : base (Locale.GetText ("Unexpected error occured during a cryptographic operation.")) + : base (Locale.GetText ("Unexpected error occurred during a cryptographic operation.")) { // Default to CORSEC_E_CRYPTO_UNEX_OPER (CorError.h) HResult = unchecked ((int)0x80131431); diff --git a/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs b/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs index 38eff7631f..3ecf21bc4f 100644 --- a/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs +++ b/mcs/class/corlib/System.Text/DecoderReplacementFallbackBuffer.cs @@ -60,7 +60,7 @@ namespace System.Text if (bytesUnknown == null) throw new ArgumentNullException ("bytesUnknown"); if (fallback_assigned && Remaining != 0) - throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); + throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); if (index < 0 || bytesUnknown.Length < index) throw new ArgumentOutOfRangeException ("index"); fallback_assigned = true; diff --git a/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs b/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs index 7bf94251ac..736537e68d 100644 --- a/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs +++ b/mcs/class/corlib/System.Text/EncoderReplacementFallbackBuffer.cs @@ -69,7 +69,7 @@ namespace System.Text private bool Fallback (int index) { if (fallback_assigned && Remaining != 0) - throw new ArgumentException ("Reentrant Fallback method invocation occured. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); + throw new ArgumentException ("Reentrant Fallback method invocation occurred. It might be because either this FallbackBuffer is incorrectly shared by multiple threads, invoked inside Encoding recursively, or Reset invocation is forgotten."); if (index < 0) throw new ArgumentOutOfRangeException ("index"); fallback_assigned = true; diff --git a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs index 1c352ff7d3..54fe237c79 100644 --- a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs +++ b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs @@ -26,14 +26,13 @@ #if NET_4_0 using System; -using System.Threading; namespace System.Threading { public struct CancellationTokenRegistration: IDisposable, IEquatable { - int id; - CancellationTokenSource source; + readonly int id; + readonly CancellationTokenSource source; internal CancellationTokenRegistration (int id, CancellationTokenSource source) { @@ -52,7 +51,7 @@ namespace System.Threading #region IEquatable implementation public bool Equals (CancellationTokenRegistration other) { - return this.id == other.id && this.source == other.source; + return id == other.id && source == other.source; } public static bool operator== (CancellationTokenRegistration left, CancellationTokenRegistration right) @@ -73,7 +72,7 @@ namespace System.Threading public override bool Equals (object obj) { - return (obj is CancellationTokenRegistration) ? Equals ((CancellationTokenRegistration)obj) : false; + return (obj is CancellationTokenRegistration) && Equals ((CancellationTokenRegistration)obj); } } } diff --git a/mcs/class/corlib/System/AggregateException.cs b/mcs/class/corlib/System/AggregateException.cs index 067cd64d6f..769ba549db 100644 --- a/mcs/class/corlib/System/AggregateException.cs +++ b/mcs/class/corlib/System/AggregateException.cs @@ -40,7 +40,7 @@ namespace System public class AggregateException : Exception { List innerExceptions = new List (); - const string defaultMessage = "One or more errors occured"; + const string defaultMessage = "One or more errors occurred"; public AggregateException () : base (defaultMessage) { @@ -63,7 +63,7 @@ namespace System } public AggregateException (params Exception[] innerExceptions) - : this (string.Empty, innerExceptions) + : this (defaultMessage, innerExceptions) { } diff --git a/mcs/class/corlib/System/AndroidPlatform.cs b/mcs/class/corlib/System/AndroidPlatform.cs index 5a2483dcc3..75e3d6a855 100644 --- a/mcs/class/corlib/System/AndroidPlatform.cs +++ b/mcs/class/corlib/System/AndroidPlatform.cs @@ -27,6 +27,7 @@ // #if MONODROID +using System.Reflection; using System.Threading; namespace System { @@ -35,20 +36,26 @@ namespace System { static readonly Func getDefaultSyncContext; static readonly Func getDefaultTimeZone; + static readonly Func getCurrentSystemTimeZone; static AndroidPlatform () { + Type androidRuntime = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true); + getDefaultSyncContext = (Func) Delegate.CreateDelegate (typeof(Func), - Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true) - .GetMethod ("GetDefaultSyncContext", + androidRuntime.GetMethod ("GetDefaultSyncContext", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic)); getDefaultTimeZone = (Func) Delegate.CreateDelegate (typeof(Func), - Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true) - .GetMethod ("GetDefaultTimeZone", + androidRuntime.GetMethod ("GetDefaultTimeZone", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic)); + + MethodInfo mi = androidRuntime.GetMethod ("GetCurrentSystemTimeZone", + System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); + if (mi != null) + getCurrentSystemTimeZone = (Func) Delegate.CreateDelegate (typeof(Func), mi); } internal static SynchronizationContext GetDefaultSyncContext () @@ -60,6 +67,13 @@ namespace System { { return getDefaultTimeZone (); } + + internal static TimeZone GetCurrentSystemTimeZone () + { + if (getCurrentSystemTimeZone == null) + return null; + return getCurrentSystemTimeZone (); + } } } #endif diff --git a/mcs/class/corlib/System/Array.cs b/mcs/class/corlib/System/Array.cs index b3272b16a9..519b8d1a09 100644 --- a/mcs/class/corlib/System/Array.cs +++ b/mcs/class/corlib/System/Array.cs @@ -1480,9 +1480,9 @@ namespace System return false; } - private static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer) + unsafe static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; object key, hi, lo; @@ -1934,9 +1934,9 @@ namespace System return false; } - private static void qsort (T[] keys, U[] items, int low0, int high0) where T : IComparable + unsafe static void qsort (T[] keys, U[] items, int low0, int high0) where T : IComparable { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; @@ -2043,9 +2043,9 @@ namespace System } // Specialized version for items==null - private static void qsort (T[] keys, int low0, int high0) where T : IComparable + unsafe static void qsort (T[] keys, int low0, int high0) where T : IComparable { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; @@ -2232,9 +2232,9 @@ namespace System return false; } - private static void qsort (K [] keys, V [] items, int low0, int high0, IComparer comparer) + unsafe static void qsort (K [] keys, V [] items, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; IComparable gcmp; @@ -2378,9 +2378,9 @@ namespace System } // Specialized version for items==null - private static void qsort (K [] keys, int low0, int high0, IComparer comparer) + unsafe static void qsort (K [] keys, int low0, int high0, IComparer comparer) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; IComparable gcmp; @@ -2535,9 +2535,9 @@ namespace System return false; } - private static void qsort (T [] array, int low0, int high0, Comparison compare) + unsafe static void qsort (T [] array, int low0, int high0, Comparison compare) { - QSortStack[] stack = new QSortStack[32]; + QSortStack* stack = stackalloc QSortStack [32]; const int QSORT_THRESHOLD = 7; int high, low, mid, i, k; int sp = 1; diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs index c3da055efc..30bc6f8edf 100644 --- a/mcs/class/corlib/System/DateTime.cs +++ b/mcs/class/corlib/System/DateTime.cs @@ -214,6 +214,10 @@ namespace System "yyyy/MMMM", }; + private static readonly string[] ExoticAndNonStandardFormats = new string[] { + "ddMMMyyyy" + }; + private enum Which { Day, @@ -927,6 +931,9 @@ namespace System if (ParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception)) return true; + if (ParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception)) + return true; + if (!setExceptionOnError) return false; diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs index 507153c421..8b9ade4dd4 100644 --- a/mcs/class/corlib/System/Delegate.cs +++ b/mcs/class/corlib/System/Delegate.cs @@ -5,12 +5,11 @@ // Miguel de Icaza (miguel@ximian.com) // Daniel Stodden (stodden@in.tum.de) // Dietmar Maurer (dietmar@ximian.com) +// Marek Safar (marek.safar@gmail.com) // // (C) Ximian, Inc. http://www.ximian.com -// - -// // Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// Copyright 2014 Xamarin, Inc (http://www.xamarin.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -41,9 +40,11 @@ using System.Runtime.InteropServices; namespace System { /* Contains the rarely used fields of Delegate */ - class DelegateData { + sealed class DelegateData + { public Type target_type; public string method_name; + public bool curried_first_arg; } [ClassInterface (ClassInterfaceType.AutoDual)] @@ -230,6 +231,8 @@ namespace System return null; bool argsMatch; + DelegateData delegate_data = new DelegateData (); + if (target != null) { if (!method.IsStatic) { argsMatch = arg_type_match_this (target.GetType (), method.DeclaringType, true); @@ -238,7 +241,9 @@ namespace System } else { argsMatch = arg_type_match (target.GetType (), args [0].ParameterType); for (int i = 1; i < args.Length; i++) - argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType); + argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType); + + delegate_data.curried_first_arg = true; } } else { if (!method.IsStatic) { @@ -259,6 +264,8 @@ namespace System argsMatch = !(args [0].ParameterType.IsValueType || args [0].ParameterType.IsByRef) && allowClosed; for (int i = 0; i < delargs.Length; i++) argsMatch &= arg_type_match (delargs [i].ParameterType, args [i + 1].ParameterType); + + delegate_data.curried_first_arg = true; } else { argsMatch = true; for (int i = 0; i < args.Length; i++) @@ -276,6 +283,8 @@ namespace System Delegate d = CreateDelegate_internal (type, target, method, throwOnBindFailure); if (d != null) d.original_method_info = method; + if (delegate_data != null) + d.data = delegate_data; return d; } @@ -398,6 +407,21 @@ namespace System return DynamicInvokeImpl (args); } + void InitializeDelegateData () + { + DelegateData delegate_data = new DelegateData (); + if (method_info.IsStatic) { + if (m_target != null) { + delegate_data.curried_first_arg = true; + } else { + MethodInfo invoke = GetType ().GetMethod ("Invoke"); + if (invoke.GetParametersCount () + 1 == method_info.GetParametersCount ()) + delegate_data.curried_first_arg = true; + } + } + this.data = delegate_data; + } + protected virtual object DynamicInvokeImpl (object[] args) { if (Method == null) { @@ -408,20 +432,34 @@ namespace System method_info = m_target.GetType ().GetMethod (data.method_name, mtypes); } - if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParametersCount () - 1) { + var target = m_target; + if (this.data == null) + InitializeDelegateData (); + + if (Method.IsStatic) { + // // The delegate is bound to m_target - if (args != null) { - object[] newArgs = new object [args.Length + 1]; - args.CopyTo (newArgs, 1); - newArgs [0] = m_target; - args = newArgs; - } else { - args = new object [] { m_target }; + // + if (data.curried_first_arg) { + if (args == null) { + args = new [] { target }; + } else { + Array.Resize (ref args, args.Length + 1); + Array.Copy (args, 0, args, 1, args.Length - 1); + args [0] = target; + } + + target = null; + } + } else { + if (m_target == null && args != null && args.Length > 0) { + target = args [0]; + Array.Copy (args, 1, args, 0, args.Length - 1); + Array.Resize (ref args, args.Length - 1); } - return Method.Invoke (null, args); } - return Method.Invoke (m_target, args); + return Method.Invoke (target, args); } public virtual object Clone () @@ -440,8 +478,13 @@ namespace System /* Uncommon case */ if (d.data != null && data != null) return (d.data.target_type == data.target_type && d.data.method_name == data.method_name); - else + else { + if (d.data != null) + return d.data.target_type == null; + if (data != null) + return data.target_type == null; return false; + } } return true; } diff --git a/mcs/class/corlib/System/DelegateSerializationHolder.cs b/mcs/class/corlib/System/DelegateSerializationHolder.cs index c36dbc7de7..74d704422d 100644 --- a/mcs/class/corlib/System/DelegateSerializationHolder.cs +++ b/mcs/class/corlib/System/DelegateSerializationHolder.cs @@ -46,7 +46,7 @@ namespace System { string type; string assembly; - public object target; + object target; string targetTypeAssembly; string targetTypeName; string methodName; @@ -64,15 +64,18 @@ namespace System methodName = del.Method.Name; } - public Delegate DeserializeDelegate (SerializationInfo info) + public Delegate DeserializeDelegate (SerializationInfo info, int index) { object realTarget = null; if (target != null) realTarget = info.GetValue (target.ToString(), typeof(object)); + var key = "method" + index; + var method = info.HasKey (key) ? (MethodInfo)info.GetValue (key, typeof (MethodInfo)) : null; + Assembly dasm = Assembly.Load (assembly); Type dt = dasm.GetType (type); - Delegate del; + if (realTarget != null) { #if !DISABLE_REMOTING if (RemotingServices.IsTransparentProxy (realTarget)) { @@ -86,15 +89,16 @@ namespace System throw new RemotingException ("Unexpected proxy type."); } #endif - del = Delegate.CreateDelegate (dt, realTarget, methodName); - } - else { - Assembly tasm = Assembly.Load (targetTypeAssembly); - Type tt = tasm.GetType (targetTypeName); - del = Delegate.CreateDelegate (dt, tt, methodName); + return method == null ? + Delegate.CreateDelegate (dt, realTarget, methodName) : + Delegate.CreateDelegate (dt, realTarget, method); } - return del; + if (method != null) + return Delegate.CreateDelegate (dt, realTarget, method); + + Type tt2 = Assembly.Load (targetTypeAssembly).GetType (targetTypeName); + return Delegate.CreateDelegate (dt, tt2, methodName); } } @@ -112,14 +116,14 @@ namespace System // Deserializes and combines the delegates if (count == 1) - _delegate = entryChain.DeserializeDelegate (info); + _delegate = entryChain.DeserializeDelegate (info, 0); else { Delegate[] delegates = new Delegate[count]; entry = entryChain; for (int n=0; n value) - return 1; - else - return -1; + return + m_value == value ? 0 : + m_value > value ? 1 : + -1; } public bool Equals (int obj) diff --git a/mcs/class/corlib/System/TimeZone.cs b/mcs/class/corlib/System/TimeZone.cs index 43c7181f8b..cea224133e 100644 --- a/mcs/class/corlib/System/TimeZone.cs +++ b/mcs/class/corlib/System/TimeZone.cs @@ -73,7 +73,11 @@ namespace System lock (tz_lock) { if (tz == null || Math.Abs (now - timezone_check) > TimeSpan.TicksPerMinute) { - tz = new CurrentSystemTimeZone (now); +#if MONODROID + tz = AndroidPlatform.GetCurrentSystemTimeZone (); + if (tz == null) +#endif + tz = new CurrentSystemTimeZone (now); timezone_check = now; currentTimeZone = tz; diff --git a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs index 698a25588f..e38c904590 100644 --- a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs +++ b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentDictionaryTests.cs @@ -353,6 +353,19 @@ namespace MonoTests.System.Collections.Concurrent } catch (ArgumentNullException ex) { } } + + [Test] + public void ContainsKeyPairTest () + { + var validKeyPair = new KeyValuePair ("key", "validValue"); + var wrongKeyPair = new KeyValuePair ("key", "wrongValue"); + + IDictionary dict = new ConcurrentDictionary (); + dict.Add (validKeyPair); + + Assert.IsTrue (dict.Contains (validKeyPair)); + Assert.IsFalse (dict.Contains (wrongKeyPair)); + } } } #endif diff --git a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs index b0006440af..91436a05b2 100644 --- a/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs +++ b/mcs/class/corlib/Test/System.Collections.Concurrent/ConcurrentQueueTests.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Collections.Concurrent; using NUnit.Framework; +using MonoTests.System.Threading.Tasks; namespace MonoTests.System.Collections.Concurrent { @@ -115,6 +116,34 @@ namespace MonoTests.System.Collections.Concurrent CollectionStressTestHelper.RemoveStressTest (new ConcurrentQueue (), CheckOrderingType.InOrder); } + [Test] + public void StressTryPeekTestCase () + { + ParallelTestHelper.Repeat (delegate { + var queue = new ConcurrentQueue (); + queue.Enqueue (new object()); + + const int threads = 10; + int threadCounter = 0; + bool success = true; + + ParallelTestHelper.ParallelStressTest (queue, (q) => { + int threadId = Interlocked.Increment (ref threadCounter); + object temp; + if (threadId < threads) + { + while (queue.TryPeek (out temp)) + if (temp == null) + success = false; + } else { + queue.TryDequeue (out temp); + } + }, threads); + + Assert.IsTrue (success, "TryPeek returned unexpected null value."); + }, 10); + } + [Test] public void CountTestCase() { @@ -215,6 +244,30 @@ namespace MonoTests.System.Collections.Concurrent { queue.CopyTo (new int[3], 0); } + + static WeakReference CreateWeakReference (object obj) + { + return new WeakReference (obj); + } + + [Test] + // This depends on precise stack scanning + [Category ("NotWorking")] + public void TryDequeueReferenceTest () + { + var obj = new Object (); + var weakReference = CreateWeakReference(obj); + var queue = new ConcurrentQueue (); + + queue.Enqueue (obj); + queue.TryDequeue (out obj); + obj = null; + + GC.Collect (); + GC.WaitForPendingFinalizers (); + + Assert.IsFalse (weakReference.IsAlive); + } } } #endif diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs index ab281cb817..eabe77e48e 100644 --- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs @@ -783,6 +783,51 @@ namespace MonoTests.System.Reflection var m = GetType ().GetMethod ("Bug12856"); Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1"); } + +#if !MONOTOUCH + class GenericClass + { + public void Method () + { + T lv = default(T); + Console.WriteLine(lv); + } + + public void Method2 (T a0, K a1) + { + T var0 = a0; + K var1 = a1; + Console.WriteLine (var0); + Console.WriteLine (var1); + } + } + + [Test] + public void TestLocalVariableTypes () + { + var typeofT = typeof (GenericClass<>).GetGenericArguments () [0]; + var typeofK = typeof (GenericClass<>).GetMethod ("Method2").GetGenericArguments () [0]; + + var type = typeof (GenericClass<>).GetMethod("Method").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeofT, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeofT, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType; + Assert.AreEqual (typeofK, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + + type = typeof (GenericClass).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType; + Assert.AreEqual (typeof (int), type); + + type = typeof (GenericClass).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType; + Assert.AreEqual (typeofK, type); + Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType); + } +#endif } #if NET_2_0 diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs index 1b3fc89889..92d19fe367 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs @@ -196,9 +196,13 @@ namespace MonoTests.System.Runtime.CompilerServices { if (GC.MaxGeneration == 0) /*Boehm doesn't handle ephemerons */ Assert.Ignore ("Not working on Boehm."); var cwt = new ConditionalWeakTable (); - List keepAlive; - List keys; - FillStuff (cwt, out keepAlive, out keys); + List keepAlive = null; + List keys = null; + Thread t = new Thread (delegate () { + FillStuff (cwt, out keepAlive, out keys); + }); + t.Start (); + t.Join (); GC.Collect (); diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs index a403d5287e..5237e377e3 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs @@ -44,14 +44,15 @@ namespace MonoTests.System.Runtime.CompilerServices class Scheduler : TaskScheduler { string name; + int ic, qc; public Scheduler (string name) { this.name = name; } - public int InlineCalls { get; set; } - public int QueueCalls { get; set; } + public int InlineCalls { get { return ic; } } + public int QueueCalls { get { return qc; } } protected override IEnumerable GetScheduledTasks () { @@ -60,7 +61,7 @@ namespace MonoTests.System.Runtime.CompilerServices protected override void QueueTask (Task task) { - ++QueueCalls; + Interlocked.Increment (ref qc); ThreadPool.QueueUserWorkItem (o => { TryExecuteTask (task); }); @@ -68,7 +69,7 @@ namespace MonoTests.System.Runtime.CompilerServices protected override bool TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) { - ++InlineCalls; + Interlocked.Increment (ref ic); return false; } } @@ -102,6 +103,7 @@ namespace MonoTests.System.Runtime.CompilerServices string progress; SynchronizationContext sc; + ManualResetEvent mre; [SetUp] public void Setup () @@ -176,7 +178,7 @@ namespace MonoTests.System.Runtime.CompilerServices Assert.IsTrue (t.Wait (3000), "#0"); Assert.AreEqual (0, t.Result, "#1"); Assert.AreEqual (0, b.InlineCalls, "#2b"); - Assert.AreEqual (2, a.QueueCalls, "#3a"); + Assert.IsTrue (a.QueueCalls == 1 || a.QueueCalls == 2, "#3a"); Assert.AreEqual (1, b.QueueCalls, "#3b"); } @@ -270,12 +272,15 @@ namespace MonoTests.System.Runtime.CompilerServices [Test] public void CompletionOnDifferentCustomSynchronizationContext () { + mre = new ManualResetEvent (false); progress = ""; var syncContext = new SingleThreadSynchronizationContext (); SynchronizationContext.SetSynchronizationContext (syncContext); syncContext.Post (delegate { - Go2 (syncContext); + Task t = new Task (delegate() { }); + Go2 (syncContext, t); + t.Start (); }, null); // Custom message loop @@ -286,21 +291,30 @@ namespace MonoTests.System.Runtime.CompilerServices Thread.Sleep (0); } - Assert.AreEqual ("132", progress); + Assert.AreEqual ("13xa2", progress); } - async void Go2 (SynchronizationContext ctx) + async void Go2 (SynchronizationContext ctx, Task t) { - await Wait2 (ctx); + await Wait2 (ctx, t); - progress += "2"; + progress += "a"; + + if (mre.WaitOne (5000)) + progress += "2"; + else + progress += "b"; } - async Task Wait2 (SynchronizationContext ctx) + async Task Wait2 (SynchronizationContext ctx, Task t) { - await Task.Delay (10); // Force block suspend/return + await t; // Force block suspend/return - ctx.Post (l => progress += "3", null); + ctx.Post (l => { + progress += "3"; + mre.Set (); + progress += "x"; + }, null); progress += "1"; diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs index da8bb8ee43..90b2d3f73f 100644 --- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs @@ -18,6 +18,7 @@ using System.Runtime.Remoting.Proxies; using System.Runtime.Remoting.Messaging; using System.Collections; using NUnit.Framework; +using System.Text; namespace MonoTests.System.Runtime.Serialization { @@ -41,6 +42,41 @@ namespace MonoTests.System.Runtime.Serialization RemotingServices.Disconnect (mt); } +#if !MONOTOUCH + [Test] + public void DelegateSerializationTest () + { + var a = new DelegateSerialization (); + a.E += HandleE1; + + var d2 = Delegate.CreateDelegate (typeof(Func), "val", typeof(SerializationTest).GetMethod ("HandleE2")); + a.E += (Func) d2; + + using (var ms = new MemoryStream ()) { + var fmt = new BinaryFormatter (); + fmt.Serialize (ms, a); + ms.Flush (); + + ms.Seek (0, SeekOrigin.Begin); + var a2 = (DelegateSerialization) fmt.Deserialize (ms); + a2.Test (); + } + } +#endif + + static int HandleE1 (StringBuilder arg) + { + arg.Append ("E1"); + return 1; + } + + public static int HandleE2 (object o, StringBuilder arg) + { + arg.Append ("E2|"); + arg.Append (o); + return 2; + } + void WriteData () { StreamingContext context = new StreamingContext (StreamingContextStates.Other); @@ -814,5 +850,17 @@ namespace MonoTests.System.Runtime.Serialization public int x; } + [Serializable] + class DelegateSerialization + { + public event Func E; + + public void Test () + { + var sb = new StringBuilder (); + Assert.AreEqual (2, E (sb), "#1"); + Assert.AreEqual ("E1E2|val", sb.ToString (), "#2"); + } + } } diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs index 9aa0d46510..df382b1700 100644 --- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs +++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs @@ -276,7 +276,7 @@ namespace MonoTests.System.Threading.Tasks tasks[i] = Task.Factory.StartNew (delegate { Thread.Sleep (0); }); } - Assert.IsTrue (Task.WaitAll (tasks, 2000)); + Assert.IsTrue (Task.WaitAll (tasks, 5000)); } } @@ -904,7 +904,11 @@ namespace MonoTests.System.Threading.Tasks args.SetObserved (); }; var inner = new ApplicationException (); - Task.Factory.StartNew (() => { throw inner; }); + Thread t = new Thread (delegate () { + Task.Factory.StartNew (() => { Console.WriteLine ("HIT!"); throw inner; }); + }); + t.Start (); + t.Join (); Thread.Sleep (1000); GC.Collect (); Thread.Sleep (1000); @@ -1928,7 +1932,7 @@ namespace MonoTests.System.Threading.Tasks } [Test] - [Category("MobileNotWorking")] + [Category("NotWorking")] public void TaskContinuationChainLeak() { // Start cranking out tasks, starting each new task upon completion of and from inside the prior task. diff --git a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs index d8c1299efe..5bf805aae0 100644 --- a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs +++ b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs @@ -90,9 +90,9 @@ namespace MonoTests.System.Threading int called = 0; var cts = new CancellationTokenSource (); cts.Token.Register (() => called++); - cts.CancelAfter (20); + cts.CancelAfter (50); cts.Dispose (); - Thread.Sleep (50); + Thread.Sleep (100); Assert.AreEqual (0, called, "#1"); } diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs b/mcs/class/corlib/Test/System/DateTimeTest.cs index 0e7b294f3b..343e723be8 100644 --- a/mcs/class/corlib/Test/System/DateTimeTest.cs +++ b/mcs/class/corlib/Test/System/DateTimeTest.cs @@ -1216,6 +1216,15 @@ namespace MonoTests.System DateTime.Parse ("Sat,,, 01,,, Oct,,, ,,,1994 03:00:00", CultureInfo.InvariantCulture); } + [Test] + public void TryParse_Bug11630 () + { + DateTime parsed; + + Assert.IsTrue (DateTime.TryParse ("10Feb2013", out parsed)); + Assert.AreEqual (new DateTime (2013, 2, 10), parsed); + } + [Test] [ExpectedException (typeof (FormatException))] public void Parse_CommaAfterHours () diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs index ddfc099b73..e45efdbd1a 100644 --- a/mcs/class/corlib/Test/System/DelegateTest.cs +++ b/mcs/class/corlib/Test/System/DelegateTest.cs @@ -1116,20 +1116,68 @@ namespace MonoTests.System typeof (Action), this.GetType ().GetMethod ("Banga")); } -#if !MONOTOUCH + [Test] // #664205 - public void DynamicInvokeNullTarget () + public void DynamicInvokeClosedStatic () { - var method = new DynamicMethod ("test", typeof (int), new [] { typeof (object) }, true); - var il = method.GetILGenerator (); - il.Emit (OpCodes.Ldc_I4, 42); - il.Emit (OpCodes.Ret); + var d1 = Delegate.CreateDelegate (typeof(Func), null, typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB")); + Assert.AreEqual (1, d1.DynamicInvoke (), "#1"); - var @delegate = method.CreateDelegate (typeof (Func), null); - - Assert.AreEqual (42, (int) @delegate.DynamicInvoke ()); + var d2 = Delegate.CreateDelegate (typeof(Func), "arg", typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB")); + Assert.AreEqual (2, d2.DynamicInvoke (), "#2"); } -#endif + + public static int DynamicInvokeClosedStaticDelegate_CB (string instance) + { + switch (instance) { + case null: + return 1; + case "arg": + return 2; + default: + Assert.Fail (); + return -1; + } + } + + [Test] + public void DynamicInvokeOpenInstanceDelegate () + { + var d1 = Delegate.CreateDelegate (typeof (Func), typeof(DelegateTest).GetMethod ("DynamicInvokeOpenInstanceDelegate_CB")); + Assert.AreEqual (5, d1.DynamicInvoke (new DelegateTest ()), "#1"); + + var d3 = (Func) d1; + Assert.AreEqual (5, d3 (null), "#2"); + } + + public int DynamicInvokeOpenInstanceDelegate_CB () + { + return 5; + } + + [Test] + public void DynamicInvoke_InvalidArguments () + { + Delegate d = new Func (TestMethod); + + try { + d.DynamicInvoke (null); + Assert.Fail ("#1"); + } catch (TargetParameterCountException) { + } + + try { + d.DynamicInvoke (new object [0]); + Assert.Fail ("#2"); + } catch (TargetParameterCountException) { + } + } + + public static int TestMethod (int i) + { + throw new NotSupportedException (); + } + #endif public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {} @@ -1329,17 +1377,56 @@ namespace MonoTests.System } catch (ArgumentException) {} } - private static Func Int32D = (x, y) => (x & y) == y; - [Test] public void EnumBaseTypeConversion () { + Func dm = Int32D2; var d = - Delegate.CreateDelegate(typeof (Func), Int32D.Method) as + Delegate.CreateDelegate(typeof (Func), dm.Method) as Func; Assert.IsTrue (d (0, 0)); } +#if !MONOTOUCH + public static void DynInvokeWithClosedFirstArg (object a, object b) + { + } + + [Test] + public void DynamicInvokeClosedOverNullDelegate () { + var dm = new DynamicMethod ("test", typeof (Delegate), null); + var il = dm.GetILGenerator (); + il.Emit (OpCodes.Ldnull); + il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg")); + il.Emit (OpCodes.Newobj, typeof (Action).GetConstructors ()[0]); + il.Emit (OpCodes.Ret); + + var f = (Func ) dm.CreateDelegate (typeof (Func )); + Action ac = (Action)f(); + ac.DynamicInvoke (new object[] { "oi" }); + ac.DynamicInvoke (new object[] { null }); + } + + [Test] + public void DynamicInvokeFirstArgBoundDelegate () { + var dm = new DynamicMethod ("test", typeof (Delegate), null); + var il = dm.GetILGenerator (); + il.Emit (OpCodes.Ldstr, "test"); + il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg")); + il.Emit (OpCodes.Newobj, typeof (Action).GetConstructors ()[0]); + il.Emit (OpCodes.Ret); + + var f = (Func ) dm.CreateDelegate (typeof (Func )); + Action ac = (Action)f(); + ac.DynamicInvoke (new object[] { "oi" }); + ac.DynamicInvoke (new object[] { null }); + } +#endif + + static bool Int32D2 (int x, int y) + { + return (x & y) == y; + } + public class B { public virtual string retarg3 (string s) { diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs index 4425baaaf8..8b6823ac10 100644 --- a/mcs/class/corlib/Test/System/EnumTest.cs +++ b/mcs/class/corlib/Test/System/EnumTest.cs @@ -740,6 +740,10 @@ namespace MonoTests.System success = Enum.TryParse ("is", true, out result); Assert.AreEqual (true, success, "#D1"); Assert.AreEqual (TestingEnum.Is, result, "#D2"); + + success = Enum.TryParse (" Is ", out result); + Assert.AreEqual (true, success, "#E1"); + Assert.AreEqual (TestingEnum.Is, result, "#E2"); } #endif diff --git a/mcs/class/corlib/Test/System/LazyTest.cs b/mcs/class/corlib/Test/System/LazyTest.cs index 01885f9767..6fb77f4d0f 100644 --- a/mcs/class/corlib/Test/System/LazyTest.cs +++ b/mcs/class/corlib/Test/System/LazyTest.cs @@ -273,6 +273,7 @@ namespace MonoTests.System public void ConcurrentInitialization () { var init = new AutoResetEvent (false); + var e1_set = new AutoResetEvent (false); var lazy = new Lazy (() => { init.Set (); @@ -286,6 +287,7 @@ namespace MonoTests.System string value = lazy.Value; } catch (Exception ex) { e1 = ex; + e1_set.Set (); } }); thread.Start (); @@ -306,8 +308,9 @@ namespace MonoTests.System e3 = ex; } - Assert.AreSame (e1, e2, "#2"); - Assert.AreSame (e1, e3, "#3"); + Assert.IsTrue (e1_set.WaitOne (3000), "#2"); + Assert.AreSame (e1, e2, "#3"); + Assert.AreSame (e1, e3, "#4"); } } diff --git a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id index 8a6293c5d4..535c071380 100644 --- a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -8eed6bdd1b2805b45460e792b626285b6ec4b9d5 \ No newline at end of file +41943c9369ed2e6b3b8923f873809387771266aa \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id index 9e91d9c319..761bf99133 100644 --- a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -ab92aa6dcaf4439c7249816aad28f5ee9576e11b \ No newline at end of file +adf667def2f0b640fc4718711d6cf34c8729241e \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id index 5c4077a185..cf68065450 100644 --- a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -337a207279e2b3e0414eb67d568cd9e91742d974 \ No newline at end of file +d867edccd427d5f49230c9771eb1a4f37d822ba1 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index bf8e9e6aaa..7740e8a2a3 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -4f673da83772f32cdaaf6d40db09388d1948c1f5 \ No newline at end of file +d9ba8c904922983a358610beeb1fc62534cdffb4 \ No newline at end of file diff --git a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id index 183f77da72..ccd0a6aa67 100644 --- a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id @@ -1 +1 @@ -1c8e1a4569fe1db6351cadf500b7a6f155dfc49d \ No newline at end of file +8d683c947f1fe982a7b1c40cb6e140e72fa90e7c \ No newline at end of file diff --git a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id index 61618c5849..662894ab9f 100644 --- a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -82e20612b4cc2e98dee260c9176d43df17208f5f \ No newline at end of file +3a01bcb874a5b4779a95cf945e2f7fab1c5a897e \ No newline at end of file diff --git a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs b/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs index c15c613778..04353c4546 100644 --- a/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs +++ b/mcs/class/monodoc/Monodoc/generators/html/Ecma2Html.cs @@ -63,14 +63,21 @@ namespace Monodoc.Generators.Html public string Htmlize (XmlReader ecma_xml, XsltArgumentList args) { - EnsureTransform (); - - var output = new StringBuilder (); - ecma_transform.Transform (ecma_xml, - args, - XmlWriter.Create (output, ecma_transform.OutputSettings), - CreateDocumentResolver ()); - return output.ToString (); + try{ + EnsureTransform (); + + var output = new StringBuilder (); + ecma_transform.Transform (ecma_xml, + args, + XmlWriter.Create (output, ecma_transform.OutputSettings), + CreateDocumentResolver ()); + return output.ToString (); + } + catch(Exception x) + { + var msg = x.ToString (); + return msg; + } } protected virtual XmlResolver CreateDocumentResolver () @@ -81,21 +88,14 @@ namespace Monodoc.Generators.Html public string Export (Stream stream, Dictionary extraArgs) { - return Htmlize (XmlReader.Create (WrapStream (new StreamReader (stream), extraArgs)), extraArgs); + return Htmlize (XmlReader.Create (new StreamReader(stream)), extraArgs); } public string Export (string input, Dictionary extraArgs) { - return Htmlize (XmlReader.Create (WrapStream (new StringReader (input), extraArgs)), extraArgs); + return Htmlize (XmlReader.Create (new StringReader(input)), extraArgs); } - TextReader WrapStream (TextReader initialReader, Dictionary renderArgs) - { - string show; - if (renderArgs.TryGetValue ("show", out show) && show == "namespace") - return new AvoidCDataTextReader (initialReader); - return initialReader; - } static void EnsureTransform () { @@ -329,81 +329,5 @@ namespace Monodoc.Generators.Html } } } - - public class AvoidCDataTextReader : TextReader - { - static readonly char[] CDataPattern = new[] { - '<', '!', '[', 'C', 'D', 'A', 'T', 'A', '[' - }; - static readonly char[] CDataClosingPattern = new[] { - ']', ']', '>' - }; - TextReader wrappedReader; - char[] backingArray = new char[9]; // " 0; - } else if (currentIndex == eofIndex) { - return false; - } - if (!inCData && PatternDetect (CDataPattern)) { - inCData = true; - ReadLength (CDataPattern.Length); - return EnsureBuffer (); - } - if (inCData && PatternDetect (CDataClosingPattern)) { - inCData = false; - ReadLength (CDataClosingPattern.Length); - return EnsureBuffer (); - } - - return true; - } - - bool PatternDetect (char[] pattern) - { - return backingArray[currentIndex] == pattern[0] && Enumerable.Range (1, pattern.Length - 1).All (i => backingArray[(currentIndex + i) % backingArray.Length] == pattern[i]); - } - } + } diff --git a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs index 23bf89778c..7a866432d6 100644 --- a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs +++ b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs @@ -49,7 +49,7 @@ namespace Monodoc.Providers ObjectEntryToParams (inner, out caption, out element); // Don't add if the backing file doesn't exist if (!File.Exists (element)) { - Console.Error.WriteLine ("File `{0}' referenced in TOC but it doesn't exist.", element); + Console.Error.WriteLine ("Warning: File `{0}' referenced in TOC but it doesn't exist. It will be ignored.", element); continue; } using (var file = File.OpenRead (element)) diff --git a/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs b/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs deleted file mode 100644 index 5ab8e84b80..0000000000 --- a/mcs/class/monodoc/Test/Monodoc.Generators/AvoidCDataTextReaderTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Xml; -using System.Collections.Generic; - -using NUnit.Framework; - -using Monodoc; -using Monodoc.Generators; -using Monodoc.Generators.Html; - -namespace MonoTests.Monodoc.Generators -{ - [TestFixture] - public class AvoidCDataTextReaderTest - { - void AssertSameInputOutput (string expected, string input) - { - var processed = new AvoidCDataTextReader (new StringReader (input)).ReadToEnd (); - Assert.AreEqual (expected, processed); - } - - [Test] - public void NoCDataXmlTest () - { - var input = @"Addressbook APIs. - Provides access to the system Address Book. - "; - - AssertSameInputOutput (input, input); - } - - [Test] - public void WithCDataXmlTest () - { - var input = @"Addressbook APIs. - "; - - AssertSameInputOutput (input.Replace ("", string.Empty), input); - } - - [Test] - public void PartialCDataXmlTest () - { - var input = @"Addressbook APIs. - "; - - AssertSameInputOutput (input, input); - } - - [Test] - public void FinishWithPartialCDataXmlTest () - { - var input = @"Addressbook APIs. - Provides access to the system Address Book. - Addressbook APIs. - Provides access to the system Address Book. - [] ArrayMember +} diff --git a/mcs/errors/CS1607-3-lib.cs b/mcs/errors/CS8009-lib.cs similarity index 100% rename from mcs/errors/CS1607-3-lib.cs rename to mcs/errors/CS8009-lib.cs diff --git a/mcs/errors/Makefile b/mcs/errors/Makefile index dc76a1cd6f..f994abac1e 100644 --- a/mcs/errors/Makefile +++ b/mcs/errors/Makefile @@ -21,7 +21,7 @@ DISTFILES = \ $(wildcard dlls/second/*.cs) TEST_SUPPORT_FILES = \ - CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \ + CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \ CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \ CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \ CS0315-2-lib.dll \ @@ -32,9 +32,10 @@ TEST_SUPPORT_FILES = \ CS0730-lib.dll CS0731-1-lib.dll CS0731-2-lib.dll \ CS1070-lib.dll \ CS1540-15-lib.dll CS1540-17-lib.dll CS1542-lib.dll CS1577-lib.dll \ - CS1607-3-lib.dll CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \ + CS1683-lib.dll CS1684-lib.dll CS1685-2-lib.dll \ dlls/first/CS1701-lib.dll dlls/second/CS1701-lib.dll CS1701-lib.dll dlls/first/CS1702-lib.dll dlls/second/CS1702-lib.dll CS1702-lib.dll dlls/first/CS1705-lib.dll dlls/second/CS1705-lib.dll CS1705-lib.dll \ CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \ + CS8009-lib.dll \ CSFriendAssembly-lib.dll \ dlls/first/CS1703-lib.dll dlls/first/CS1704-lib.dll \ dlls/second/CS1703-lib.dll dlls/second/CS1704-lib.dll diff --git a/mcs/errors/cs0012-23.cs b/mcs/errors/cs0012-23.cs new file mode 100644 index 0000000000..a8b454ac67 --- /dev/null +++ b/mcs/errors/cs0012-23.cs @@ -0,0 +1,11 @@ +// CS0012: The type `Struct`1' is defined in an assembly that is not referenced. Consider adding a reference to assembly `CS0012-lib-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' +// Line: 9 +// Compiler options: -r:CS0012-23-lib.dll + +public class C +{ + public static void Main () + { + var val = B.ArrayMember; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0070-2.cs b/mcs/errors/cs0070-2.cs new file mode 100644 index 0000000000..95f9cdb61d --- /dev/null +++ b/mcs/errors/cs0070-2.cs @@ -0,0 +1,24 @@ +// CS0070: The event `A.evt' can only appear on the left hand side of += or -= when used outside of the type `A' +// Line: 22 + +using System; + +public static class EventExtensions +{ + public static void Raise (this EventHandler h) + { + } +} + +public class A +{ + public event EventHandler evt; +} + +public class B : A +{ + public void Run() + { + Action a = () => evt.Raise (); + } +} \ No newline at end of file diff --git a/mcs/errors/cs0100-8.cs b/mcs/errors/cs0100-8.cs new file mode 100644 index 0000000000..8248511448 --- /dev/null +++ b/mcs/errors/cs0100-8.cs @@ -0,0 +1,7 @@ +// CS100: The parameter name `obj' is a duplicate +// Line: 6 + +abstract class C +{ + public abstract int this [object obj, object obj] => 1; +} \ No newline at end of file diff --git a/mcs/errors/cs0102-99.cs b/mcs/errors/cs0102-99.cs deleted file mode 100644 index b07a24633a..0000000000 --- a/mcs/errors/cs0102-99.cs +++ /dev/null @@ -1,11 +0,0 @@ -// CS0102: The type `Part' already contains a definition for `arg' -// Line: 6 - -partial class Part -{ - int arg; -} - -partial class Part(int arg) -{ -} \ No newline at end of file diff --git a/mcs/errors/cs9006.cs b/mcs/errors/cs0103-13.cs similarity index 52% rename from mcs/errors/cs9006.cs rename to mcs/errors/cs0103-13.cs index 4420f2fe33..891a1559d3 100644 --- a/mcs/errors/cs9006.cs +++ b/mcs/errors/cs0103-13.cs @@ -1,4 +1,4 @@ -// CS9006: An object reference is required to access primary constructor parameter `value' +// CS0103: The name `value' does not exist in the current context // Line: 8 class X (double value) diff --git a/mcs/errors/cs0103-14.cs b/mcs/errors/cs0103-14.cs new file mode 100644 index 0000000000..80f1e629f6 --- /dev/null +++ b/mcs/errors/cs0103-14.cs @@ -0,0 +1,10 @@ +// C0103: The name `s' does not exist in the current context +// Line: 7 + +class Test(string s) +{ + public Test () + : this (s) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0121-25.cs b/mcs/errors/cs0121-25.cs new file mode 100644 index 0000000000..4461673c74 --- /dev/null +++ b/mcs/errors/cs0121-25.cs @@ -0,0 +1,33 @@ +// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)' +// Line: 31 + +using A.B.X; +using A.C.X; + +namespace A.B +{ + static class X + { + public static void Test (int o) + { + } + } +} + +namespace A.C +{ + static class X + { + public static int Test (int o) + { + } + } +} + +class M +{ + public static void Main () + { + Test (0); + } +} \ No newline at end of file diff --git a/mcs/errors/cs0133-6.cs b/mcs/errors/cs0133-6.cs new file mode 100644 index 0000000000..a523169cdb --- /dev/null +++ b/mcs/errors/cs0133-6.cs @@ -0,0 +1,10 @@ +// CS0133: The expression being assigned to `o' must be constant +// Line: 8 + +class X +{ + void Foo () + { + const object o = "" ?? null; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0133-7.cs b/mcs/errors/cs0133-7.cs new file mode 100644 index 0000000000..10d82d9fe5 --- /dev/null +++ b/mcs/errors/cs0133-7.cs @@ -0,0 +1,10 @@ +// CS0133: The expression being assigned to `o' must be constant +// Line: 8 + +class X +{ + void Foo () + { + const object o = null ?? ""; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0136-18.cs b/mcs/errors/cs0136-18.cs new file mode 100644 index 0000000000..20630a4bcf --- /dev/null +++ b/mcs/errors/cs0136-18.cs @@ -0,0 +1,13 @@ +// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else +// Line: 11 + +using System; + +class A (Func barg) +{ +} + +class B (int arg) + : A ((arg) => 1) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs0136-19.cs b/mcs/errors/cs0136-19.cs new file mode 100644 index 0000000000..ae9e0f606e --- /dev/null +++ b/mcs/errors/cs0136-19.cs @@ -0,0 +1,13 @@ +// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else +// Line: 11 + +using System; + +partial class PC +{ + Func f = (arg) => 1; +} + +partial class PC (int arg) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs0138.cs b/mcs/errors/cs0138.cs index ea0010ea51..8264e8dbf2 100644 --- a/mcs/errors/cs0138.cs +++ b/mcs/errors/cs0138.cs @@ -1,5 +1,6 @@ // CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces // Line: 5 +// Compiler options: -langversion:5 using System; using System.Console; diff --git a/mcs/errors/cs0151-3.cs b/mcs/errors/cs0151-3.cs new file mode 100644 index 0000000000..7644373545 --- /dev/null +++ b/mcs/errors/cs0151-3.cs @@ -0,0 +1,19 @@ +// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 15 + +struct X +{ + public static implicit operator int (X x) + { + return 1; + } + + static void Main () + { + X? x = null; + switch (x) { + default: + break; + } + } +} diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs new file mode 100644 index 0000000000..0e45b1a904 --- /dev/null +++ b/mcs/errors/cs0151-4.cs @@ -0,0 +1,30 @@ +// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 24 + +using System; + +struct S1 +{ + public static implicit operator int? (S1? s) + { + throw new ApplicationException (); + } + + public static implicit operator int (S1? s) + { + throw new ApplicationException (); + } +} + +class C +{ + public static int Main () + { + S1? s1 = new S1 (); + switch (s1) + { + default: + return 1; + } + } +} \ No newline at end of file diff --git a/mcs/errors/cs0151-5.cs b/mcs/errors/cs0151-5.cs new file mode 100644 index 0000000000..3995a28675 --- /dev/null +++ b/mcs/errors/cs0151-5.cs @@ -0,0 +1,19 @@ +// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type +// Line: 19 + +struct X +{ + public static implicit operator int? (X x) + { + return 1; + } + + static void Main () + { + X? x = null; + switch (x) { + default: + break; + } + } +} diff --git a/mcs/errors/cs0182-10.cs b/mcs/errors/cs0181-2.cs similarity index 68% rename from mcs/errors/cs0182-10.cs rename to mcs/errors/cs0181-2.cs index 1ce2d2f48d..6334606fae 100644 --- a/mcs/errors/cs0182-10.cs +++ b/mcs/errors/cs0181-2.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `int[][]', which is not a valid attribute parameter type // Line: 13 using System; diff --git a/mcs/errors/cs0182-12.cs b/mcs/errors/cs0181-3.cs similarity index 56% rename from mcs/errors/cs0182-12.cs rename to mcs/errors/cs0181-3.cs index 2827f63c7b..6e2f5b6ff0 100644 --- a/mcs/errors/cs0182-12.cs +++ b/mcs/errors/cs0181-3.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `System.Enum', which is not a valid attribute parameter type // Line: 18 using System; diff --git a/mcs/errors/cs0182-13.cs b/mcs/errors/cs0181-4.cs similarity index 57% rename from mcs/errors/cs0182-13.cs rename to mcs/errors/cs0181-4.cs index 8c764b28d0..80ed5629a9 100644 --- a/mcs/errors/cs0182-13.cs +++ b/mcs/errors/cs0181-4.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `System.Attribute', which is not a valid attribute parameter type // Line: 6 using System; diff --git a/mcs/errors/cs0182-2.cs b/mcs/errors/cs0181.cs similarity index 60% rename from mcs/errors/cs0182-2.cs rename to mcs/errors/cs0181.cs index b988a04a1e..f04342c4a8 100644 --- a/mcs/errors/cs0182-2.cs +++ b/mcs/errors/cs0181.cs @@ -1,4 +1,4 @@ -// CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression +// CS0181: Attribute constructor parameter has type `int[,]', which is not a valid attribute parameter type // Line: 13 using System; diff --git a/mcs/errors/cs0253-3.cs b/mcs/errors/cs0253-3.cs new file mode 100644 index 0000000000..0cf7968f7c --- /dev/null +++ b/mcs/errors/cs0253-3.cs @@ -0,0 +1,15 @@ +// CS0253: Possible unintended reference comparison. Consider casting the right side expression to type `System.Action' to get value comparison +// Line: 13 +// Compiler options: -warnaserror + +using System; + +class MainClass +{ + public static void Main () + { + Action a = null; + object b = null; + var x = a == b; + } +} \ No newline at end of file diff --git a/mcs/errors/cs0457-4.cs b/mcs/errors/cs0457-4.cs new file mode 100644 index 0000000000..787db3ab47 --- /dev/null +++ b/mcs/errors/cs0457-4.cs @@ -0,0 +1,27 @@ +// CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D' +// Line: 25 + +using System; + +public delegate void Foo (); + +class D +{ + public static implicit operator D (Action d) + { + return new D (); + } + + public static explicit operator D (Foo d) + { + return new D (); + } +} + +class Program +{ + static void Main() + { + D d = (D) Main; + } +} diff --git a/mcs/errors/cs0573-2.cs b/mcs/errors/cs0573-2.cs deleted file mode 100644 index 50836def0e..0000000000 --- a/mcs/errors/cs0573-2.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0573: `A.a': Structs cannot have instance field initializers -// Line: 5 - -partial struct A { - int a = 1; -} diff --git a/mcs/errors/cs0573.cs b/mcs/errors/cs0573.cs deleted file mode 100644 index deec3ea655..0000000000 --- a/mcs/errors/cs0573.cs +++ /dev/null @@ -1,13 +0,0 @@ -// CS0573: `A.a': Structs cannot have instance field initializers -// Line: 5 -struct A { - int a = 1; -} - -class D { - static void Main () - { - A [] a = new A [10]; - - } -} diff --git a/mcs/errors/cs0579-9.cs b/mcs/errors/cs0579-9.cs new file mode 100644 index 0000000000..43461affc4 --- /dev/null +++ b/mcs/errors/cs0579-9.cs @@ -0,0 +1,22 @@ +// CS0579: The attribute `TestAttributesCollecting.A' cannot be applied multiple times +// Line: 19 + +using System; + +namespace TestAttributesCollecting +{ + class A : Attribute + { + public A (int a) + { + } + } + + partial class G1<[A (1)]T> + { + } + + partial class G1<[A (2)]T> + { + } +} diff --git a/mcs/errors/cs0591-2.cs b/mcs/errors/cs0591-2.cs new file mode 100644 index 0000000000..31df0431f6 --- /dev/null +++ b/mcs/errors/cs0591-2.cs @@ -0,0 +1,9 @@ +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.GuidAttribute' attribute +// Line: 6 + +using System.Runtime.InteropServices; + +[Guid ("aaa")] +class X { +static void Main () {} +} diff --git a/mcs/errors/cs0647-12.cs b/mcs/errors/cs0591-3.cs similarity index 55% rename from mcs/errors/cs0647-12.cs rename to mcs/errors/cs0591-3.cs index f1d8370235..8254a5b819 100644 --- a/mcs/errors/cs0647-12.cs +++ b/mcs/errors/cs0591-3.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null' +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute // Line: 8 using System.Runtime.InteropServices; diff --git a/mcs/errors/cs0647-13.cs b/mcs/errors/cs0591-4.cs similarity index 55% rename from mcs/errors/cs0647-13.cs rename to mcs/errors/cs0591-4.cs index 96751a139a..adf1ff5aef 100644 --- a/mcs/errors/cs0647-13.cs +++ b/mcs/errors/cs0591-4.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.DllImportAttribute' attribute. The reason is `DllName cannot be empty or null' +// CS0591: Invalid value for argument to `System.Runtime.InteropServices.DllImportAttribute' attribute // Line: 8 using System.Runtime.InteropServices; diff --git a/mcs/errors/cs0591-5.cs b/mcs/errors/cs0591-5.cs new file mode 100644 index 0000000000..964dca945c --- /dev/null +++ b/mcs/errors/cs0591-5.cs @@ -0,0 +1,12 @@ +// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute +// Line: 8 + +using System.Runtime.CompilerServices; + +class Test +{ + [MethodImplAttribute(445)] + public void test () + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0591-6.cs b/mcs/errors/cs0591-6.cs new file mode 100644 index 0000000000..b9a4b2eac6 --- /dev/null +++ b/mcs/errors/cs0591-6.cs @@ -0,0 +1,12 @@ +// CS0591: Invalid value for argument to `System.Runtime.CompilerServices.MethodImplAttribute' attribute +// Line: 8 + +using System.Runtime.CompilerServices; + +class Program +{ + [MethodImpl((MethodImplOptions)255)] + void Foo() + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs0591.cs b/mcs/errors/cs0591.cs index 8d5dc46a00..6ffbe846b0 100644 --- a/mcs/errors/cs0591.cs +++ b/mcs/errors/cs0591.cs @@ -1,4 +1,4 @@ -// CS0591: Invalid value for argument to `System.AttributeUsage' attribute +// CS0591: Invalid value for argument to `System.AttributeUsageAttribute' attribute // Line: 4 [System.AttributeUsage(0)] diff --git a/mcs/errors/cs0647-15.cs b/mcs/errors/cs0647-15.cs deleted file mode 100644 index 104d2dbd0a..0000000000 --- a/mcs/errors/cs0647-15.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value' -// Line: 8 - -using System.Runtime.CompilerServices; - -class Test -{ - [MethodImplAttribute(445)] - public void test () - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs0647-18.cs b/mcs/errors/cs0647-18.cs deleted file mode 100644 index ce57d73d60..0000000000 --- a/mcs/errors/cs0647-18.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.0.*.*' is not valid' -// Line: 6 - -using System.Reflection; - -[assembly: AssemblyVersion("2.0.*.*")] diff --git a/mcs/errors/cs0647-19.cs b/mcs/errors/cs0647-19.cs deleted file mode 100644 index 25b040038e..0000000000 --- a/mcs/errors/cs0647-19.cs +++ /dev/null @@ -1,6 +0,0 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `2.*' is not valid' -// Line: 6 - -using System.Reflection; - -[assembly: AssemblyVersion("2.*")] diff --git a/mcs/errors/cs0647-20.cs b/mcs/errors/cs0647-20.cs deleted file mode 100644 index 2b03f1cbc1..0000000000 --- a/mcs/errors/cs0647-20.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value' -// Line: 8 - -using System.Runtime.CompilerServices; - -class Program -{ - [MethodImpl((MethodImplOptions)255)] - void Foo() - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs0647.cs b/mcs/errors/cs0647.cs deleted file mode 100644 index 154bfff54d..0000000000 --- a/mcs/errors/cs0647.cs +++ /dev/null @@ -1,9 +0,0 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.GuidAttribute' attribute. The reason is `Invalid Guid format: aaa' -// Line: 6 - -using System.Runtime.InteropServices; - -[Guid ("aaa")] -class X { -static void Main () {} -} diff --git a/mcs/errors/cs0657-23.cs b/mcs/errors/cs0657-23.cs new file mode 100644 index 0000000000..2e6f6a6138 --- /dev/null +++ b/mcs/errors/cs0657-23.cs @@ -0,0 +1,14 @@ +// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored +// Line: 9 +// Compiler options: -warnaserror + +using System; + +public class FieldAttribute : System.Attribute +{ +} + +class X ([field:FieldAttribute] int foo) +{ + int v = foo; +} diff --git a/mcs/errors/cs0837-2.cs b/mcs/errors/cs0837-2.cs index 94c1f8510b..eea4c130ea 100644 --- a/mcs/errors/cs0837-2.cs +++ b/mcs/errors/cs0837-2.cs @@ -1,6 +1,5 @@ -// CS0837: The `as' operator cannot be applied to a lambda expression or anonymous method -// Line: 15 - +// CS0837: The `as' operator cannot be applied to a lambda expression, anonymous method, or method group +// Line: 14 class X { diff --git a/mcs/errors/cs0837-3.cs b/mcs/errors/cs0837-3.cs new file mode 100644 index 0000000000..de7ffd2c0a --- /dev/null +++ b/mcs/errors/cs0837-3.cs @@ -0,0 +1,12 @@ +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group +// Line: 10 + +using System; + +class Test +{ + static void Main () + { + var res = Main is object; + } +} \ No newline at end of file diff --git a/mcs/errors/cs1953.cs b/mcs/errors/cs0837-4.cs similarity index 60% rename from mcs/errors/cs1953.cs rename to mcs/errors/cs0837-4.cs index ba5dbad043..bc11afa0c9 100644 --- a/mcs/errors/cs1953.cs +++ b/mcs/errors/cs0837-4.cs @@ -1,4 +1,4 @@ -// CS1953: An expression tree cannot contain an expression with method group +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group // Line: 11 using System; diff --git a/mcs/errors/cs0837.cs b/mcs/errors/cs0837.cs index 7c56fd1add..c2ca9b8732 100644 --- a/mcs/errors/cs0837.cs +++ b/mcs/errors/cs0837.cs @@ -1,4 +1,4 @@ -// CS0837: The `is' operator cannot be applied to a lambda expression or anonymous method +// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group // Line: 8 class X diff --git a/mcs/errors/cs0840.cs b/mcs/errors/cs0840.cs deleted file mode 100644 index bc4ee41605..0000000000 --- a/mcs/errors/cs0840.cs +++ /dev/null @@ -1,8 +0,0 @@ -// CS0840: `Test.Property.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors -// Line: 7 - - -public abstract class Test -{ - public string Property { get; } -} diff --git a/mcs/errors/cs1501-17.cs b/mcs/errors/cs1501-17.cs new file mode 100644 index 0000000000..ac575643f4 --- /dev/null +++ b/mcs/errors/cs1501-17.cs @@ -0,0 +1,14 @@ +// CS1501: No overload for method `Foo' takes `0' arguments +// Line: 12 + +class C +{ + static void Foo (string foo, params object [] moreFoo) + { + } + + static void Main () + { + Foo (); + } +} \ No newline at end of file diff --git a/mcs/errors/cs1525-42.cs b/mcs/errors/cs1525-42.cs index 87f9e86f9a..dc8b7ce4da 100644 --- a/mcs/errors/cs1525-42.cs +++ b/mcs/errors/cs1525-42.cs @@ -1,4 +1,4 @@ -// CS1525: Unexpected symbol `}', expecting `(' or `{' +// CS1525: Unexpected symbol `}', expecting `(', `{', or `=>' // Line: 6 class MyClass diff --git a/mcs/errors/cs1607-2.cs b/mcs/errors/cs1607-2.cs deleted file mode 100644 index 2d0c3de135..0000000000 --- a/mcs/errors/cs1607-2.cs +++ /dev/null @@ -1,7 +0,0 @@ -// CS1607: The version number `1.*' specified for `AssemblyFileVersion' is invalid -// Line: 7 -// Compiler options: -warnaserror - -using System.Reflection; - -[assembly: AssemblyFileVersion ("1.*")] diff --git a/mcs/errors/cs1607-3.cs b/mcs/errors/cs1607-3.cs deleted file mode 100644 index 9268dfd04c..0000000000 --- a/mcs/errors/cs1607-3.cs +++ /dev/null @@ -1,13 +0,0 @@ -// CS1607: Referenced assembly `CS1607-3-lib' has different culture setting of `en-US' -// Line: 0 -// Compiler options: -r:CS1607-3-lib.dll -warnaserror - -using System; - -class Program -{ - static void Main () - { - Console.WriteLine (typeof (Lang)); - } -} diff --git a/mcs/errors/cs1617.cs b/mcs/errors/cs1617.cs index 6feb97925c..88f9c12dec 100644 --- a/mcs/errors/cs1617.cs +++ b/mcs/errors/cs1617.cs @@ -1,3 +1,3 @@ -// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future' +// CS1617: Invalid -langversion option `ISO'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6 // Line: 0 // Compiler options: -langversion:ISO diff --git a/mcs/errors/cs1644-19.cs b/mcs/errors/cs1644-19.cs index ce867d1e71..fe4e494dd3 100644 --- a/mcs/errors/cs1644-19.cs +++ b/mcs/errors/cs1644-19.cs @@ -1,4 +1,4 @@ -// CS1644: Feature `automatically implemented properties' cannot be used because it is not part of the C# 2.0 language specification +// CS1644: Feature `auto-implemented properties' cannot be used because it is not part of the C# 2.0 language specification // Line: 7 // Compiler options: -langversion:ISO-2 diff --git a/mcs/errors/cs1644-35.cs b/mcs/errors/cs1644-35.cs new file mode 100644 index 0000000000..c97b37d9db --- /dev/null +++ b/mcs/errors/cs1644-35.cs @@ -0,0 +1,17 @@ +// CS1644: Feature `exception filter' cannot be used because it is not part of the C# 5.0 language specification +// Line: 14 +// Compiler options: -langversion:5 + +using System; + +class X +{ + public static void Main () + { + int x = 4; + try { + throw null; + } catch (Exception) if (x > 0) { + } + } +} diff --git a/mcs/errors/cs1644-36.cs b/mcs/errors/cs1644-36.cs new file mode 100644 index 0000000000..df2d30be8f --- /dev/null +++ b/mcs/errors/cs1644-36.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `auto-implemented property initializer' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + public static int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-37.cs b/mcs/errors/cs1644-37.cs new file mode 100644 index 0000000000..37c997ff63 --- /dev/null +++ b/mcs/errors/cs1644-37.cs @@ -0,0 +1,7 @@ +// CS1644: Feature `primary constructor' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C (int arg) +{ +} \ No newline at end of file diff --git a/mcs/errors/cs1644-38.cs b/mcs/errors/cs1644-38.cs new file mode 100644 index 0000000000..0adbe60e74 --- /dev/null +++ b/mcs/errors/cs1644-38.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int Prop => 3; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-39.cs b/mcs/errors/cs1644-39.cs new file mode 100644 index 0000000000..877c248e87 --- /dev/null +++ b/mcs/errors/cs1644-39.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int M () => 0; +} \ No newline at end of file diff --git a/mcs/errors/cs1644-40.cs b/mcs/errors/cs1644-40.cs new file mode 100644 index 0000000000..43ea9b022d --- /dev/null +++ b/mcs/errors/cs1644-40.cs @@ -0,0 +1,8 @@ +// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification +// Line: 7 +// Compiler options: -langversion:5 + +class C +{ + int this [long arg] => -9; +} \ No newline at end of file diff --git a/mcs/errors/cs1650-3.cs b/mcs/errors/cs1650-3.cs new file mode 100644 index 0000000000..e0cfa0c6ef --- /dev/null +++ b/mcs/errors/cs1650-3.cs @@ -0,0 +1,19 @@ +// CS1650: Fields of static readonly field `C.t' cannot be assigned to (except in a static constructor or a variable initializer) +// Line: 17 + +using System; + +interface I +{ + int X { get; set; } +} + +class C where T : struct, I +{ + static readonly T t; + + public static void Foo () + { + t.X = 42; + } +} diff --git a/mcs/errors/cs1700.cs b/mcs/errors/cs1700.cs index 4b2021994c..975a2f2c7a 100644 --- a/mcs/errors/cs1700.cs +++ b/mcs/errors/cs1700.cs @@ -1,4 +1,4 @@ -// CS1700: Assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved +// CS1700: Friend assembly reference `MyAssemblyName, Version=' is invalid and cannot be resolved // Line: 8 // Compiler options: -warnaserror -warn:3 diff --git a/mcs/errors/cs1984.cs b/mcs/errors/cs1984.cs deleted file mode 100644 index cf998413a1..0000000000 --- a/mcs/errors/cs1984.cs +++ /dev/null @@ -1,21 +0,0 @@ -// CS1984: The `await' operator cannot be used in the body of a finally clause -// Line: 13 - -using System; -using System.Threading.Tasks; - -class C -{ - public async Task Test () - { - try { - } finally { - await Call (); - } - } - - static Task Call () - { - return null; - } -} diff --git a/mcs/errors/cs1985-2.cs b/mcs/errors/cs1985-2.cs deleted file mode 100644 index 788d0e79ec..0000000000 --- a/mcs/errors/cs1985-2.cs +++ /dev/null @@ -1,27 +0,0 @@ -// CS1985: The `await' operator cannot be used in a catch clause -// Line: 18 - -using System; -using System.Threading.Tasks; - -class X -{ - public static void Main () - { - } - - static async Task Test () - { - int x = 4; - try { - throw null; - } catch (NullReferenceException) if (await Foo ()) { - return; - } - } - - static Task Foo () - { - throw new NotImplementedException (); - } -} \ No newline at end of file diff --git a/mcs/errors/cs1985.cs b/mcs/errors/cs1985.cs deleted file mode 100644 index 62d3642f82..0000000000 --- a/mcs/errors/cs1985.cs +++ /dev/null @@ -1,21 +0,0 @@ -// CS1985: The `await' operator cannot be used in a catch clause -// Line: 13 - -using System; -using System.Threading.Tasks; - -class C -{ - public async Task Test () - { - try { - } catch { - await Call (); - } - } - - static Task Call () - { - return null; - } -} diff --git a/mcs/errors/cs1997-2.cs b/mcs/errors/cs1997-2.cs deleted file mode 100644 index 9f8c533f51..0000000000 --- a/mcs/errors/cs1997-2.cs +++ /dev/null @@ -1,17 +0,0 @@ -// CS1997: `System.Func': A return keyword must not be followed by an expression when async delegate returns `Task'. Consider using `Task' return type -// Line: 12 - -using System; -using System.Threading.Tasks; - -class Test -{ - public static void Main() - { - Func t = async delegate { - return null; - }; - - return; - } -} diff --git a/mcs/errors/cs4017.cs b/mcs/errors/cs4017.cs index e0e7caa4fb..f6ac27d07e 100644 --- a/mcs/errors/cs4017.cs +++ b/mcs/errors/cs4017.cs @@ -1,4 +1,4 @@ -// CS4017: The CallerMemberName attribute cannot be applied because there is no standard conversion from `int' to `byte' +// CS4017: The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `int' to `byte' // Line: 8 using System.Runtime.CompilerServices; diff --git a/mcs/errors/cs4024.cs b/mcs/errors/cs4024.cs new file mode 100644 index 0000000000..d3360ed7cd --- /dev/null +++ b/mcs/errors/cs4024.cs @@ -0,0 +1,17 @@ +// CS4024: The CallerLineNumberAttribute applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (int x = 2); +} + +partial class D +{ + partial void Foo ([CallerLineNumber] int x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4025.cs b/mcs/errors/cs4025.cs new file mode 100644 index 0000000000..6e9f203043 --- /dev/null +++ b/mcs/errors/cs4025.cs @@ -0,0 +1,17 @@ +// CS4025: The CallerFilePath applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (string x = "x"); +} + +partial class D +{ + partial void Foo ([CallerFilePath] string x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4026.cs b/mcs/errors/cs4026.cs new file mode 100644 index 0000000000..94977002f3 --- /dev/null +++ b/mcs/errors/cs4026.cs @@ -0,0 +1,17 @@ +// CS4026: The CallerMemberName applied to parameter `x' will have no effect because it applies to a member that is used in context that do not allow optional arguments +// Line: 14 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +partial class D +{ + partial void Foo (string x = "x"); +} + +partial class D +{ + partial void Foo ([CallerMemberName] string x) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs4029.cs b/mcs/errors/cs4029.cs new file mode 100644 index 0000000000..14fce4f458 --- /dev/null +++ b/mcs/errors/cs4029.cs @@ -0,0 +1,19 @@ +// CS4029: Cannot return an expression of type `void' +// Line: 15 + +using System; +using System.Threading.Tasks; + +class C +{ + static void Foo (Func> f) + { + } + + static void Main () + { + Foo (async () => { + return await Task.Factory.StartNew (() => { }); + }); + } +} \ No newline at end of file diff --git a/mcs/errors/cs7007.cs b/mcs/errors/cs7007.cs new file mode 100644 index 0000000000..a343757db8 --- /dev/null +++ b/mcs/errors/cs7007.cs @@ -0,0 +1,9 @@ +// CS7007: `X' is not a static class. A using namespace directive can only be applied to static classes or namespace +// Line: 5 +// Compiler options: -langversion:6 + +using X; + +class X +{ +} \ No newline at end of file diff --git a/mcs/errors/cs7023-2.cs b/mcs/errors/cs7023-2.cs new file mode 100644 index 0000000000..ee14e24f96 --- /dev/null +++ b/mcs/errors/cs7023-2.cs @@ -0,0 +1,10 @@ +// CS7023: The second operand of `is' or `as' operator cannot be static type `X' +// Line: 8 + +static class X +{ + public static void Main () + { + var v = null is X; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7023.cs b/mcs/errors/cs7023.cs new file mode 100644 index 0000000000..dae17caa41 --- /dev/null +++ b/mcs/errors/cs7023.cs @@ -0,0 +1,10 @@ +// CS7023: The second operand of `is' or `as' operator cannot be static type `X' +// Line: 8 + +static class X +{ + public static void Main () + { + var v = null as X; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7025.cs b/mcs/errors/cs7025.cs new file mode 100644 index 0000000000..59eca472d2 --- /dev/null +++ b/mcs/errors/cs7025.cs @@ -0,0 +1,13 @@ +// CS7025: Inconsistent accessibility: event type `System.Action' is less accessible than event `C.E' +// Line: 8 + +using System; + +public class C +{ + public event Action E; +} + +interface I +{ +} \ No newline at end of file diff --git a/mcs/errors/cs7030.cs b/mcs/errors/cs7030.cs new file mode 100644 index 0000000000..01abf11288 --- /dev/null +++ b/mcs/errors/cs7030.cs @@ -0,0 +1,6 @@ +// CS7030: Friend assembly reference cannot have `null' value +// Line: 6 + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo (null)] diff --git a/mcs/errors/cs7034-2.cs b/mcs/errors/cs7034-2.cs new file mode 100644 index 0000000000..b769869436 --- /dev/null +++ b/mcs/errors/cs7034-2.cs @@ -0,0 +1,6 @@ +// CS7034: The specified version string `2.0.*.*' does not conform to the required format - major[.minor[.build[.revision]]] +// Line: 6 + +using System.Reflection; + +[assembly: AssemblyVersion("2.0.*.*")] diff --git a/mcs/errors/cs7034-3.cs b/mcs/errors/cs7034-3.cs new file mode 100644 index 0000000000..a406b0f7d6 --- /dev/null +++ b/mcs/errors/cs7034-3.cs @@ -0,0 +1,6 @@ +// CS7034: The specified version string `2.*' does not conform to the required format - major[.minor[.build[.revision]]] +// Line: 6 + +using System.Reflection; + +[assembly: AssemblyVersion("2.*")] diff --git a/mcs/errors/cs0647-17.cs b/mcs/errors/cs7034.cs similarity index 52% rename from mcs/errors/cs0647-17.cs rename to mcs/errors/cs7034.cs index 88117de831..071535be25 100644 --- a/mcs/errors/cs0647-17.cs +++ b/mcs/errors/cs7034.cs @@ -1,4 +1,4 @@ -// Cs0647: Error during emitting `System.Reflection.AssemblyVersionAttribute' attribute. The reason is `Specified version `0.0.0.80420' is not valid' +// CS7034: The specified version string `0.0.0.80420' does not conform to the required format - major[.minor[.build[.revision]]] // Line: 7 using System; diff --git a/mcs/errors/cs7035.cs b/mcs/errors/cs7035.cs new file mode 100644 index 0000000000..0d27cb00be --- /dev/null +++ b/mcs/errors/cs7035.cs @@ -0,0 +1,7 @@ +// CS7035: The specified version string `1.*' does not conform to the recommended format major.minor.build.revision +// Line: 7 +// Compiler options: -warnaserror + +using System.Reflection; + +[assembly: AssemblyFileVersion ("1.*")] diff --git a/mcs/errors/cs7042-2.cs b/mcs/errors/cs7042-2.cs new file mode 100644 index 0000000000..a70c129019 --- /dev/null +++ b/mcs/errors/cs7042-2.cs @@ -0,0 +1,10 @@ +// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type +// Line: 9 + +using System.Runtime.InteropServices; + +public class C +{ + [DllImport ("my.dll")] + static extern void Foo (); +} \ No newline at end of file diff --git a/mcs/errors/cs7042.cs b/mcs/errors/cs7042.cs new file mode 100644 index 0000000000..efebf84dc6 --- /dev/null +++ b/mcs/errors/cs7042.cs @@ -0,0 +1,10 @@ +// CS7042: The DllImport attribute cannot be applied to a method that is generic or contained in a generic type +// Line: 9 + +using System.Runtime.InteropServices; + +public class C +{ + [DllImport ("my.dll")] + static extern void Foo (); +} \ No newline at end of file diff --git a/mcs/errors/cs0647-9.cs b/mcs/errors/cs7049.cs similarity index 56% rename from mcs/errors/cs0647-9.cs rename to mcs/errors/cs7049.cs index a7a1b38729..91114e8afc 100644 --- a/mcs/errors/cs0647-9.cs +++ b/mcs/errors/cs7049.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.PrincipalPermissionAttribute' attribute. The reason is `SecurityAction is out of range' -// Line : 10 +// CS7049: Security attribute `System.Security.Permissions.PrincipalPermissionAttribute' has an invalid SecurityAction value `100' +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-2.cs b/mcs/errors/cs7050.cs similarity index 50% rename from mcs/errors/cs0647-2.cs rename to mcs/errors/cs7050.cs index 5e05cfb18a..6909f18500 100644 --- a/mcs/errors/cs0647-2.cs +++ b/mcs/errors/cs7050.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `Demand' is not valid for this declaration' -// Line : 10 +// CS7050: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to an assembly +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-3.cs b/mcs/errors/cs7051.cs similarity index 57% rename from mcs/errors/cs0647-3.cs rename to mcs/errors/cs7051.cs index 272855dcfc..2d18f11b4a 100644 --- a/mcs/errors/cs0647-3.cs +++ b/mcs/errors/cs7051.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `System.Security.Permissions.SecurityPermissionAttribute' attribute. The reason is `SecurityAction `RequestMinimum' is not valid for this declaration' -// Line : 10 +// CS7051: SecurityAction value `System.Security.Permissions.SecurityAction' is invalid for security attributes applied to a type or a method +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs0647-11.cs b/mcs/errors/cs7055-2.cs similarity index 59% rename from mcs/errors/cs0647-11.cs rename to mcs/errors/cs7055-2.cs index aa5c0e3f95..f2c15a8d22 100644 --- a/mcs/errors/cs0647-11.cs +++ b/mcs/errors/cs7055-2.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields' +// CS7055: Unmanaged type `ByValArray' is only valid for fields // Line: 10 using System; diff --git a/mcs/errors/cs0647-10.cs b/mcs/errors/cs7055.cs similarity index 59% rename from mcs/errors/cs0647-10.cs rename to mcs/errors/cs7055.cs index aa5c0e3f95..f2c15a8d22 100644 --- a/mcs/errors/cs0647-10.cs +++ b/mcs/errors/cs7055.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Runtime.InteropServices.MarshalAsAttribute' attribute. The reason is `Specified unmanaged type is only valid on fields' +// CS7055: Unmanaged type `ByValArray' is only valid for fields // Line: 10 using System; diff --git a/mcs/errors/cs0647-16.cs b/mcs/errors/cs7059.cs similarity index 57% rename from mcs/errors/cs0647-16.cs rename to mcs/errors/cs7059.cs index 41c3e0572c..f19fd02f36 100644 --- a/mcs/errors/cs0647-16.cs +++ b/mcs/errors/cs7059.cs @@ -1,4 +1,4 @@ -// CS0647: Error during emitting `System.Reflection.AssemblyCultureAttribute' attribute. The reason is `The executables cannot be satelite assemblies, remove the attribute or keep it empty' +// CS7059: Executables cannot be satellite assemblies. Remove the attribute or keep it empty // Line: 7 using System; diff --git a/mcs/errors/cs0647-5.cs b/mcs/errors/cs7070-2.cs similarity index 76% rename from mcs/errors/cs0647-5.cs rename to mcs/errors/cs7070-2.cs index 20917f3925..e618405b3c 100644 --- a/mcs/errors/cs0647-5.cs +++ b/mcs/errors/cs7070-2.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-7.cs b/mcs/errors/cs7070-3.cs similarity index 76% rename from mcs/errors/cs0647-7.cs rename to mcs/errors/cs7070-3.cs index 314fafed73..907993dd31 100644 --- a/mcs/errors/cs0647-7.cs +++ b/mcs/errors/cs7070-3.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-6.cs b/mcs/errors/cs7070-4.cs similarity index 75% rename from mcs/errors/cs0647-6.cs rename to mcs/errors/cs7070-4.cs index 9e7c37e96b..a2c43a5d29 100644 --- a/mcs/errors/cs0647-6.cs +++ b/mcs/errors/cs7070-4.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 11 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 11 using System; using System.Security; diff --git a/mcs/errors/cs0647-4.cs b/mcs/errors/cs7070.cs similarity index 73% rename from mcs/errors/cs0647-4.cs rename to mcs/errors/cs7070.cs index d799ceee36..599a1808ff 100644 --- a/mcs/errors/cs0647-4.cs +++ b/mcs/errors/cs7070.cs @@ -1,5 +1,5 @@ -// CS0647: Error during emitting `DebugPermissionAttribute' attribute. The reason is `it is attached to invalid parent' -// Line : 10 +// CS7070: Security attribute `DebugPermissionAttribute' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations +// Line: 10 using System; using System.Security; diff --git a/mcs/errors/cs7080.cs b/mcs/errors/cs7080.cs new file mode 100644 index 0000000000..4da50751b9 --- /dev/null +++ b/mcs/errors/cs7080.cs @@ -0,0 +1,12 @@ +// CS7080: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerFilePathAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerMemberName, CallerFilePath] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7081.cs b/mcs/errors/cs7081.cs new file mode 100644 index 0000000000..20597c1465 --- /dev/null +++ b/mcs/errors/cs7081.cs @@ -0,0 +1,12 @@ +// CS7081: The CallerMemberNameAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerMemberName, CallerLineNumber] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7082.cs b/mcs/errors/cs7082.cs new file mode 100644 index 0000000000..1b02bd5c8d --- /dev/null +++ b/mcs/errors/cs7082.cs @@ -0,0 +1,12 @@ +// CS7082: The CallerFilePathAttribute applied to parameter `o' will have no effect. It is overridden by the CallerLineNumberAttribute +// Line: 9 +// Compiler options: -warnaserror + +using System.Runtime.CompilerServices; + +class D +{ + void Foo ([CallerFilePath, CallerLineNumber] object o = null) + { + } +} \ No newline at end of file diff --git a/mcs/errors/cs7083-2.cs b/mcs/errors/cs7083-2.cs new file mode 100644 index 0000000000..14d378fee8 --- /dev/null +++ b/mcs/errors/cs7083-2.cs @@ -0,0 +1,10 @@ +// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `false' +// Line: 8 + +class C +{ + dynamic M (dynamic d) + { + return this && d; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7083.cs b/mcs/errors/cs7083.cs new file mode 100644 index 0000000000..5f359c3df6 --- /dev/null +++ b/mcs/errors/cs7083.cs @@ -0,0 +1,10 @@ +// CS7083: Expression must be implicitly convertible to Boolean or its type `C' must define operator `true' +// Line: 8 + +class C +{ + dynamic M (dynamic d) + { + return this || d; + } +} \ No newline at end of file diff --git a/mcs/errors/cs7094.cs b/mcs/errors/cs7094.cs new file mode 100644 index 0000000000..93cd6372f8 --- /dev/null +++ b/mcs/errors/cs7094.cs @@ -0,0 +1,15 @@ +// CS7094: The `await' operator cannot be used in the filter expression of a catch clause +// Line: 12 + +using System.Threading.Tasks; + +class Test +{ + async static Task M1 () + { + try { + } + catch if (await Task.Factory.StartNew (() => false)) { + } + } +} \ No newline at end of file diff --git a/mcs/errors/cs8009.cs b/mcs/errors/cs8009.cs new file mode 100644 index 0000000000..851e06653e --- /dev/null +++ b/mcs/errors/cs8009.cs @@ -0,0 +1,13 @@ +// CS8009: Referenced assembly `CS8009-lib' has different culture setting of `en-US' +// Line: 0 +// Compiler options: -r:CS8009-lib.dll -warnaserror + +using System; + +class Program +{ + static void Main () + { + Console.WriteLine (typeof (Lang)); + } +} diff --git a/mcs/errors/cs0127-4.cs b/mcs/errors/cs8030-2.cs similarity index 56% rename from mcs/errors/cs0127-4.cs rename to mcs/errors/cs8030-2.cs index 64e3f96ae0..231f2113a5 100644 --- a/mcs/errors/cs0127-4.cs +++ b/mcs/errors/cs8030-2.cs @@ -1,4 +1,4 @@ -// CS0127: `D': A return keyword must not be followed by any expression when delegate returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 9 delegate void D (int x); diff --git a/mcs/errors/cs0127-2.cs b/mcs/errors/cs8030-3.cs similarity index 56% rename from mcs/errors/cs0127-2.cs rename to mcs/errors/cs8030-3.cs index 1b36551e10..1ff2894089 100644 --- a/mcs/errors/cs0127-2.cs +++ b/mcs/errors/cs8030-3.cs @@ -1,4 +1,4 @@ -// CS0127: `C.GetValue()': A return keyword must not be followed by any expression when method returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 11 using System; diff --git a/mcs/errors/cs0127-3.cs b/mcs/errors/cs8030.cs similarity index 53% rename from mcs/errors/cs0127-3.cs rename to mcs/errors/cs8030.cs index 5e39cb9da7..4f2751c6ea 100644 --- a/mcs/errors/cs0127-3.cs +++ b/mcs/errors/cs8030.cs @@ -1,4 +1,4 @@ -// CS0127: `System.Action': A return keyword must not be followed by any expression when delegate returns void +// CS8030: Anonymous function or lambda expression converted to a void returning delegate cannot return a value // Line: 10 using System; diff --git a/mcs/errors/cs8031.cs b/mcs/errors/cs8031.cs new file mode 100644 index 0000000000..dbb83bc118 --- /dev/null +++ b/mcs/errors/cs8031.cs @@ -0,0 +1,17 @@ +// CS8031: Async lambda expression or anonymous method converted to a `Task' cannot return a value. Consider returning `Task' +// Line: 12 + +using System; +using System.Threading.Tasks; + +class Test +{ + public static void Main() + { + Func t = async delegate { + return null; + }; + + return; + } +} diff --git a/mcs/errors/cs9001.cs b/mcs/errors/cs8036.cs similarity index 100% rename from mcs/errors/cs9001.cs rename to mcs/errors/cs8036.cs diff --git a/mcs/errors/cs9002.cs b/mcs/errors/cs8037.cs similarity index 100% rename from mcs/errors/cs9002.cs rename to mcs/errors/cs8037.cs diff --git a/mcs/errors/cs9003.cs b/mcs/errors/cs8038.cs similarity index 52% rename from mcs/errors/cs9003.cs rename to mcs/errors/cs8038.cs index 00780bc101..76dc74646d 100644 --- a/mcs/errors/cs9003.cs +++ b/mcs/errors/cs8038.cs @@ -1,4 +1,4 @@ -// CS9003: Primary constructor of type `Test' has parameter of same name as type parameter `T' +// CS8038: Primary constructor of type `Test' has parameter of same name as type parameter `T' // Line: 4 class Test(T T) diff --git a/mcs/errors/cs9004.cs b/mcs/errors/cs8039.cs similarity index 51% rename from mcs/errors/cs9004.cs rename to mcs/errors/cs8039.cs index d367928536..7793ffdd72 100644 --- a/mcs/errors/cs9004.cs +++ b/mcs/errors/cs8039.cs @@ -1,4 +1,4 @@ -// CS9004: Primary constructor of type `Test' has parameter of same name as containing type +// CS8039: Primary constructor of type `Test' has parameter of same name as containing type // Line: 4 class Test(object Test) diff --git a/mcs/errors/cs8041.cs b/mcs/errors/cs8041.cs new file mode 100644 index 0000000000..fa403dd25c --- /dev/null +++ b/mcs/errors/cs8041.cs @@ -0,0 +1,13 @@ +// CS8041: Primary constructor already has a body +// Line: 10 + +class C (int arg) +{ + { + arg = 1; + } + + { + arg = 2; + } +} diff --git a/mcs/errors/cs8043.cs b/mcs/errors/cs8043.cs new file mode 100644 index 0000000000..b7f9da825f --- /dev/null +++ b/mcs/errors/cs8043.cs @@ -0,0 +1,10 @@ +// CS8043: `S.S(long)': Structs with primary constructor cannot specify default constructor initializer +// Line: 6 + +struct S (int x) +{ + public S (long x) + : this () + { + } +} diff --git a/mcs/errors/cs8049.cs b/mcs/errors/cs8049.cs new file mode 100644 index 0000000000..0689057684 --- /dev/null +++ b/mcs/errors/cs8049.cs @@ -0,0 +1,11 @@ +// CS8049: Implemented interfaces cannot have arguments +// Line: 6 + +using System; + +class ID () : IDisposable () +{ + public void Dispose () + { + } +} diff --git a/mcs/errors/cs8050.cs b/mcs/errors/cs8050.cs new file mode 100644 index 0000000000..2f4b88bfc2 --- /dev/null +++ b/mcs/errors/cs8050.cs @@ -0,0 +1,7 @@ +// CS8050: `C.P': Only auto-implemented properties can have initializers +// Line: 6 + +abstract class C +{ + public abstract int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs8051.cs b/mcs/errors/cs8051.cs new file mode 100644 index 0000000000..7935efbe60 --- /dev/null +++ b/mcs/errors/cs8051.cs @@ -0,0 +1,7 @@ +// CS8051: Auto-implemented property `Test.Property' must have set accessor or initializer +// Line: 6 + +public abstract class Test +{ + public string Property { get; } +} diff --git a/mcs/errors/cs8052.cs b/mcs/errors/cs8052.cs new file mode 100644 index 0000000000..bccf0157fa --- /dev/null +++ b/mcs/errors/cs8052.cs @@ -0,0 +1,7 @@ +// CS8052: Auto-implemented property `V.P' must have get accessor +// Line: 6 + +class V +{ + public object P { set; } = 1; +} \ No newline at end of file diff --git a/mcs/errors/cs8053.cs b/mcs/errors/cs8053.cs new file mode 100644 index 0000000000..319835ff09 --- /dev/null +++ b/mcs/errors/cs8053.cs @@ -0,0 +1,7 @@ +// CS8053: `I.P': Properties inside interfaces cannot have initializers +// Line: 6 + +interface I +{ + int P { get; } = 4; +} \ No newline at end of file diff --git a/mcs/errors/cs8054-2.cs b/mcs/errors/cs8054-2.cs new file mode 100644 index 0000000000..e633f17606 --- /dev/null +++ b/mcs/errors/cs8054-2.cs @@ -0,0 +1,6 @@ +// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers +// Line: 5 + +partial struct A { + int a = 1; +} diff --git a/mcs/errors/cs8054-3.cs b/mcs/errors/cs8054-3.cs new file mode 100644 index 0000000000..b06047fb6e --- /dev/null +++ b/mcs/errors/cs8054-3.cs @@ -0,0 +1,6 @@ +// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers +// Line: 5 + +struct A { + int a = 1; +} diff --git a/mcs/errors/cs8054.cs b/mcs/errors/cs8054.cs new file mode 100644 index 0000000000..4b8fc2ed44 --- /dev/null +++ b/mcs/errors/cs8054.cs @@ -0,0 +1,7 @@ +// CS8054: `S.P': Structs without explicit constructors cannot contain members with initializers +// Line: 6 + +struct S +{ + public decimal P { get; } = -3; +} \ No newline at end of file diff --git a/mcs/errors/cs9005.cs b/mcs/errors/cs9005.cs deleted file mode 100644 index 85e4c01726..0000000000 --- a/mcs/errors/cs9005.cs +++ /dev/null @@ -1,10 +0,0 @@ -// CS9005: Constructor initializer cannot access primary constructor parameters -// Line: 7 - -class Test(string s) -{ - public Test () - : this (s) - { - } -} \ No newline at end of file diff --git a/mcs/errors/cs9007.cs b/mcs/errors/cs9007.cs deleted file mode 100644 index 05e9e3dfb1..0000000000 --- a/mcs/errors/cs9007.cs +++ /dev/null @@ -1,12 +0,0 @@ -// CS9007: Primary constructor parameter `value' is not available in this context when using ref or out modifier -// Line: 12 - -class X (ref double value) -{ - public double Prop { - get { - return value; - } - } -} - diff --git a/mcs/jay/main.c b/mcs/jay/main.c index b47867d3e3..fcac218b1d 100644 --- a/mcs/jay/main.c +++ b/mcs/jay/main.c @@ -256,11 +256,17 @@ unsigned n; return (p); } +#ifdef __GNUC__ +#define GNUC_UNUSED __attribute__((__unused__)) +#else +#define GNUC_UNUSED +#endif create_file_names() { int i, len; char *tmpdir; + int mkstemp_res GNUC_UNUSED; #if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) tmpdir = "."; @@ -303,9 +309,9 @@ create_file_names() prolog_file_name[len + 5] = 'p'; local_file_name[len + 5] = 'l'; - mkstemp(action_file_name); - mkstemp(prolog_file_name); - mkstemp(local_file_name); + mkstemp_res = mkstemp(action_file_name); + mkstemp_res = mkstemp(prolog_file_name); + mkstemp_res = mkstemp(local_file_name); len = strlen(file_prefix); diff --git a/mcs/mcs/anonymous.cs b/mcs/mcs/anonymous.cs index 9431e499d0..9d9558f7ec 100644 --- a/mcs/mcs/anonymous.cs +++ b/mcs/mcs/anonymous.cs @@ -1321,16 +1321,28 @@ namespace Mono.CSharp { return Parameters; } - protected override Expression DoResolve (ResolveContext ec) + protected override Expression DoResolve (ResolveContext rc) { - if (ec.HasSet (ResolveContext.Options.ConstantScope)) { - ec.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context"); + if (rc.HasSet (ResolveContext.Options.ConstantScope)) { + rc.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context"); return null; } // - // Set class type, set type + // Update top-level block generated duting parsing with actual top-level block // + if (rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.BaseInitializer) && rc.CurrentMemberDefinition.Parent.PartialContainer.PrimaryConstructorParameters != null) { + var tb = rc.ConstructorBlock.ParametersBlock.TopBlock; + if (Block.TopBlock != tb) { + Block b = Block; + while (b.Parent != Block.TopBlock && b != Block.TopBlock) + b = b.Parent; + + b.Parent = tb; + tb.IncludeBlock (Block, Block.TopBlock); + b.ParametersBlock.TopBlock = tb; + } + } eclass = ExprClass.Value; @@ -1341,7 +1353,7 @@ namespace Mono.CSharp { // type = InternalType.AnonymousMethod; - if (!DoResolveParameters (ec)) + if (!DoResolveParameters (rc)) return null; return this; @@ -1357,9 +1369,12 @@ namespace Mono.CSharp { // nothing, as we only exist to not do anything. } - public static void Error_AddressOfCapturedVar (ResolveContext ec, IVariableReference var, Location loc) + public static void Error_AddressOfCapturedVar (ResolveContext rc, IVariableReference var, Location loc) { - ec.Report.Error (1686, loc, + if (rc.CurrentAnonymousMethod is AsyncInitializer) + return; + + rc.Report.Error (1686, loc, "Local variable or parameter `{0}' cannot have their address taken and be used inside an anonymous method, lambda expression or query expression", var.Name); } @@ -1723,6 +1738,7 @@ namespace Mono.CSharp { Modifiers modifiers; TypeDefinition parent = null; TypeParameters hoisted_tparams = null; + ParametersCompiled method_parameters = parameters; var src_block = Block.Original.Explicit; if (src_block.HasCapturedVariable || src_block.HasCapturedThis) { @@ -1770,6 +1786,18 @@ namespace Mono.CSharp { parent = storey = ec.CurrentAnonymousMethod.Storey; modifiers = Modifiers.STATIC | Modifiers.PRIVATE; + + // + // Convert generated method to closed delegate method where unused + // this argument is generated during compilation which speeds up dispatch + // by about 25% + // + + // + // Disabled for now due to JIT bug + // + //method_parameters = ParametersCompiled.Prefix (method_parameters, + // new Parameter (null, null, 0, null, loc), ec.Module.Compiler.BuiltinTypes.Object); } if (storey == null && hoisted_tparams == null) @@ -1795,7 +1823,7 @@ namespace Mono.CSharp { return new AnonymousMethodMethod (parent, this, storey, new TypeExpression (ReturnType, Location), modifiers, - member_name, parameters); + member_name, method_parameters); } protected override Expression DoResolve (ResolveContext ec) @@ -1824,7 +1852,7 @@ namespace Mono.CSharp { } bool is_static = (method.ModFlags & Modifiers.STATIC) != 0; - if (is_static && am_cache == null) { + if (is_static && am_cache == null && !ec.IsStaticConstructor) { // // Creates a field cache to store delegate instance if it's not generic // diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs index 13d0526cc2..f546a62adf 100644 --- a/mcs/mcs/argument.cs +++ b/mcs/mcs/argument.cs @@ -276,6 +276,16 @@ namespace Mono.CSharp ordered.Add (arg); } + public override void FlowAnalysis (FlowAnalysisContext fc, List movable = null) + { + foreach (var arg in ordered) { + if (arg.ArgType != Argument.AType.Out) + arg.FlowAnalysis (fc); + } + + base.FlowAnalysis (fc, ordered); + } + public override Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait) { foreach (var a in ordered) { @@ -497,7 +507,7 @@ namespace Mono.CSharp return null; } - public void FlowAnalysis (FlowAnalysisContext fc) + public virtual void FlowAnalysis (FlowAnalysisContext fc, List movable = null) { bool has_out = false; foreach (var arg in args) { @@ -506,7 +516,14 @@ namespace Mono.CSharp continue; } - arg.FlowAnalysis (fc); + if (movable == null) { + arg.FlowAnalysis (fc); + continue; + } + + var ma = arg as MovableArgument; + if (ma != null && !movable.Contains (ma)) + arg.FlowAnalysis (fc); } if (!has_out) diff --git a/mcs/mcs/assembly.cs b/mcs/mcs/assembly.cs index cd77ac2622..f93c038396 100644 --- a/mcs/mcs/assembly.cs +++ b/mcs/mcs/assembly.cs @@ -207,7 +207,7 @@ namespace Mono.CSharp return; if (Compiler.Settings.Target == Target.Exe) { - a.Error_AttributeEmitError ("The executables cannot be satelite assemblies, remove the attribute or keep it empty"); + Report.Error (7059, a.Location, "Executables cannot be satellite assemblies. Remove the attribute or keep it empty"); return; } @@ -231,7 +231,8 @@ namespace Mono.CSharp var vinfo = IsValidAssemblyVersion (value, true); if (vinfo == null) { - a.Error_AttributeEmitError (string.Format ("Specified version `{0}' is not valid", value)); + Report.Error (7034, a.Location, "The specified version string `{0}' does not conform to the required format - major[.minor[.build[.revision]]]", + value); return; } @@ -322,13 +323,18 @@ namespace Mono.CSharp if (a.Type == pa.InternalsVisibleTo) { string assembly_name = a.GetString (); + if (assembly_name == null) { + Report.Error (7030, a.Location, "Friend assembly reference cannot have `null' value"); + return; + } + if (assembly_name.Length == 0) return; #if STATIC ParsedAssemblyName aname; ParseAssemblyResult r = Fusion.ParseAssemblyName (assembly_name, out aname); if (r != ParseAssemblyResult.OK) { - Report.Warning (1700, 3, a.Location, "Assembly reference `{0}' is invalid and cannot be resolved", + Report.Warning (1700, 3, a.Location, "Friend assembly reference `{0}' is invalid and cannot be resolved", assembly_name); return; } @@ -353,7 +359,7 @@ namespace Mono.CSharp } else if (a.Type == pa.AssemblyFileVersion) { vi_product_version = a.GetString (); if (string.IsNullOrEmpty (vi_product_version) || IsValidAssemblyVersion (vi_product_version, false) == null) { - Report.Warning (1607, 1, a.Location, "The version number `{0}' specified for `{1}' is invalid", + Report.Warning (7035, 1, a.Location, "The specified version string `{0}' does not conform to the recommended format major.minor.build.revision", vi_product_version, a.Name); return; } @@ -399,8 +405,8 @@ namespace Mono.CSharp } var ci = a.Assembly.GetName ().CultureInfo; - if (!ci.Equals (System.Globalization.CultureInfo.InvariantCulture)) { - Report.Warning (1607, 1, "Referenced assembly `{0}' has different culture setting of `{1}'", + if (!ci.Equals (CultureInfo.InvariantCulture)) { + Report.Warning (8009, 1, "Referenced assembly `{0}' has different culture setting of `{1}'", a.Name, ci.Name); } diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs index 356768d8b7..472a393739 100644 --- a/mcs/mcs/assign.cs +++ b/mcs/mcs/assign.cs @@ -645,6 +645,7 @@ namespace Mono.CSharp { public override void FlowAnalysis (FlowAnalysisContext fc) { source.FlowAnalysis (fc); + ((FieldExpr) target).SetFieldAssigned (fc); } public bool IsDefaultInitializer { diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs index 7ed03d2bad..0029cf8940 100644 --- a/mcs/mcs/async.cs +++ b/mcs/mcs/async.cs @@ -74,10 +74,6 @@ namespace Mono.CSharp protected override Expression DoResolve (ResolveContext rc) { - if (rc.HasSet (ResolveContext.Options.FinallyScope)) { - rc.Report.Error (1984, loc, "The `await' operator cannot be used in the body of a finally clause"); - } - if (rc.HasSet (ResolveContext.Options.LockScope)) { rc.Report.Error (1996, loc, "The `await' operator cannot be used in the body of a lock statement"); @@ -244,7 +240,7 @@ namespace Mono.CSharp var fe_awaiter = new FieldExpr (awaiter, loc); fe_awaiter.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc); - Label skip_continuation = ec.DefineLabel (); + Label skip_continuation = ec.DefineLabel (); using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { // @@ -324,10 +320,6 @@ namespace Mono.CSharp return false; } - if (bc.HasSet (ResolveContext.Options.CatchScope)) { - bc.Report.Error (1985, loc, "The `await' operator cannot be used in a catch clause"); - } - if (!base.Resolve (bc)) return false; @@ -447,6 +439,10 @@ namespace Mono.CSharp get; set; } + public StackFieldExpr HoistedReturnState { + get; set; + } + public override bool IsIterator { get { return false; @@ -464,9 +460,9 @@ namespace Mono.CSharp protected override BlockContext CreateBlockContext (BlockContext bc) { var ctx = base.CreateBlockContext (bc); - var lambda = bc.CurrentAnonymousMethod as LambdaMethod; - if (lambda != null) - return_inference = lambda.ReturnTypeInference; + var am = bc.CurrentAnonymousMethod as AnonymousMethodBody; + if (am != null) + return_inference = am.ReturnTypeInference; ctx.Set (ResolveContext.Options.TryScope); @@ -478,6 +474,24 @@ namespace Mono.CSharp throw new NotImplementedException (); } + public void EmitCatchBlock (EmitContext ec) + { + var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location); + + ec.BeginCatchBlock (catch_value.Type); + catch_value.EmitAssign (ec); + + ec.EmitThis (); + ec.EmitInt ((int) IteratorStorey.State.After); + ec.Emit (OpCodes.Stfld, storey.PC.Spec); + + ((AsyncTaskStorey) Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location)); + + ec.Emit (OpCodes.Leave, move_next_ok); + ec.EndExceptionBlock (); + + } + protected override void EmitMoveNextEpilogue (EmitContext ec) { var storey = (AsyncTaskStorey) Storey; @@ -509,7 +523,6 @@ namespace Mono.CSharp MethodSpec builder_factory; MethodSpec builder_start; PropertySpec task; - LocalVariable hoisted_return; int locals_captured; Dictionary> stack_fields; Dictionary> awaiter_fields; @@ -523,11 +536,7 @@ namespace Mono.CSharp #region Properties - public LocalVariable HoistedReturn { - get { - return hoisted_return; - } - } + public Expression HoistedReturnValue { get; set; } public TypeSpec ReturnType { get { @@ -576,7 +585,7 @@ namespace Mono.CSharp return field; } - public Field AddCapturedLocalVariable (TypeSpec type) + public Field AddCapturedLocalVariable (TypeSpec type, bool requiresUninitialized = false) { if (mutator != null) type = mutator.Mutate (type); @@ -584,7 +593,7 @@ namespace Mono.CSharp List existing_fields = null; if (stack_fields == null) { stack_fields = new Dictionary> (); - } else if (stack_fields.TryGetValue (type, out existing_fields)) { + } else if (stack_fields.TryGetValue (type, out existing_fields) && !requiresUninitialized) { foreach (var f in existing_fields) { if (f.IsAvailableForReuse) { f.IsAvailableForReuse = false; @@ -717,7 +726,7 @@ namespace Mono.CSharp set_state_machine.Block.AddStatement (new StatementExpression (new Invocation (mg, args))); if (has_task_return_type) { - hoisted_return = LocalVariable.CreateCompilerGenerated (bt.TypeArguments[0], StateMachineMethod.Block, Location); + HoistedReturnValue = TemporaryVariableReference.Create (bt.TypeArguments [0], StateMachineMethod.Block, Location); } return true; @@ -904,11 +913,11 @@ namespace Mono.CSharp }; Arguments args; - if (hoisted_return == null) { + if (HoistedReturnValue == null) { args = new Arguments (0); } else { args = new Arguments (1); - args.Add (new Argument (new LocalVariableReference (hoisted_return, Location))); + args.Add (new Argument (HoistedReturnValue)); } using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) { diff --git a/mcs/mcs/attribute.cs b/mcs/mcs/attribute.cs index 2152674d2d..7318f26059 100644 --- a/mcs/mcs/attribute.cs +++ b/mcs/mcs/attribute.cs @@ -258,19 +258,22 @@ namespace Mono.CSharp { Report.Error (1970, loc, "Do not use `{0}' directly. Use `dynamic' keyword instead", GetSignatureForError ()); } - /// - /// This is rather hack. We report many emit attribute error with same error to be compatible with - /// csc. But because csc has to report them this way because error came from ilasm we needn't. - /// - public void Error_AttributeEmitError (string inner) + void Error_AttributeEmitError (string inner) { Report.Error (647, Location, "Error during emitting `{0}' attribute. The reason is `{1}'", Type.GetSignatureForError (), inner); } + public void Error_InvalidArgumentValue (TypeSpec attributeType) + { + Report.Error (591, Location, "Invalid value for argument to `{0}' attribute", attributeType.GetSignatureForError ()); + } + public void Error_InvalidSecurityParent () { - Error_AttributeEmitError ("it is attached to invalid parent"); + Report.Error (7070, Location, + "Security attribute `{0}' is not valid on this declaration type. Security attributes are only valid on assembly, type and method declarations", + Type.GetSignatureForError ()); } Attributable Owner { @@ -412,7 +415,7 @@ namespace Mono.CSharp { return ((MethodImplOptions) value | all) == all; } - static bool IsValidArgumentType (TypeSpec t) + public static bool IsValidArgumentType (TypeSpec t) { if (t.IsArray) { var ac = (ArrayContainer) t; @@ -831,6 +834,7 @@ namespace Mono.CSharp { { SecurityAction action = GetSecurityActionValue (); bool for_assembly = Target == AttributeTargets.Assembly || Target == AttributeTargets.Module; + var c = (Constant)pos_args [0].Expr; switch (action) { #pragma warning disable 618 @@ -853,11 +857,22 @@ namespace Mono.CSharp { #pragma warning restore 618 default: - Error_AttributeEmitError ("SecurityAction is out of range"); + Report.Error (7049, c.Location, "Security attribute `{0}' has an invalid SecurityAction value `{1}'", + Type.GetSignatureForError (), c.GetValueAsLiteral()); return false; } - Error_AttributeEmitError (String.Concat ("SecurityAction `", action, "' is not valid for this declaration")); + switch (Target) { + case AttributeTargets.Assembly: + Report.Error (7050, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to an assembly", + c.GetSignatureForError ()); + break; + default: + Report.Error (7051, c.Location, "SecurityAction value `{0}' is invalid for security attributes applied to a type or a method", + c.GetSignatureForError ()); + break; + } + return false; } @@ -1026,44 +1041,42 @@ namespace Mono.CSharp { return; } } else if (Type == predefined.Guid) { + string v = ((StringConstant) arg_expr).Value; try { - string v = ((StringConstant) arg_expr).Value; new Guid (v); - } catch (Exception e) { - Error_AttributeEmitError (e.Message); + } catch { + Error_InvalidArgumentValue (Type); return; } } else if (Type == predefined.AttributeUsage) { int v = ((IntConstant) ((EnumConstant) arg_expr).Child).Value; - if (v == 0) { - context.Module.Compiler.Report.Error (591, Location, "Invalid value for argument to `{0}' attribute", - "System.AttributeUsage"); - } + if (v == 0) + Error_InvalidArgumentValue (Type); } else if (Type == predefined.MarshalAs) { if (pos_args.Count == 1) { var u_type = (UnmanagedType) System.Enum.Parse (typeof (UnmanagedType), ((Constant) pos_args[0].Expr).GetValue ().ToString ()); if (u_type == UnmanagedType.ByValArray && !(Owner is FieldBase)) { - Error_AttributeEmitError ("Specified unmanaged type is only valid on fields"); + Report.Error (7055, pos_args [0].Expr.Location, "Unmanaged type `ByValArray' is only valid for fields"); } } } else if (Type == predefined.DllImport) { if (pos_args.Count == 1 && pos_args[0].Expr is Constant) { var value = ((Constant) pos_args[0].Expr).GetValue () as string; if (string.IsNullOrEmpty (value)) - Error_AttributeEmitError ("DllName cannot be empty or null"); + Error_InvalidArgumentValue (Type); } } else if (Type == predefined.MethodImpl) { if (pos_args.Count == 1) { var value = (int) ((Constant) arg_expr).GetValueAsLong (); if (!IsValidMethodImplOption (value)) { - Error_AttributeEmitError ("Incorrect argument value"); + Error_InvalidArgumentValue (Type); } } } } - arg_expr.EncodeAttributeValue (context, encoder, pt); + arg_expr.EncodeAttributeValue (context, encoder, pt, pt); } } @@ -1077,7 +1090,7 @@ namespace Mono.CSharp { encoder.Encode (na.Key.Type); encoder.Encode (na.Value.Name); - na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type); + na.Value.Expr.EncodeAttributeValue (context, encoder, na.Key.Type, na.Key.Type); } } else { encoder.EncodeEmptyNamedArguments (); @@ -1527,7 +1540,7 @@ namespace Mono.CSharp { Encode ((byte) 0x54); // property Encode (property.MemberType); Encode (property.Name); - value.EncodeAttributeValue (null, this, property.MemberType); + value.EncodeAttributeValue (null, this, property.MemberType, property.MemberType); } // @@ -1539,7 +1552,7 @@ namespace Mono.CSharp { Encode ((byte) 0x53); // field Encode (field.MemberType); Encode (field.Name); - value.EncodeAttributeValue (null, this, field.MemberType); + value.EncodeAttributeValue (null, this, field.MemberType, field.MemberType); } public void EncodeNamedArguments (T[] members, Constant[] values) where T : MemberSpec, IInterfaceMemberSpec @@ -1559,7 +1572,7 @@ namespace Mono.CSharp { Encode (member.MemberType); Encode (member.Name); - values [i].EncodeAttributeValue (null, this, member.MemberType); + values [i].EncodeAttributeValue (null, this, member.MemberType, member.MemberType); } } diff --git a/mcs/mcs/cfold.cs b/mcs/mcs/cfold.cs index bea0ee06df..befa0dbdbe 100644 --- a/mcs/mcs/cfold.cs +++ b/mcs/mcs/cfold.cs @@ -309,10 +309,10 @@ namespace Mono.CSharp { return new StringConstant (ec.BuiltinTypes, (string)left.GetValue () + (string)right.GetValue (), left.Location); - if (lt == InternalType.NullLiteral) + if (lt == InternalType.NullLiteral || left.IsNull) return new StringConstant (ec.BuiltinTypes, "" + right.GetValue (), left.Location); - if (rt == InternalType.NullLiteral) + if (rt == InternalType.NullLiteral || right.IsNull) return new StringConstant (ec.BuiltinTypes, left.GetValue () + "", left.Location); return null; @@ -367,8 +367,8 @@ namespace Mono.CSharp { return null; result = result.Reduce (ec, lt); - if (result == null) - return null; + if (result == null || lt.IsEnum) + return result; return new EnumConstant (result, lt); } diff --git a/mcs/mcs/class.cs.REMOVED.git-id b/mcs/mcs/class.cs.REMOVED.git-id index 8e66f724bc..f9b31627fe 100644 --- a/mcs/mcs/class.cs.REMOVED.git-id +++ b/mcs/mcs/class.cs.REMOVED.git-id @@ -1 +1 @@ -36761432a51625ec32235fbaa18324d0989c536d \ No newline at end of file +cda04c0e840c340724df311555d8b98032efd8bf \ No newline at end of file diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs index 84394c99ed..b8bb6ac407 100644 --- a/mcs/mcs/codegen.cs +++ b/mcs/mcs/codegen.cs @@ -155,6 +155,12 @@ namespace Mono.CSharp get { return member_context.IsStatic; } } + public bool IsStaticConstructor { + get { + return member_context.IsStatic && (flags & Options.ConstructorScope) != 0; + } + } + public bool IsAnonymousStoreyMutateRequired { get { return CurrentAnonymousMethod != null && @@ -175,6 +181,12 @@ namespace Mono.CSharp } } + public bool NotifyEvaluatorOnStore { + get { + return Module.Evaluator != null && Module.Evaluator.ModificationListener != null; + } + } + // Has to be used for specific emitter errors only any // possible resolver errors have to be reported during Resolve public Report Report { @@ -204,6 +216,10 @@ namespace Mono.CSharp } } + public LocalVariable AsyncThrowVariable { get; set; } + + public List TryFinallyUnwind { get; set; } + #endregion public void AddStatementEpilog (IExpressionCleanup cleanupExpression) @@ -380,9 +396,9 @@ namespace Mono.CSharp // // Creates temporary field in current async storey // - public StackFieldExpr GetTemporaryField (TypeSpec type) + public StackFieldExpr GetTemporaryField (TypeSpec type, bool initializedFieldRequired = false) { - var f = AsyncTaskStorey.AddCapturedLocalVariable (type); + var f = AsyncTaskStorey.AddCapturedLocalVariable (type, initializedFieldRequired); var fexpr = new StackFieldExpr (f); fexpr.InstanceExpression = new CompilerGeneratedThis (CurrentType, Location.Null); return fexpr; @@ -518,8 +534,16 @@ namespace Mono.CSharp type = EnumSpec.GetUnderlyingType (type); switch (type.BuiltinType) { - case BuiltinTypeSpec.Type.Byte: case BuiltinTypeSpec.Type.Bool: + // + // Workaround MSIL limitation. Load bool element as single bit, + // bool array can actually store any byte value + // + ig.Emit (OpCodes.Ldelem_U1); + ig.Emit (OpCodes.Ldc_I4_0); + ig.Emit (OpCodes.Cgt_Un); + break; + case BuiltinTypeSpec.Type.Byte: ig.Emit (OpCodes.Ldelem_U1); break; case BuiltinTypeSpec.Type.SByte: @@ -734,8 +758,12 @@ namespace Mono.CSharp ig.Emit (OpCodes.Ldind_U1); break; case BuiltinTypeSpec.Type.SByte: + ig.Emit (OpCodes.Ldind_I1); + break; case BuiltinTypeSpec.Type.Bool: ig.Emit (OpCodes.Ldind_I1); + ig.Emit (OpCodes.Ldc_I4_0); + ig.Emit (OpCodes.Cgt_Un); break; case BuiltinTypeSpec.Type.ULong: case BuiltinTypeSpec.Type.Long: @@ -1036,7 +1064,7 @@ namespace Mono.CSharp } } - if (call_op == OpCodes.Callvirt && (InstanceExpression.Type.IsGenericParameter || InstanceExpression.Type.IsStruct)) { + if (call_op == OpCodes.Callvirt && (InstanceExpression.Type.IsGenericParameter || InstanceExpression.Type.IsStructOrEnum)) { ec.Emit (OpCodes.Constrained, InstanceExpression.Type); } @@ -1076,7 +1104,7 @@ namespace Mono.CSharp // // Push the instance expression // - if ((instance_type.IsStruct && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) || + if ((instance_type.IsStructOrEnum && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) || instance_type.IsGenericParameter || declaringType.IsNullableType) { // // If the expression implements IMemoryLocation, then @@ -1098,7 +1126,7 @@ namespace Mono.CSharp return ReferenceContainer.MakeType (ec.Module, instance_type); } - if (instance_type.IsEnum || instance_type.IsStruct) { + if (instance_type.IsStructOrEnum) { instance.Emit (ec); ec.Emit (OpCodes.Box, instance_type); return ec.BuiltinTypes.Object; diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs index d37e0f01bf..8faec94e4c 100644 --- a/mcs/mcs/constant.cs +++ b/mcs/mcs/constant.cs @@ -522,7 +522,7 @@ namespace Mono.CSharp { return Value ? 1 : 0; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -573,7 +573,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -673,7 +673,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode ((ushort) Value); } @@ -801,7 +801,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -904,7 +904,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1017,7 +1017,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1126,7 +1126,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1302,7 +1302,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1419,7 +1419,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1550,7 +1550,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1674,7 +1674,7 @@ namespace Mono.CSharp { return base.ConvertImplicitly (type); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -1803,7 +1803,7 @@ namespace Mono.CSharp { Value = v; } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { enc.Encode (Value); } @@ -2088,7 +2088,7 @@ namespace Mono.CSharp { ec.Emit (OpCodes.Ldstr, Value); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { // cast to object if (type != targetType) @@ -2153,7 +2153,7 @@ namespace Mono.CSharp { return base.CreateExpressionTree (ec); } - public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType) + public override void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType, TypeSpec parameterType) { switch (targetType.BuiltinType) { case BuiltinTypeSpec.Type.Object: @@ -2174,7 +2174,7 @@ namespace Mono.CSharp { break; } - base.EncodeAttributeValue (rc, enc, targetType); + base.EncodeAttributeValue (rc, enc, targetType, parameterType); } public override void Emit (EmitContext ec) @@ -2314,6 +2314,11 @@ namespace Mono.CSharp { } } + public override bool ContainsEmitWithAwait () + { + return side_effect.ContainsEmitWithAwait (); + } + public override object GetValue () { return value.GetValue (); @@ -2341,6 +2346,11 @@ namespace Mono.CSharp { value.EmitSideEffect (ec); } + public override void FlowAnalysis (FlowAnalysisContext fc) + { + side_effect.FlowAnalysis (fc); + } + public override bool IsDefaultValue { get { return value.IsDefaultValue; } } diff --git a/mcs/mcs/context.cs b/mcs/mcs/context.cs index 8cbaeff0c5..873c92d24e 100644 --- a/mcs/mcs/context.cs +++ b/mcs/mcs/context.cs @@ -664,7 +664,7 @@ namespace Mono.CSharp ConstructorScope = 1 << 3, - AsyncBody = 1 << 4 + AsyncBody = 1 << 4, } // utility helper for CheckExpr, UnCheckExpr, Checked and Unchecked statements diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs index 00be96b40a..df21c11d11 100644 --- a/mcs/mcs/convert.cs +++ b/mcs/mcs/convert.cs @@ -27,6 +27,15 @@ namespace Mono.CSharp { // static class Convert { + [Flags] + public enum UserConversionRestriction + { + None = 0, + ImplicitOnly = 1, + ProbingOnly = 1 << 1, + NullableSourceOnly = 1 << 2 + + } // // From a one-dimensional array-type S[] to System.Collections.IList and base // interfaces of this interface, provided there is an implicit reference conversion @@ -675,7 +684,7 @@ namespace Mono.CSharp { // public static bool ImplicitConversionExists (ResolveContext ec, Expression expr, TypeSpec target_type) { - if (ImplicitStandardConversionExists (expr, target_type)) + if (ImplicitStandardConversionExists (ec, expr, target_type)) return true; if (expr.Type == InternalType.AnonymousMethod) { @@ -686,21 +695,27 @@ namespace Mono.CSharp { return ame.ImplicitStandardConversionExists (ec, target_type); } + // Conversion from __arglist to System.ArgIterator + if (expr.Type == InternalType.Arglist) + return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec; + + return UserDefinedConversion (ec, expr, target_type, + UserConversionRestriction.ImplicitOnly | UserConversionRestriction.ProbingOnly, Location.Null) != null; + } + + public static bool ImplicitStandardConversionExists (ResolveContext rc, Expression expr, TypeSpec target_type) + { if (expr.eclass == ExprClass.MethodGroup) { - if (target_type.IsDelegate && ec.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) { + if (target_type.IsDelegate && rc.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) { MethodGroupExpr mg = expr as MethodGroupExpr; if (mg != null) - return DelegateCreation.ImplicitStandardConversionExists (ec, mg, target_type); + return DelegateCreation.ImplicitStandardConversionExists (rc, mg, target_type); } return false; } - // Conversion from __arglist to System.ArgIterator - if (expr.Type == InternalType.Arglist) - return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec; - - return UserDefinedConversion (ec, expr, target_type, true, true, Location.Null) != null; + return ImplicitStandardConversionExists (expr, target_type); } // @@ -911,7 +926,7 @@ namespace Mono.CSharp { // by making use of FindMostEncomp* methods. Applies the correct rules separately // for explicit and implicit conversion operators. // - static TypeSpec FindMostSpecificSource (List list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules) + static TypeSpec FindMostSpecificSource (ResolveContext rc, List list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules) { TypeSpec[] src_types_set = null; @@ -937,12 +952,16 @@ namespace Mono.CSharp { var candidate_set = new List (); foreach (TypeSpec param_type in src_types_set){ - if (ImplicitStandardConversionExists (source, param_type)) + if (ImplicitStandardConversionExists (rc, source, param_type)) candidate_set.Add (param_type); } - if (candidate_set.Count != 0) + if (candidate_set.Count != 0) { + if (source.eclass == ExprClass.MethodGroup) + return InternalType.FakeInternalType; + return FindMostEncompassedType (candidate_set); + } } // @@ -1010,7 +1029,7 @@ namespace Mono.CSharp { /// static public Expression ImplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc) { - return UserDefinedConversion (ec, source, target, true, false, loc); + return UserDefinedConversion (ec, source, target, UserConversionRestriction.ImplicitOnly, loc); } /// @@ -1018,10 +1037,10 @@ namespace Mono.CSharp { /// static Expression ExplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc) { - return UserDefinedConversion (ec, source, target, false, false, loc); + return UserDefinedConversion (ec, source, target, 0, loc); } - static void FindApplicableUserDefinedConversionOperators (IList operators, Expression source, TypeSpec target, bool implicitOnly, ref List candidates) + static void FindApplicableUserDefinedConversionOperators (ResolveContext rc, IList operators, Expression source, TypeSpec target, UserConversionRestriction restr, ref List candidates) { if (source.Type.IsInterface) { // Neither A nor B are interface-types @@ -1043,14 +1062,17 @@ namespace Mono.CSharp { continue; var t = op.Parameters.Types[0]; - if (source.Type != t && !ImplicitStandardConversionExists (source, t)) { - if (implicitOnly) + if (source.Type != t && !ImplicitStandardConversionExists (rc, source, t)) { + if ((restr & UserConversionRestriction.ImplicitOnly) != 0) continue; if (!ImplicitStandardConversionExists (new EmptyExpression (t), source.Type)) - continue; + continue; } + if ((restr & UserConversionRestriction.NullableSourceOnly) != 0 && !t.IsNullableType) + continue; + t = op.ReturnType; if (t.IsInterface) @@ -1061,7 +1083,7 @@ namespace Mono.CSharp { t = Nullable.NullableInfo.GetUnderlyingType (t); if (!ImplicitStandardConversionExists (new EmptyExpression (t), target)) { - if (implicitOnly) + if ((restr & UserConversionRestriction.ImplicitOnly) != 0) continue; if (texpr == null) @@ -1082,7 +1104,7 @@ namespace Mono.CSharp { // // User-defined conversions // - static Expression UserDefinedConversion (ResolveContext ec, Expression source, TypeSpec target, bool implicitOnly, bool probingOnly, Location loc) + public static Expression UserDefinedConversion (ResolveContext rc, Expression source, TypeSpec target, UserConversionRestriction restr, Location loc) { List candidates = null; @@ -1094,6 +1116,7 @@ namespace Mono.CSharp { TypeSpec target_type = target; Expression source_type_expr; bool nullable_source = false; + var implicitOnly = (restr & UserConversionRestriction.ImplicitOnly) != 0; if (source_type.IsNullableType) { // No unwrapping conversion S? -> T for non-reference types @@ -1119,13 +1142,13 @@ namespace Mono.CSharp { var operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Implicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } if (!implicitOnly) { operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Explicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } } } @@ -1135,13 +1158,13 @@ namespace Mono.CSharp { var operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Implicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } if (!implicitOnly) { operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Explicit, declared_only); if (operators != null) { - FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates); + FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates); } } } @@ -1163,7 +1186,7 @@ namespace Mono.CSharp { // Pass original source type to find the best match against input type and // not the unwrapped expression // - s_x = FindMostSpecificSource (candidates, source.Type, source_type_expr, !implicitOnly); + s_x = FindMostSpecificSource (rc, candidates, source.Type, source_type_expr, !implicitOnly); if (s_x == null) return null; @@ -1183,16 +1206,18 @@ namespace Mono.CSharp { // // Unless running in probing more // - if (!probingOnly) { - MethodSpec ambig_arg = null; + if ((restr & UserConversionRestriction.ProbingOnly) == 0) { + MethodSpec ambig_arg = candidates [0]; + most_specific_operator = candidates [1]; + /* foreach (var candidate in candidates) { if (candidate.ReturnType == t_x) most_specific_operator = candidate; else if (candidate.Parameters.Types[0] == s_x) ambig_arg = candidate; } - - ec.Report.Error (457, loc, + */ + rc.Report.Error (457, loc, "Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' to `{3}'", ambig_arg.GetSignatureForError (), most_specific_operator.GetSignatureForError (), source.Type.GetSignatureForError (), target.GetSignatureForError ()); @@ -1208,21 +1233,21 @@ namespace Mono.CSharp { if (s_x != source_type) { var c = source as Constant; if (c != null) { - source = c.Reduce (ec, s_x); + source = c.Reduce (rc, s_x); if (source == null) c = null; } if (c == null) { source = implicitOnly ? - ImplicitConversionStandard (ec, source_type_expr, s_x, loc) : - ExplicitConversionStandard (ec, source_type_expr, s_x, loc); + ImplicitConversionStandard (rc, source_type_expr, s_x, loc) : + ExplicitConversionStandard (rc, source_type_expr, s_x, loc); } } else { source = source_type_expr; } - source = new UserCast (most_specific_operator, source, loc).Resolve (ec); + source = new UserCast (most_specific_operator, source, loc).Resolve (rc); // // Convert result type when it's different to best operator return type @@ -1241,19 +1266,19 @@ namespace Mono.CSharp { var unwrap = Nullable.Unwrap.CreateUnwrapped (source); source = implicitOnly ? - ImplicitConversionStandard (ec, unwrap, target_type, loc) : - ExplicitConversionStandard (ec, unwrap, target_type, loc); + ImplicitConversionStandard (rc, unwrap, target_type, loc) : + ExplicitConversionStandard (rc, unwrap, target_type, loc); if (source == null) return null; if (target.IsNullableType) - source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec); + source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (rc); } } else { source = implicitOnly ? - ImplicitConversionStandard (ec, source, target_type, loc) : - ExplicitConversionStandard (ec, source, target_type, loc); + ImplicitConversionStandard (rc, source, target_type, loc) : + ExplicitConversionStandard (rc, source, target_type, loc); if (source == null) return null; @@ -1266,7 +1291,7 @@ namespace Mono.CSharp { // only non-nullable type we need to lift it manually // if (nullable_source && !s_x.IsNullableType) - return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec); + return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (rc); // // Target is of nullable type but source type is not, wrap the result expression @@ -2230,6 +2255,7 @@ namespace Mono.CSharp { } e = ExplicitUserConversion (ec, expr, target_type, loc); + if (e != null) return e; diff --git a/mcs/mcs/cs-parser.jay.REMOVED.git-id b/mcs/mcs/cs-parser.jay.REMOVED.git-id index d335f2dd3a..2576e56cca 100644 --- a/mcs/mcs/cs-parser.jay.REMOVED.git-id +++ b/mcs/mcs/cs-parser.jay.REMOVED.git-id @@ -1 +1 @@ -f93324f30602ca2f956eff102b7674a76df37471 \ No newline at end of file +2cfa7f1846374357ed745eab43bf41e85fa4e9d3 \ No newline at end of file diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs index 68ddff9873..23adf2073a 100644 --- a/mcs/mcs/cs-tokenizer.cs +++ b/mcs/mcs/cs-tokenizer.cs @@ -1279,6 +1279,8 @@ namespace Mono.CSharp PushPosition (); current_token = Token.NONE; int next_token; + int parens = 0; + switch (xtoken ()) { case Token.LITERAL: case Token.TRUE: @@ -1299,6 +1301,13 @@ namespace Mono.CSharp case Token.COLON: next_token = Token.INTERR_NULLABLE; break; + + case Token.OPEN_PARENS: + case Token.OPEN_PARENS_CAST: + case Token.OPEN_PARENS_LAMBDA: + next_token = -1; + ++parens; + break; default: next_token = -1; @@ -1317,14 +1326,19 @@ namespace Mono.CSharp case Token.COLON: next_token = Token.INTERR; - break; - + break; + + case Token.OPEN_PARENS: + case Token.OPEN_PARENS_CAST: + case Token.OPEN_PARENS_LAMBDA: + ++parens; + goto default; + default: int ntoken; int interrs = 1; int colons = 0; int braces = 0; - int parens = 0; // // All shorcuts failed, do it hard way // @@ -1342,9 +1356,13 @@ namespace Mono.CSharp --braces; continue; case Token.CLOSE_PARENS: - if (parens > 0) + if (parens > 0) { --parens; - continue; + continue; + } + + PopPosition (); + return Token.INTERR_NULLABLE; } if (braces != 0) diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs index a5adf348a4..7632a6128f 100644 --- a/mcs/mcs/delegate.cs +++ b/mcs/mcs/delegate.cs @@ -446,7 +446,8 @@ namespace Mono.CSharp { public override bool ContainsEmitWithAwait () { - return false; + var instance = method_group.InstanceExpression; + return instance != null && instance.ContainsEmitWithAwait (); } public static Arguments CreateDelegateMethodArguments (ResolveContext rc, AParametersCollection pd, TypeSpec[] types, Location loc) diff --git a/mcs/mcs/ecore.cs.REMOVED.git-id b/mcs/mcs/ecore.cs.REMOVED.git-id index 897f16a951..8fafa41939 100644 --- a/mcs/mcs/ecore.cs.REMOVED.git-id +++ b/mcs/mcs/ecore.cs.REMOVED.git-id @@ -1 +1 @@ -86c7931f13abbb6cc31055bdc6eb2339ccbce2c2 \ No newline at end of file +f0a9de98b6103af652e3d63bcae44183a33246f7 \ No newline at end of file diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs index 5bda997062..30c42c1af8 100644 --- a/mcs/mcs/eval.cs +++ b/mcs/mcs/eval.cs @@ -24,6 +24,11 @@ using System.Linq; namespace Mono.CSharp { + /// + /// Experimental! + /// + public delegate void ValueModificationHandler (string variableName, int row, int column, object value); + /// /// Evaluator: provides an API to evaluate C# statements and /// expressions dynamically. @@ -71,6 +76,8 @@ namespace Mono.CSharp readonly ModuleContainer module; readonly ReflectionImporter importer; readonly CompilationSourceFile source_file; + + int? listener_id; public Evaluator (CompilerContext ctx) { @@ -291,6 +298,30 @@ namespace Mono.CSharp return compiled; } + static MethodInfo listener_proxy_value; + internal void EmitValueChangedCallback (EmitContext ec, string name, TypeSpec type, Location loc) + { + if (listener_id == null) + listener_id = ListenerProxy.Register (ModificationListener); + + if (listener_proxy_value == null) + listener_proxy_value = typeof (ListenerProxy).GetMethod ("ValueChanged"); + +#if STATIC + throw new NotSupportedException (); +#else + // object value, int row, int col, string name, int listenerId + if (type.IsStructOrEnum) + ec.Emit (OpCodes.Box, type); + + ec.EmitInt (loc.Row); + ec.EmitInt (loc.Column); + ec.Emit (OpCodes.Ldstr, name); + ec.EmitInt (listener_id.Value); + ec.Emit (OpCodes.Call, listener_proxy_value); +#endif + } + /// /// Evaluates and expression or statement and returns any result values. /// @@ -341,6 +372,11 @@ namespace Mono.CSharp Console.WriteLine ("Interrupted!\n{0}", e); } finally { invoking = false; + + if (listener_id != null) { + ListenerProxy.Unregister (listener_id.Value); + listener_id = null; + } } // @@ -448,6 +484,11 @@ namespace Mono.CSharp return result; } + /// + /// Experimental! + /// + public ValueModificationHandler ModificationListener { get; set; } + enum InputKind { EOF, StatementOrExpression, @@ -737,6 +778,7 @@ namespace Mono.CSharp } module.EmitContainer (); + if (Report.Errors != 0){ if (undo != null) undo.ExecuteUndo (); @@ -1257,5 +1299,38 @@ namespace Mono.CSharp undo_actions = null; } } - + + static class ListenerProxy + { + static readonly Dictionary listeners = new Dictionary (); + + static int counter; + + public static int Register (ValueModificationHandler listener) + { + lock (listeners) { + var id = counter++; + listeners.Add (id, listener); + return id; + } + } + + public static void Unregister (int listenerId) + { + lock (listeners) { + listeners.Remove (listenerId); + } + } + + public static void ValueChanged (object value, int row, int col, string name, int listenerId) + { + ValueModificationHandler action; + lock (listeners) { + if (!listeners.TryGetValue (listenerId, out action)) + return; + } + + action (name, row, col, value); + } + } } diff --git a/mcs/mcs/expression.cs.REMOVED.git-id b/mcs/mcs/expression.cs.REMOVED.git-id index b19051fead..9abaae675b 100644 --- a/mcs/mcs/expression.cs.REMOVED.git-id +++ b/mcs/mcs/expression.cs.REMOVED.git-id @@ -1 +1 @@ -6976b97c8b1c65f12280680fe68c3ab7bb7c30e6 \ No newline at end of file +0ab48acb382e4c47a8494814726d8a2c6ce99dff \ No newline at end of file diff --git a/mcs/mcs/flowanalysis.cs b/mcs/mcs/flowanalysis.cs index 4f54f268d2..dbb74a7515 100644 --- a/mcs/mcs/flowanalysis.cs +++ b/mcs/mcs/flowanalysis.cs @@ -139,15 +139,22 @@ namespace Mono.CSharp var field = struct_info.Fields[i]; if (!fc.IsStructFieldDefinitelyAssigned (vi, field.Name)) { - if (field.MemberDefinition is Property.BackingField) { + var bf = field.MemberDefinition as Property.BackingField; + if (bf != null) { + if (bf.Initializer != null) + continue; + fc.Report.Error (843, loc, "An automatically implemented property `{0}' must be fully assigned before control leaves the constructor. Consider calling the default struct contructor from a constructor initializer", field.GetSignatureForError ()); - } else { - fc.Report.Error (171, loc, - "Field `{0}' must be fully assigned before control leaves the constructor", - field.GetSignatureForError ()); + + ok = false; + continue; } + + fc.Report.Error (171, loc, + "Field `{0}' must be fully assigned before control leaves the constructor", + field.GetSignatureForError ()); ok = false; } } diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs index d97c7f3b82..f309c6ba57 100644 --- a/mcs/mcs/generic.cs +++ b/mcs/mcs/generic.cs @@ -620,6 +620,11 @@ namespace Mono.CSharp { spec.SetMetaInfo (type); } + public void Define (TypeParameter tp) + { + builder = tp.builder; + } + public void EmitConstraints (GenericTypeParameterBuilder builder) { var attr = GenericParameterAttributes.None; @@ -1047,7 +1052,8 @@ namespace Mono.CSharp { continue; } - types [i] = ((TypeParameterSpec)t).GetEffectiveBase (); + var tps = t as TypeParameterSpec; + types [i] = tps != null ? tps.GetEffectiveBase () : t; } if (HasTypeConstraint) @@ -1349,7 +1355,15 @@ namespace Mono.CSharp { if (TypeArguments != null) { foreach (var t in TypeArguments) { - if (((TypeParameterSpec) t).IsConvertibleToInterface (iface)) + var tps = t as TypeParameterSpec; + if (tps != null) { + if (tps.IsConvertibleToInterface (iface)) + return true; + + continue; + } + + if (t.ImplementsInterface (iface, false)) return true; } } @@ -1465,6 +1479,9 @@ namespace Mono.CSharp { if (ac != null) return ArrayContainer.MakeType (context.Module, et, ac.Rank); + if (ec is PointerContainer) + return PointerContainer.MakeType (context.Module, et); + throw new NotImplementedException (); } diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs index 0d7e9e5ad5..b8c5832d21 100644 --- a/mcs/mcs/import.cs +++ b/mcs/mcs/import.cs @@ -434,6 +434,8 @@ namespace Mono.CSharp else mod |= Modifiers.VIRTUAL; } + } else if (parameters.HasExtensionMethodType) { + mod |= Modifiers.METHOD_EXTENSION; } } diff --git a/mcs/mcs/iterators.cs b/mcs/mcs/iterators.cs index f10773009d..5dce0ed159 100644 --- a/mcs/mcs/iterators.cs +++ b/mcs/mcs/iterators.cs @@ -74,6 +74,9 @@ namespace Mono.CSharp public void RegisterResumePoint () { + if (resume_pc != 0) + return; + if (inside_try_block == null) { resume_pc = machine_initializer.AddResumePoint (this); } else { @@ -723,8 +726,7 @@ namespace Mono.CSharp // // The state as we generate the machine // - Label move_next_ok; - Label iterator_body_end; + protected Label move_next_ok; protected Label move_next_error; LocalBuilder skip_finally; protected LocalBuilder current_pc; @@ -738,11 +740,7 @@ namespace Mono.CSharp #region Properties - public Label BodyEnd { - get { - return iterator_body_end; - } - } + public Label BodyEnd { get; set; } public LocalBuilder CurrentPC { @@ -830,11 +828,18 @@ namespace Mono.CSharp // We only care if the PC is zero (start executing) or non-zero (don't do anything) ec.Emit (OpCodes.Brtrue, move_next_error); - iterator_body_end = ec.DefineLabel (); + BodyEnd = ec.DefineLabel (); + + var async_init = this as AsyncInitializer; + if (async_init != null) + ec.BeginExceptionBlock (); block.EmitEmbedded (ec); - ec.MarkLabel (iterator_body_end); + if (async_init != null) + async_init.EmitCatchBlock (ec); + + ec.MarkLabel (BodyEnd); EmitMoveNextEpilogue (ec); @@ -844,6 +849,8 @@ namespace Mono.CSharp ec.EmitInt (0); ec.Emit (OpCodes.Ret); } + + ec.MarkLabel (move_next_ok); } void EmitMoveNext (EmitContext ec) @@ -893,26 +900,14 @@ namespace Mono.CSharp ec.MarkLabel (labels[0]); - iterator_body_end = ec.DefineLabel (); + BodyEnd = ec.DefineLabel (); block.EmitEmbedded (ec); - ec.MarkLabel (iterator_body_end); + ec.MarkLabel (BodyEnd); if (async_init != null) { - var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location); - - ec.BeginCatchBlock (catch_value.Type); - catch_value.EmitAssign (ec); - - ec.EmitThis (); - ec.EmitInt ((int) IteratorStorey.State.After); - ec.Emit (OpCodes.Stfld, storey.PC.Spec); - - ((AsyncTaskStorey) async_init.Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location)); - - ec.Emit (OpCodes.Leave, move_next_ok); - ec.EndExceptionBlock (); + async_init.EmitCatchBlock (ec); } ec.Mark (Block.Original.EndLocation); diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs index 82acb67b16..7336f1dbf8 100644 --- a/mcs/mcs/membercache.cs +++ b/mcs/mcs/membercache.cs @@ -721,6 +721,9 @@ namespace Mono.CSharp { if (!fs.IsPublic && container.MemberDefinition.IsImported && (!fs.MemberType.IsArray && TypeSpec.IsReferenceType (fs.MemberType))) continue; + //if ((fs.Modifiers & (Modifiers.BACKING_FIELD) != 0) + // continue; + if (fields == null) fields = new List (); diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs index 58baf51b09..d368fe933b 100644 --- a/mcs/mcs/method.cs +++ b/mcs/mcs/method.cs @@ -563,6 +563,12 @@ namespace Mono.CSharp { if ((ModFlags & extern_static) != extern_static) { Report.Error (601, a.Location, "The DllImport attribute must be specified on a method marked `static' and `extern'"); } + + if (MemberName.IsGeneric || Parent.IsGenericOrParentIsGeneric) { + Report.Error (7042, a.Location, + "The DllImport attribute cannot be applied to a method that is generic or contained in a generic type"); + } + is_external_implementation = true; } @@ -719,6 +725,11 @@ namespace Mono.CSharp { if (MethodData != null) MethodData.Emit (Parent); + if (block != null && block.StateMachine is AsyncTaskStorey) { + var psm = Module.PredefinedAttributes.AsyncStateMachine; + psm.EmitAttribute (MethodBuilder, block.StateMachine); + } + if ((ModFlags & Modifiers.PARTIAL) == 0) Block = null; } @@ -1324,6 +1335,12 @@ namespace Mono.CSharp { if (IsPartialDefinition) { if (partialMethodImplementation != null && CurrentTypeParameters != null) { CurrentTypeParameters.CheckPartialConstraints (partialMethodImplementation); + + var otp = partialMethodImplementation.CurrentTypeParameters; + for (int i = 0; i < CurrentTypeParameters.Count; ++i) { + var tp = CurrentTypeParameters [i]; + tp.Define (otp[i]); + } } return; @@ -1343,12 +1360,6 @@ namespace Mono.CSharp { } } - if (block != null && block.StateMachine is AsyncTaskStorey) { - var psm = Module.PredefinedAttributes.AsyncStateMachine; - - psm.EmitAttribute (MethodBuilder, block.StateMachine); - } - if ((ModFlags & Modifiers.METHOD_EXTENSION) != 0) Module.PredefinedAttributes.Extension.EmitAttribute (MethodBuilder); @@ -1387,17 +1398,40 @@ namespace Mono.CSharp { // Ensure we are always using method declaration parameters for (int i = 0; i < methodDefinition.parameters.Count; ++i ) { - parameters [i].Name = methodDefinition.parameters [i].Name; - parameters [i].DefaultValue = methodDefinition.parameters [i].DefaultValue; + var md_p = methodDefinition.parameters [i]; + var p = parameters [i]; + p.Name = md_p.Name; + p.DefaultValue = md_p.DefaultValue; + if (md_p.OptAttributes != null) { + if (p.OptAttributes == null) { + p.OptAttributes = md_p.OptAttributes; + } else { + p.OptAttributes.Attrs.AddRange (md_p.OptAttributes.Attrs); + } + } } - if (methodDefinition.attributes == null) - return; + if (methodDefinition.attributes != null) { + if (attributes == null) { + attributes = methodDefinition.attributes; + } else { + attributes.Attrs.AddRange (methodDefinition.attributes.Attrs); + } + } - if (attributes == null) { - attributes = methodDefinition.attributes; - } else { - attributes.Attrs.AddRange (methodDefinition.attributes.Attrs); + if (CurrentTypeParameters != null) { + for (int i = 0; i < CurrentTypeParameters.Count; ++i) { + var tp_other = methodDefinition.CurrentTypeParameters [i]; + if (tp_other.OptAttributes == null) + continue; + + var tp = CurrentTypeParameters [i]; + if (tp.OptAttributes == null) { + tp.OptAttributes = tp_other.OptAttributes; + } else { + tp.OptAttributes.Attrs.AddRange (tp.OptAttributes.Attrs); + } + } } } } @@ -1586,7 +1620,6 @@ namespace Mono.CSharp { } public bool IsPrimaryConstructor { get; set; } - MethodBase IMethodDefinition.Metadata { get { @@ -1675,12 +1708,12 @@ namespace Mono.CSharp { if (!CheckBase ()) return false; - if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor) { - if (Parent.Kind == MemberKind.Struct) { - Report.Error (9009, Location, "`{0}': Structs with primary constructor cannot have explicit constructor", + if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor && !IsStatic) { + if (Parent.Kind == MemberKind.Struct && Initializer is ConstructorThisInitializer && Initializer.Arguments == null) { + Report.Error (8043, Location, "`{0}': Structs with primary constructor cannot specify default constructor initializer", GetSignatureForError ()); } else if (Initializer == null || Initializer is ConstructorBaseInitializer) { - Report.Error (9002, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer", + Report.Error (8037, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer", GetSignatureForError ()); } } @@ -1740,6 +1773,14 @@ namespace Mono.CSharp { bc.Set (ResolveContext.Options.ConstructorScope); if (block != null) { + if (!IsStatic && Initializer == null && Parent.PartialContainer.Kind == MemberKind.Struct) { + // + // If this is a non-static `struct' constructor and doesn't have any + // initializer, it must initialize all of the struct's fields. + // + block.AddThisVariable (bc); + } + // // If we use a "this (...)" constructor initializer, then // do not emit field initializers, they are initialized in the other constructor @@ -1748,16 +1789,8 @@ namespace Mono.CSharp { Parent.PartialContainer.ResolveFieldInitializers (bc); if (!IsStatic) { - if (Initializer == null) { - if (Parent.PartialContainer.Kind == MemberKind.Struct) { - // - // If this is a non-static `struct' constructor and doesn't have any - // initializer, it must initialize all of the struct's fields. - // - block.AddThisVariable (bc); - } else if (Parent.PartialContainer.Kind == MemberKind.Class) { - Initializer = new GeneratedBaseInitializer (Location, null); - } + if (Initializer == null && Parent.PartialContainer.Kind == MemberKind.Class) { + Initializer = new GeneratedBaseInitializer (Location, null); } if (Initializer != null) { diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs index f6031a534d..5a368ee05b 100644 --- a/mcs/mcs/namespace.cs +++ b/mcs/mcs/namespace.cs @@ -683,6 +683,7 @@ namespace Mono.CSharp { public bool DeclarationFound; Namespace[] namespace_using_table; + TypeSpec[] types_using_table; Dictionary aliases; public NamespaceContainer (MemberName name, NamespaceContainer parent) @@ -935,6 +936,24 @@ namespace Mono.CSharp { return new ExtensionMethodCandidates (invocationContext, candidates, this, position); } + // LAMESPEC: TODO no spec about priority over normal extension methods yet + if (types_using_table != null) { + foreach (var t in types_using_table) { + + var res = t.MemberCache.FindExtensionMethods (invocationContext, name, arity); + if (res == null) + continue; + + if (candidates == null) + candidates = res; + else + candidates.AddRange (res); + } + + if (candidates != null) + return new ExtensionMethodCandidates (invocationContext, candidates, this, position); + } + return null; } @@ -1116,6 +1135,42 @@ namespace Mono.CSharp { return match; } + public static MethodGroupExpr LookupStaticUsings (IMemberContext mc, string name, int arity, Location loc) + { + for (var m = mc.CurrentMemberDefinition; m != null; m = m.Parent) { + + var nc = m as NamespaceContainer; + if (nc == null) + continue; + + List candidates = null; + if (nc.types_using_table != null) { + foreach (var using_type in nc.types_using_table) { + var members = MemberCache.FindMembers (using_type, name, true); + if (members != null) { + foreach (var member in members) { + if ((member.Modifiers & Modifiers.METHOD_EXTENSION) != 0) + continue; + + if (arity > 0 && member.Arity != arity) + continue; + + if (candidates == null) + candidates = new List (); + + candidates.Add (member); + } + } + } + } + + if (candidates != null) + return new MethodGroupExpr (candidates, null, loc); + } + + return null; + } + protected override void DefineNamespace () { if (namespace_using_table == null) @@ -1129,7 +1184,9 @@ namespace Mono.CSharp { namespace_using_table = empty_namespaces; if (clauses != null) { - var list = new List (clauses.Count); + List namespaces = null; + List types = null; + bool post_process_using_aliases = false; for (int i = 0; i < clauses.Count; ++i) { @@ -1168,21 +1225,36 @@ namespace Mono.CSharp { } var using_ns = entry.ResolvedExpression as NamespaceExpression; - if (using_ns == null) - continue; + if (using_ns == null) { - if (list.Contains (using_ns.Namespace)) { - // Ensure we don't report the warning multiple times in repl - clauses.RemoveAt (i--); + var type = ((TypeExpr)entry.ResolvedExpression).Type; - Compiler.Report.Warning (105, 3, entry.Location, - "The using directive for `{0}' appeared previously in this namespace", using_ns.GetSignatureForError ()); + if (types == null) + types = new List (); + + if (types.Contains (type)) { + Warning_DuplicateEntry (entry); + } else { + types.Add (type); + } } else { - list.Add (using_ns.Namespace); + if (namespaces == null) + namespaces = new List (); + + if (namespaces.Contains (using_ns.Namespace)) { + // Ensure we don't report the warning multiple times in repl + clauses.RemoveAt (i--); + + Warning_DuplicateEntry (entry); + } else { + namespaces.Add (using_ns.Namespace); + } } } - namespace_using_table = list.ToArray (); + namespace_using_table = namespaces == null ? new Namespace [0] : namespaces.ToArray (); + if (types != null) + types_using_table = types.ToArray (); if (post_process_using_aliases) { for (int i = 0; i < clauses.Count; ++i) { @@ -1239,6 +1311,13 @@ namespace Mono.CSharp { return false; } + void Warning_DuplicateEntry (UsingNamespace entry) + { + Compiler.Report.Warning (105, 3, entry.Location, + "The using directive for `{0}' appeared previously in this namespace", + entry.ResolvedExpression.GetSignatureForError ()); + } + public override void Accept (StructuralVisitor visitor) { visitor.Visit (this); @@ -1294,13 +1373,27 @@ namespace Mono.CSharp { { resolved = expr.ResolveAsTypeOrNamespace (ctx); var ns = resolved as NamespaceExpression; - if (ns == null) { - if (resolved != null) { - ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (resolved.Type); - ctx.Module.Compiler.Report.Error (138, Location, - "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", - GetSignatureForError ()); + if (ns != null) + return; + + if (resolved != null) { + var compiler = ctx.Module.Compiler; + var type = resolved.Type; + if (compiler.Settings.Version >= LanguageVersion.V_6) { + if (!type.IsClass || !type.IsStatic) { + compiler.Report.SymbolRelatedToPreviousError (type); + compiler.Report.Error (7007, Location, + "`{0}' is not a static class. A using namespace directive can only be applied to static classes or namespace", + GetSignatureForError ()); + } + + return; } + + compiler.Report.SymbolRelatedToPreviousError (type); + compiler.Report.Error (138, Location, + "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces", + GetSignatureForError ()); } } diff --git a/mcs/mcs/nullable.cs b/mcs/mcs/nullable.cs index 5f1822d007..dd36b88aef 100644 --- a/mcs/mcs/nullable.cs +++ b/mcs/mcs/nullable.cs @@ -187,6 +187,11 @@ namespace Mono.CSharp.Nullable call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null); } + public override void EmitSideEffect (EmitContext ec) + { + expr.EmitSideEffect (ec); + } + public override Expression EmitToField (EmitContext ec) { if (temp_field == null) @@ -1158,26 +1163,25 @@ namespace Mono.CSharp.Nullable // Constant lc = left as Constant; if (lc != null && !lc.IsDefaultValue) - return ReducedExpression.Create (lc, this); + return ReducedExpression.Create (lc, this, false); // // Reduce (left ?? null) to left OR (null-constant ?? right) to right // - if (right.IsNull || lc != null) - return ReducedExpression.Create (lc != null ? right : left, this); + if (right.IsNull || lc != null) { + // + // Special case null ?? null + // + if (right.IsNull && ltype == right.Type) + return null; + + return ReducedExpression.Create (lc != null ? right : left, this, false); + } right = Convert.ImplicitConversion (ec, right, ltype, loc); type = ltype; return this; } - - // - // Special case null ?? null - // - if (ltype == right.Type) { - type = ltype; - return this; - } } else { return null; } @@ -1190,7 +1194,7 @@ namespace Mono.CSharp.Nullable // Reduce (null ?? right) to right // if (left.IsNull) - return ReducedExpression.Create (right, this).Resolve (ec); + return ReducedExpression.Create (right, this, false).Resolve (ec); left = Convert.ImplicitConversion (ec, unwrap ?? left, rtype, loc); type = rtype; @@ -1238,7 +1242,7 @@ namespace Mono.CSharp.Nullable // When both expressions are nullable the unwrap // is needed only for null check not for value uwrap // - if (type.IsNullableType) + if (type.IsNullableType && TypeSpecComparer.IsEqual (NullableInfo.GetUnderlyingType (type), unwrap.Type)) unwrap.Load (ec); else left.Emit (ec); diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs index d95363c774..1a30ae384c 100644 --- a/mcs/mcs/parameter.cs +++ b/mcs/mcs/parameter.cs @@ -222,8 +222,7 @@ namespace Mono.CSharp { CallerMask = CallerMemberName | CallerLineNumber | CallerFilePath } - static readonly string[] attribute_targets = new string[] { "param" }; - static readonly string[] attribute_targets_primary = new string[] { "param", "field" }; + static readonly string[] attribute_targets = new [] { "param" }; FullNamedExpression texpr; Modifier modFlags; @@ -234,7 +233,6 @@ namespace Mono.CSharp { protected int idx; public bool HasAddressTaken; - Constructor primary_constructor; TemporaryVariableReference expr_tree_variable; HoistedParameter hoisted_variant; @@ -309,7 +307,7 @@ namespace Mono.CSharp { public override string[] ValidAttributeTargets { get { - return primary_constructor != null ? attribute_targets_primary : attribute_targets; + return attribute_targets; } } @@ -317,12 +315,6 @@ namespace Mono.CSharp { public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa) { - if (a.Target == AttributeTargets.Field) { - var field = MemberCache.FindMember (primary_constructor.Spec.DeclaringType, MemberFilter.Field (name, parameter_type), BindingRestriction.DeclaredOnly); - ((Field)field.MemberDefinition).ApplyAttributeBuilder (a, ctor, cdata, pa); - return; - } - if (a.Type == pa.In && ModFlags == Modifier.OUT) { a.Report.Error (36, a.Location, "An out parameter cannot have the `In' attribute"); return; @@ -379,6 +371,15 @@ namespace Mono.CSharp { return member.IsAccessibleAs (parameter_type); } + bool IsValidCallerContext (MemberCore memberContext) + { + var m = memberContext as Method; + if (m != null) + return !m.IsPartialImplementation; + + return true; + } + // // Resolve is used in method definitions // @@ -390,10 +391,6 @@ namespace Mono.CSharp { if (attributes != null) attributes.AttachTo (this, rc); - var ctor = rc.CurrentMemberDefinition as Constructor; - if (ctor != null && ctor.IsPrimaryConstructor) - primary_constructor = ctor; - parameter_type = texpr.ResolveAsType (rc); if (parameter_type == null) return null; @@ -428,6 +425,7 @@ namespace Mono.CSharp { { var pa = rc.Module.PredefinedAttributes; TypeSpec caller_type; + Attribute callerMemberName = null, callerFilePath = null; foreach (var attr in attributes.Attrs) { var atype = attr.ResolveTypeForComparison (); @@ -442,18 +440,31 @@ namespace Mono.CSharp { caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4026, 1, attr.Location, + "The CallerMemberName applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerMemberName; + callerMemberName = attr; continue; } if (atype == pa.CallerLineNumberAttribute) { caller_type = rc.BuiltinTypes.Int; - if (caller_type != parameter_type && !Convert.ImplicitNumericConversionExists (caller_type, parameter_type)) { + if (caller_type != parameter_type && !Convert.ImplicitStandardConversionExists (new IntConstant (caller_type, int.MaxValue, Location.Null), parameter_type)) { rc.Report.Error (4017, attr.Location, - "The CallerMemberName attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'", + "The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'", caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4024, 1, attr.Location, + "The CallerLineNumberAttribute applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerLineNumber; continue; } @@ -466,10 +477,40 @@ namespace Mono.CSharp { caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ()); } + if (!IsValidCallerContext (rc.CurrentMemberDefinition)) { + rc.Report.Warning (4025, 1, attr.Location, + "The CallerFilePath applied to parameter `{0}' will have no effect because it applies to a member that is used in context that do not allow optional arguments", + name); + } + modFlags |= Modifier.CallerFilePath; + callerFilePath = attr; continue; } } + + if ((modFlags & Modifier.CallerLineNumber) != 0) { + if (callerMemberName != null) { + rc.Report.Warning (7081, 1, callerMemberName.Location, + "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute", + Name); + } + + if (callerFilePath != null) { + rc.Report.Warning (7082, 1, callerFilePath.Location, + "The CallerFilePathAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerLineNumberAttribute", + name); + } + } + + if ((modFlags & Modifier.CallerMemberName) != 0) { + if (callerFilePath != null) { + rc.Report.Warning (7080, 1, callerFilePath.Location, + "The CallerMemberNameAttribute applied to parameter `{0}' will have no effect. It is overridden by the CallerFilePathAttribute", + name); + } + + } } public void ResolveDefaultValue (ResolveContext rc) @@ -736,6 +777,11 @@ namespace Mono.CSharp { return new TypeExpression (p_type, location); } + public void SetIndex (int index) + { + idx = index; + } + public void Warning_UselessOptionalParameter (Report Report) { Report.Warning (1066, 1, Location, @@ -1098,6 +1144,23 @@ namespace Mono.CSharp { return new ParametersCompiled (parameters, types); } + public static ParametersCompiled Prefix (ParametersCompiled parameters, Parameter p, TypeSpec type) + { + var ptypes = new TypeSpec [parameters.Count + 1]; + ptypes [0] = type; + Array.Copy (parameters.Types, 0, ptypes, 1, parameters.Count); + + var param = new Parameter [ptypes.Length]; + param [0] = p; + for (int i = 0; i < parameters.Count; ++i) { + var pi = parameters [i]; + param [i + 1] = pi; + pi.SetIndex (i + 1); + } + + return ParametersCompiled.CreateFullyResolved (param, ptypes); + } + // // TODO: This does not fit here, it should go to different version of AParametersCollection // as the underlying type is not Parameter and some methods will fail to cast @@ -1356,9 +1419,11 @@ namespace Mono.CSharp { expr = Child; if (!(expr is Constant || expr is DefaultValueExpression || (expr is New && ((New) expr).IsDefaultStruct))) { - rc.Report.Error (1736, Location, - "The expression being assigned to optional parameter `{0}' must be a constant or default value", - p.Name); + if (!(expr is ErrorExpression)) { + rc.Report.Error (1736, Location, + "The expression being assigned to optional parameter `{0}' must be a constant or default value", + p.Name); + } return; } diff --git a/mcs/mcs/property.cs b/mcs/mcs/property.cs index e8b3879f05..8c59db158b 100644 --- a/mcs/mcs/property.cs +++ b/mcs/mcs/property.cs @@ -732,12 +732,14 @@ namespace Mono.CSharp { readonly Property property; - public BackingField (Property p) + public BackingField (Property p, bool readOnly) : base (p.Parent, p.type_expr, Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (p.ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)), new MemberName ("<" + p.GetFullName (p.MemberName) + ">k__BackingField", p.Location), null) { this.property = p; + if (readOnly) + ModFlags |= Modifiers.READONLY; } public Property OriginalProperty { @@ -766,6 +768,8 @@ namespace Mono.CSharp { } + public Expression Initializer { get; set; } + public override void Accept (StructuralVisitor visitor) { visitor.Visit (this); @@ -784,10 +788,16 @@ namespace Mono.CSharp void CreateAutomaticProperty () { // Create backing field - backing_field = new BackingField (this); + backing_field = new BackingField (this, Initializer != null && Set == null); if (!backing_field.Define ()) return; + if (Initializer != null) { + backing_field.Initializer = Initializer; + Parent.RegisterFieldForInitialization (backing_field, new FieldInitializer (backing_field, Initializer, Location)); + backing_field.ModFlags |= Modifiers.READONLY; + } + Parent.PartialContainer.Members.Add (backing_field); FieldExpr fe = new FieldExpr (backing_field, Location); @@ -802,11 +812,15 @@ namespace Mono.CSharp Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Location.Null); Return r = new Return (fe, Get.Location); Get.Block.AddStatement (r); + Get.ModFlags |= Modifiers.COMPILER_GENERATED; // Create set block - Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null); - Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null); - Set.Block.AddStatement (new StatementExpression (a, Set.Location)); + if (Set != null) { + Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null); + Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null); + Set.Block.AddStatement (new StatementExpression (a, Set.Location)); + Set.ModFlags |= Modifiers.COMPILER_GENERATED; + } } public override bool Define () @@ -816,13 +830,37 @@ namespace Mono.CSharp flags |= MethodAttributes.HideBySig | MethodAttributes.SpecialName; - if (!IsInterface && (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0 && - AccessorSecond != null && Get.Block == null && Set.Block == null) { - if (Compiler.Settings.Version <= LanguageVersion.ISO_2) - Report.FeatureIsNotAvailable (Compiler, Location, "automatically implemented properties"); + bool auto = AccessorFirst.Block == null && (AccessorSecond == null || AccessorSecond.Block == null) && + (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0; + + if (Initializer != null) { + if (!auto) + Report.Error (8050, Location, "`{0}': Only auto-implemented properties can have initializers", + GetSignatureForError ()); + + if (IsInterface) + Report.Error (8053, Location, "`{0}': Properties inside interfaces cannot have initializers", + GetSignatureForError ()); + + if (Compiler.Settings.Version < LanguageVersion.V_6) + Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented property initializer"); + } + + if (auto) { + if (Get == null) { + Report.Error (8052, Location, "Auto-implemented property `{0}' must have get accessor", + GetSignatureForError ()); + return false; + } + + if (Initializer == null && AccessorSecond == null) { + Report.Error (8051, Location, "Auto-implemented property `{0}' must have set accessor or initializer", + GetSignatureForError ()); + } + + if (Compiler.Settings.Version < LanguageVersion.V_3 && Initializer == null) + Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented properties"); - Get.ModFlags |= Modifiers.COMPILER_GENERATED; - Set.ModFlags |= Modifiers.COMPILER_GENERATED; CreateAutomaticProperty (); } diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs index 009007b0d5..5ae47d8a0d 100644 --- a/mcs/mcs/report.cs +++ b/mcs/mcs/report.cs @@ -56,7 +56,9 @@ namespace Mono.CSharp { 3000, 3001, 3002, 3003, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3021, 3022, 3023, 3024, 3026, 3027, - 4014 + 4014, 4024, 4025, 4026, + 7035, 7080, 7081, 7082, 7095, + 8009, }; static HashSet AllWarningsHashSet; diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs index 5e56f614f2..3c7f13bdb1 100644 --- a/mcs/mcs/settings.cs +++ b/mcs/mcs/settings.cs @@ -28,6 +28,7 @@ namespace Mono.CSharp { V_3 = 3, V_4 = 4, V_5 = 5, + V_6 = 6, Future = 100, Default = LanguageVersion.Future, @@ -1136,11 +1137,13 @@ namespace Mono.CSharp { switch (value.ToLowerInvariant ()) { case "iso-1": + case "1": settings.Version = LanguageVersion.ISO_1; return ParseResult.Success; case "default": settings.Version = LanguageVersion.Default; return ParseResult.Success; + case "2": case "iso-2": settings.Version = LanguageVersion.ISO_2; return ParseResult.Success; @@ -1153,12 +1156,15 @@ namespace Mono.CSharp { case "5": settings.Version = LanguageVersion.V_5; return ParseResult.Success; + case "6": + settings.Version = LanguageVersion.V_6; + return ParseResult.Success; case "future": settings.Version = LanguageVersion.Future; return ParseResult.Success; } - report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', `3', `4', `5', `Default' or `Future'", value); + report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6", value); return ParseResult.Error; case "/codepage": diff --git a/mcs/mcs/statement.cs.REMOVED.git-id b/mcs/mcs/statement.cs.REMOVED.git-id index 888d45d456..7040de1d8f 100644 --- a/mcs/mcs/statement.cs.REMOVED.git-id +++ b/mcs/mcs/statement.cs.REMOVED.git-id @@ -1 +1 @@ -cfcf334197132489b4a1ff7637f4022f46182267 \ No newline at end of file +085a9a0fb5adf09da74a561c68300679586bca25 \ No newline at end of file diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs index 870b7be2a7..6e785dfc09 100644 --- a/mcs/mcs/typemanager.cs +++ b/mcs/mcs/typemanager.cs @@ -73,7 +73,6 @@ namespace Mono.CSharp public readonly TypeSpec[] OperatorsUnaryMutator; public readonly TypeSpec[] BinaryPromotionsTypes; - public readonly TypeSpec[] SwitchUserTypes; readonly BuiltinTypeSpec[] types; @@ -125,7 +124,6 @@ namespace Mono.CSharp OperatorsUnaryMutator = UnaryMutator.CreatePredefinedOperatorsTable (this); BinaryPromotionsTypes = ConstantFold.CreateBinaryPromotionsTypes (this); - SwitchUserTypes = Switch.CreateSwitchUserTypes (this); types = new BuiltinTypeSpec[] { Object, ValueType, Attribute, @@ -200,6 +198,7 @@ namespace Mono.CSharp public readonly PredefinedType SecurityAction; public readonly PredefinedType Dictionary; public readonly PredefinedType Hashtable; + public readonly TypeSpec[] SwitchUserTypes; // // C# 3.0 @@ -321,6 +320,8 @@ namespace Mono.CSharp Task.Define (); if (TaskGeneric.Define ()) TaskGeneric.TypeSpec.IsGenericTask = true; + + SwitchUserTypes = Switch.CreateSwitchUserTypes (module, Nullable.TypeSpec); } } diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs index 73d82b086f..0da8133fbd 100644 --- a/mcs/mcs/typespec.cs +++ b/mcs/mcs/typespec.cs @@ -295,6 +295,12 @@ namespace Mono.CSharp } } + public bool IsStructOrEnum { + get { + return (Kind & (MemberKind.Struct | MemberKind.Enum)) != 0; + } + } + public bool IsTypeBuilder { get { #if STATIC @@ -1930,6 +1936,11 @@ namespace Mono.CSharp return ac; } + + public override List ResolveMissingDependencies (MemberSpec caller) + { + return Element.ResolveMissingDependencies (caller); + } } class ReferenceContainer : ElementTypeSpec diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile index 33925e7df2..522c78d44d 100644 --- a/mcs/tests/Makefile +++ b/mcs/tests/Makefile @@ -6,7 +6,7 @@ thisdir = tests SUBDIRS = include ../build/rules.make -DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc) +DISTFILES = $(wildcard dlls/**/*.cs) $(wildcard dlls/*.cs) $(wildcard dlls/*.inc) $(wildcard dlls/*.il) DISTFILES += $(wildcard *.cs) $(wildcard *.il) $(wildcard *.xml) $(wildcard *.inc) $(wildcard known-issues-*) $(wildcard *.snk) with_mono_path = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" diff --git a/mcs/tests/dlls/test-883.il b/mcs/tests/dlls/test-883.il new file mode 100644 index 0000000000..d6b1fc4a1e --- /dev/null +++ b/mcs/tests/dlls/test-883.il @@ -0,0 +1,27 @@ +.assembly extern mscorlib +{ +} + +.assembly 'test-883' +{ + .publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 // .$.............. + 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 // .$..RSA1........ + 79 15 99 77 D2 D0 3A 8E 6B EA 7A 2E 74 E8 D1 AF // y..w..:.k.z.t... + CC 93 E8 85 19 74 95 2B B4 80 A1 2C 91 34 47 4D // .....t.+...,.4GM + 04 06 24 47 C3 7E 0E 68 C0 80 53 6F CF 3C 3F BE // ..$G.~.h..So. (); - - [DllImport ("Dingus")] - extern static void Do2 (); - - public static void Main () - { - - } -} \ No newline at end of file diff --git a/mcs/tests/gtest-391.cs b/mcs/tests/gtest-391.cs index bea361535a..fbc4644f46 100644 --- a/mcs/tests/gtest-391.cs +++ b/mcs/tests/gtest-391.cs @@ -19,12 +19,8 @@ class C if (b != "a") return 1; - int? i = null ?? null; - if (i != null) - return 2; - object z = a ?? null; - if (i != null) + if (z != null) return 3; string p = default (string) ?? "a"; diff --git a/mcs/tests/gtest-409.cs b/mcs/tests/gtest-409.cs index 96aff7aa33..1d2a5ad00f 100644 --- a/mcs/tests/gtest-409.cs +++ b/mcs/tests/gtest-409.cs @@ -1,7 +1,7 @@ using System; // -// Parser conditional and cast expression tests +// parser conditional and cast expression tests // class A @@ -31,6 +31,18 @@ public class ConditionalParsing struct S { } + + struct MyTestStruct : IDisposable + { + public void Dispose () + { + } + + public static implicit operator MyTestStruct (int i) + { + return new MyTestStruct (); + } + } void Test_1 (bool a) { @@ -129,6 +141,15 @@ public class ConditionalParsing bool? b = Test (1, arg:2); } + void Test_17 () + { + { + using (MyTestStruct? mts = (int?) 1) + { + } + } + } + static void Helper (T arg) { } diff --git a/mcs/tests/gtest-502.cs b/mcs/tests/gtest-502.cs index dce8e68b55..6789ff8756 100644 --- a/mcs/tests/gtest-502.cs +++ b/mcs/tests/gtest-502.cs @@ -15,6 +15,10 @@ class C static Type simple = typeof (Simple); } +class D : C +{ +} + class A { public class N @@ -30,6 +34,9 @@ class M if (typeof (TestAlias).ToString () != "A+N`1[System.Double]") return 1; + + if (typeof (D<>.Simple).ToString () != "C`1+Simple[T]") + return 2; return 0; } diff --git a/mcs/tests/gtest-614.cs b/mcs/tests/gtest-614.cs new file mode 100644 index 0000000000..d68193ad0b --- /dev/null +++ b/mcs/tests/gtest-614.cs @@ -0,0 +1,28 @@ +using System; + +struct S +{ + public static explicit operator int? (S? s) + { + throw new ApplicationException (); + } + + public static implicit operator int (S? s) + { + return 2; + } +} + +class C +{ + public static int Main() + { + int? nn = 3; + S? s = new S (); + int? ret = s ?? nn; + if (ret != 2) + return 1; + + return 0; + } +} diff --git a/mcs/tests/gtest-616.cs b/mcs/tests/gtest-616.cs new file mode 100644 index 0000000000..500e254207 --- /dev/null +++ b/mcs/tests/gtest-616.cs @@ -0,0 +1,37 @@ +using System; + +struct S : IDisposable +{ + public void Dispose () + { + } +} + +class A where T : IDisposable +{ + public virtual bool Test (U u) where U : T + { + using (u) { + return false; + } + } +} + +class B : A +{ + public override bool Test (U u) + { + using (u) { + return true; + } + } + + public static int Main () + { + var b = new B (); + if (!b.Test (new S ())) + return 1; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-617.cs b/mcs/tests/gtest-617.cs new file mode 100644 index 0000000000..da3b3c654a --- /dev/null +++ b/mcs/tests/gtest-617.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; + +class Program +{ + static void Main() + { + foreach (string x in new B ()) { + } + } +} + +class A +{ + public IEnumerator GetEnumerator () + { + var s = new List(); + s.Add("1"); + return s.GetEnumerator(); + } +} + +class B : A +{ + public IEnumerator GetEnumerator (int[] x = null) + { + throw new NotImplementedException (); + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-618.cs b/mcs/tests/gtest-618.cs new file mode 100644 index 0000000000..d92fa12d18 --- /dev/null +++ b/mcs/tests/gtest-618.cs @@ -0,0 +1,73 @@ +using System; + +struct S1 +{ + public static implicit operator int (S1? s) + { + return 1; + } +} + +struct S2 +{ + public static implicit operator int? (S2? s) + { + return null; + } +} + +struct S3 +{ + public static implicit operator int? (S3? s) + { + return 2; + } +} + +struct S4 +{ + public static implicit operator int? (S4 s) + { + return 3; + } +} + +class C +{ + public static int Main () + { + S1? s1 = new S1 (); + switch (s1) { + case 1: + break; + default: + return 1; + } + + S2? s2 = new S2 (); + switch (s2) { + case null: + break; + default: + return 2; + } + + S3? s3 = new S3 (); + switch (s3) { + case 2: + break; + default: + return 3; + } + + S4 s4 = new S4 (); + switch (s4) { + case 3: + break; + default: + return 4; + } + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-619.cs b/mcs/tests/gtest-619.cs new file mode 100644 index 0000000000..63bc79c595 --- /dev/null +++ b/mcs/tests/gtest-619.cs @@ -0,0 +1,35 @@ +interface I +{ +} + +interface IB : I +{ + +} + +struct S +{ + class P + { + } + + public class C : IB

+ { + } +} + +class M +{ + static void Test (I iface) + { + } + + static void Test (IB iface) + { + } + + static void Main () + { + Test (new S.C ()); + } +} diff --git a/mcs/tests/gtest-620.cs b/mcs/tests/gtest-620.cs new file mode 100644 index 0000000000..45e6059a2c --- /dev/null +++ b/mcs/tests/gtest-620.cs @@ -0,0 +1,28 @@ +interface I +{ +} + +class A +{ + public virtual T M (U u) where U : T + { + return u; + } +} + +class B : A>, I +{ + public override I M (U u) + { + return u; + } +} + +class Bug +{ + public static void Main () + { + var b = new B (); + b.M (b); + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-autoproperty-09.cs b/mcs/tests/gtest-autoproperty-09.cs new file mode 100644 index 0000000000..e018015684 --- /dev/null +++ b/mcs/tests/gtest-autoproperty-09.cs @@ -0,0 +1,52 @@ +using System; + +struct S +{ + public static int P { get; } = 4; + + public static int Main () + { + if (P != 4) + return 1; + + var c = new C (); + if (c.P != -3) + return 2; + + if (c.P2 != 1) + return 3; + + c.P2 = 9; + if (c.P2 != 9) + return 4; + + var s = new S2 (null); + if (s.P != 4) + return 12; + + if (s.P2 != 1) + return 13; + + s.P2 = 9; + if (s.P2 != 9) + return 14; + + return 0; + } +} + +class C +{ + public decimal P { get; } = -3; + public int P2 { get; set; } = 1; +} + +struct S2 +{ + public int P { get; } = 4; + public int P2 { get; set; } = 1; + + public S2 (object o) + { + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-collectioninit-04.cs b/mcs/tests/gtest-collectioninit-04.cs new file mode 100644 index 0000000000..8fc41c7555 --- /dev/null +++ b/mcs/tests/gtest-collectioninit-04.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +class X +{ + internal static Dictionary> Test = new Dictionary> { { + typeof (int), + metadata => "1" + }, { + typeof (uint), + metadata => "2" + }, + }; + + public static void Main () + { + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-initialize-13.cs b/mcs/tests/gtest-initialize-13.cs new file mode 100644 index 0000000000..7c213e461e --- /dev/null +++ b/mcs/tests/gtest-initialize-13.cs @@ -0,0 +1,18 @@ +using System; + +public struct EventInitializerTest +{ + public event Action a; + public event Action b; + public event Action c; + + public static void Main() + { + Action d = null; + var eit = new EventInitializerTest() { + a = null, + b = delegate {}, + c = d + }; + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-lambda-35.cs b/mcs/tests/gtest-lambda-35.cs new file mode 100644 index 0000000000..4cfd316d42 --- /dev/null +++ b/mcs/tests/gtest-lambda-35.cs @@ -0,0 +1,30 @@ +using System; + +class C +{ + static int Foo (Func b) + { + return 1; + } + + static int Foo (Func a) + { + return 2; + } + + static int Main() + { + if (Foo (() => 1) != 2) + return 1; + + if (Foo (() => (short) 1) != 1) + return 2; + + if (Foo (() => (byte) 1) != 1) + return 3; + + Console.WriteLine ("ok"); + return 0; + } + +} \ No newline at end of file diff --git a/mcs/tests/gtest-named-05.cs b/mcs/tests/gtest-named-05.cs new file mode 100644 index 0000000000..125e60d4b1 --- /dev/null +++ b/mcs/tests/gtest-named-05.cs @@ -0,0 +1,26 @@ +class Test +{ + public static void Main () + { + string p; + M (y: p = F (), x: p); + + int i; + string p2; + M2 (out i, c: p2 = F (), b : p2); + } + + public static void M (string x, string y) + { + } + + static void M2 (out int a, string b, string c) + { + a = 2; + } + + public static string F () + { + return null; + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-optional-32.cs b/mcs/tests/gtest-optional-32.cs new file mode 100644 index 0000000000..4ca3a6097d --- /dev/null +++ b/mcs/tests/gtest-optional-32.cs @@ -0,0 +1,23 @@ +using System; + +abstract class A +{ + public abstract int[] Foo (params int[] args); +} + +class B : A +{ + public override int[] Foo (int[] args = null) + { + return args; + } + + static int Main () + { + var b = new B(); + if (b.Foo().Length != 0) + return 1; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/gtest-optional-33.cs b/mcs/tests/gtest-optional-33.cs new file mode 100644 index 0000000000..0a0d311bb0 --- /dev/null +++ b/mcs/tests/gtest-optional-33.cs @@ -0,0 +1,72 @@ +using System.Runtime.CompilerServices; +using System; + +class TestCallerLineNumber +{ + static void Test ([CallerLineNumber] object line = null) + { + } + + static void Test ([CallerLineNumber] decimal line = 1) + { + } + + static void Test ([CallerLineNumber] double line = 1) + { + } + + static void Test ([CallerLineNumber] float line = 1) + { + } + + static void Test ([CallerLineNumber] int line = 1) + { + } + + static void Test ([CallerLineNumber] uint line = uint.MaxValue) + { + } + + static void Test ([CallerLineNumber] long line = 1) + { + } + + static void Test ([CallerLineNumber] ulong line = 1) + { + } + + static void Test ([CallerLineNumber] decimal? line = 1) + { + } + + static void Test ([CallerLineNumber] double? line = 1) + { + } + + static void Test ([CallerLineNumber] float? line = 1) + { + } + + static void Test ([CallerLineNumber] int? line = 1) + { + } + + static void Test ([CallerLineNumber] uint? line = uint.MaxValue) + { + } + + static void Test ([CallerLineNumber] long? line = 1) + { + } + + static void Test ([CallerLineNumber] ulong? line = 1) + { + } +} + +class D +{ + public static void Main () + { + } +} \ No newline at end of file diff --git a/mcs/tests/test-640.cs b/mcs/tests/test-640.cs index 705149a365..c85253596c 100644 --- a/mcs/tests/test-640.cs +++ b/mcs/tests/test-640.cs @@ -3,6 +3,11 @@ enum MyEnum : byte Value_1 = 1 } +enum E : ushort +{ + V = 1 +} + public class C { public static int Main () @@ -28,6 +33,11 @@ public class C if (b != (MyEnum)254) return 4; + var e = E.V; + checked { + var res = ~e; + } + System.Console.WriteLine ("OK"); return 0; } diff --git a/mcs/tests/test-671.cs b/mcs/tests/test-671.cs index f6b992f384..87395cdeb3 100644 --- a/mcs/tests/test-671.cs +++ b/mcs/tests/test-671.cs @@ -9,7 +9,7 @@ class C static bool Bar (object t) { - return Bar is object; + return t is object; } } diff --git a/mcs/tests/test-77.cs b/mcs/tests/test-77.cs index c4525d7b34..7da6a379d4 100644 --- a/mcs/tests/test-77.cs +++ b/mcs/tests/test-77.cs @@ -57,7 +57,15 @@ class XX { s = (object)1 + null; if (s != "1") return 12; - + + s = (string)null + (object)null; + if (s.Length != 0) + return 13; + + s = (object)null + (string)null; + if (s.Length != 0) + return 14; + System.Console.WriteLine ("test ok"); return 0; } diff --git a/mcs/tests/test-894.cs b/mcs/tests/test-894.cs new file mode 100644 index 0000000000..259a66cd03 --- /dev/null +++ b/mcs/tests/test-894.cs @@ -0,0 +1,19 @@ +using System; + +[AttributeUsage (AttributeTargets.All + 0xFFFFFE + 1)] +class A1Attribute : Attribute +{ +} + +[AttributeUsage ((AttributeTargets) 0xffff)] +class A2Attribute : Attribute +{ +} + +public class Test +{ + public static void Main () + { + + } +} \ No newline at end of file diff --git a/mcs/tests/test-896.cs b/mcs/tests/test-896.cs new file mode 100644 index 0000000000..4336bf7314 --- /dev/null +++ b/mcs/tests/test-896.cs @@ -0,0 +1,13 @@ +using System; + +class Program +{ + public static void Main () + { + goto L1; + int z; + L1: + z = 3; + Console.WriteLine (z); + } +} \ No newline at end of file diff --git a/mcs/tests/test-897.cs b/mcs/tests/test-897.cs new file mode 100644 index 0000000000..e5b328255e --- /dev/null +++ b/mcs/tests/test-897.cs @@ -0,0 +1,26 @@ +using System; + +class X +{ + static int Foo () + { + throw new ApplicationException (); + } + + public static int Main () + { + try { + var b = Foo () is object; + return 1; + } catch (ApplicationException) { + } + + try { + var b = Foo () as object; + return 2; + } catch (ApplicationException) { + } + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-898.cs b/mcs/tests/test-898.cs new file mode 100644 index 0000000000..5b6940372f --- /dev/null +++ b/mcs/tests/test-898.cs @@ -0,0 +1,79 @@ +// Compiler options: -unsafe + +using System; + +class BoolArrayWithByteValues +{ + + static int Foo (ref bool b) + { + bool b2 = true; + bool r; + r = b == true; + if (!r) + return 10; + + r = b == b2; + if (!r) + return 11; + + return 0; + } + + static unsafe bool Ptr () + { + bool rv; + + var arr = new byte [256]; + for (int i = 0; i < arr.Length; i++) + arr [i] = (byte) i; + fixed (byte* bptr = arr) { + rv = true; + for (int i = 0; i < arr.Length; i++) { + bool* boptr = (bool*)(bptr + i); + if (arr[i] > 0 && !*boptr) + rv = false; + System.Console.WriteLine ("#{0} = {1}", i, *boptr); + } + } + + return rv; + } + + static int Main() + { + var a = new bool[1]; + Buffer.SetByte (a, 0, 5); + + var b = true; + bool r; + r = a [0]; + if (!r) + return 1; + + r = a [0] == true; + if (!r) + return 2; + + r = a [0] == b; + if (!r) + return 3; + + r = a [0] != false; + if (!r) + return 4; + + r = a [0] != b; + if (r) + return 5; + + var res = Foo (ref a [0]); + if (res != 0) + return res; + + if (!Ptr ()) + return 6; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-899.cs b/mcs/tests/test-899.cs new file mode 100644 index 0000000000..2f8c9e57d3 --- /dev/null +++ b/mcs/tests/test-899.cs @@ -0,0 +1,15 @@ +using System; + +class Test +{ + public static void Main() + { + object o; + lock (o = new object()) + { + Console.WriteLine (o); + } + + Console.WriteLine (o); + } +} diff --git a/mcs/tests/test-900.cs b/mcs/tests/test-900.cs new file mode 100644 index 0000000000..b0e4b0a3da --- /dev/null +++ b/mcs/tests/test-900.cs @@ -0,0 +1,17 @@ +using System; + +class D +{ + public static implicit operator D (Action d) + { + return new D (); + } +} + +class Program +{ + static void Main() + { + D d = (D) Main; + } +} diff --git a/mcs/tests/test-901.cs b/mcs/tests/test-901.cs new file mode 100644 index 0000000000..bdd7d076ce --- /dev/null +++ b/mcs/tests/test-901.cs @@ -0,0 +1,23 @@ +using System; + +class X +{ + public static void Main () + { + int i; + if (true) { + i = 3; + } + + Console.WriteLine (i); + + int i2; + if (false) { + throw new ApplicationException (); + } else { + i2 = 4; + } + + Console.WriteLine (i2); + } +} \ No newline at end of file diff --git a/mcs/tests/test-902.cs b/mcs/tests/test-902.cs new file mode 100644 index 0000000000..271035fddb --- /dev/null +++ b/mcs/tests/test-902.cs @@ -0,0 +1,24 @@ +abstract class A +{ + public virtual void M (params B[] b) + { + } +} + +class B : A +{ + public override void M (B[] b2) + { + } +} + +class Test2 +{ + public static void Main() + { + B b = new B(); + A a = b; + a.M (b, b); + b.M (b, b, b); + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-13.cs b/mcs/tests/test-async-13.cs index 9f8cccac07..33279ff095 100644 --- a/mcs/tests/test-async-13.cs +++ b/mcs/tests/test-async-13.cs @@ -8,10 +8,12 @@ using System.Runtime.CompilerServices; struct S { public int Value; + public S2 s2; public S (int a1, string a2) { Value = a1; + s2 = new S2 (); } public void SetValue (int value) @@ -32,6 +34,11 @@ struct S } } +struct S2 +{ + public int Value; +} + enum E { E_1 = 1 @@ -270,6 +277,21 @@ class Tester : Base return 0; } + async Task ArrayAccessTest_10 () + { + var b = new bool [1] { true }; + + var r = b [await Task.Factory.StartNew (() => 0)]; + return r; + } + + async Task ArrayAccessTest_11 () + { + var a = new S [1]; + a [await Task.Factory.StartNew (() => 0)].s2.Value += 5; + return a [await Task.Factory.StartNew(() => 0)].s2.Value == 5; + } + async Task AssignTest_1 () { field_int = await Task.Factory.StartNew (() => 0); @@ -585,6 +607,18 @@ class Tester : Base var s = new S (await Task.Factory.StartNew (() => 77), await Task.Factory.StartNew (() => "b")); return s.Value == 77; } + + async Task NewDelegate_1 () + { + var f = new Func (await NewDelegate_1_0 ()); + return f (); + } + + static async Task> NewDelegate_1_0 () + { + await Task.Factory.StartNew (() => { }); + return () => 0; + } async Task NewInitTest_1 () { diff --git a/mcs/tests/test-async-15.cs b/mcs/tests/test-async-15.cs index a1da25f39d..a3ae814086 100644 --- a/mcs/tests/test-async-15.cs +++ b/mcs/tests/test-async-15.cs @@ -1,8 +1,8 @@ -// Compiler options: -langversion:future - using System; using System.Threading.Tasks; using System.Threading; +using System.Collections; +using System.Collections.Generic; interface IFoo { @@ -25,12 +25,28 @@ struct S : IFoo } } +struct S2 : IEnumerable +{ + public List Values; + + public void Add (int x) + { + if (Values == null) + Values = new List (); + + Values.Add(x); + } + + public IEnumerator GetEnumerator() + { + return Values as IEnumerator; + } +} + class Tester { async Task NewInitTestGen () where T : struct, IFoo { - int value = 9; - var s = new T () { Value = await Task.Factory.StartNew (() => 13).ConfigureAwait (false) }; @@ -40,6 +56,16 @@ class Tester return s; } + + static async Task NewInitCol () + { + var s = new S2 { + await Task.FromResult (1), + await Task.Factory.StartNew (() => 2) + }; + + return s.Values [0] + s.Values [1]; + } public static int Main () { @@ -51,6 +77,10 @@ class Tester if (t.Result.Value != 13) return 2; + + var v = NewInitCol ().Result; + if (v != 3) + return 3; return 0; } diff --git a/mcs/tests/test-async-22.cs b/mcs/tests/test-async-22.cs index ca6e1faf90..e715d1a459 100644 --- a/mcs/tests/test-async-22.cs +++ b/mcs/tests/test-async-22.cs @@ -174,4 +174,13 @@ namespace AwaitNS var l = await.Length; } } + + class TypeChecks + { + static void M (object await) + { + var b = await is Exception; + var c = await as Exception; + } + } } diff --git a/mcs/tests/test-async-35.cs b/mcs/tests/test-async-35.cs index 5b2cadb227..e04a810ebc 100644 --- a/mcs/tests/test-async-35.cs +++ b/mcs/tests/test-async-35.cs @@ -14,6 +14,15 @@ namespace N.M return 0; } + public static async Task NestedAsyncAnonymousMethod () + { + Action a = async delegate { + await Task.Yield(); + }; + + await Task.Yield(); + } + public static int Main () { var m = typeof (C).GetMethod ("AsyncMethod"); @@ -32,6 +41,28 @@ namespace N.M if (c != 1) return 3; + + m = typeof (C).GetMethod ("NestedAsyncAnonymousMethod"); + attr = m.GetCustomAttribute (); + if (attr == null) + return 10; + + if (attr.StateMachineType == null) + return 11; + + var n = typeof (C).GetNestedTypes (BindingFlags.NonPublic).Single (l => l.Name.Contains ("NestedAsyncAnonymousMethod")); + if (n == null) + return 12; + + m = n.GetMethods (BindingFlags.NonPublic | BindingFlags.Static).Single (l => l.Name.Contains ("m__")); + + attr = m.GetCustomAttribute (); + if (attr == null) + return 13; + + if (attr.StateMachineType == null) + return 14; + return 0; } } diff --git a/mcs/tests/test-async-63.cs b/mcs/tests/test-async-63.cs new file mode 100644 index 0000000000..4572d7e2ed --- /dev/null +++ b/mcs/tests/test-async-63.cs @@ -0,0 +1,85 @@ +using System; +using System.Threading.Tasks; + +class C +{ + static int counter; + public static async Task TestSingleAwait (bool throwException) + { + try { + if (throwException) + throw new ApplicationException (); + } catch (ApplicationException ex) { + Console.WriteLine ("x1a"); + ++counter; + await Call (); + Console.WriteLine ("x2a"); + ++counter; + } catch { + throw; + } + + Console.WriteLine ("end"); + } + + public static async Task TestDoubleAwait (bool throwException) + { + try { + if (throwException) + throw new ApplicationException (); + } catch (ApplicationException ex) { + Console.WriteLine ("x1a"); + ++counter; + await Call (); + Console.WriteLine ("x2a"); + ++counter; + } catch { + Console.WriteLine ("x1b"); + counter += 4; + await Call (); + Console.WriteLine ("x2b"); + counter += 7; + } + + Console.WriteLine ("end"); + } + + static Task Call () + { + return Task.Factory.StartNew (() => false); + } + + void HH () + { + try { + throw new ApplicationException (); + } catch { + throw; + } + } + + public static int Main () + { + TestSingleAwait (true).Wait (); + Console.WriteLine (counter); + if (counter != 2) + return 1; + + TestSingleAwait (false).Wait (); + if (counter != 2) + return 2; + + counter = 0; + + TestDoubleAwait (true).Wait (); + Console.WriteLine (counter); + if (counter != 2) + return 3; + + TestDoubleAwait (false).Wait (); + if (counter != 2) + return 4; + + return 0; + } +} diff --git a/mcs/tests/test-async-64.cs b/mcs/tests/test-async-64.cs new file mode 100644 index 0000000000..e16e127029 --- /dev/null +++ b/mcs/tests/test-async-64.cs @@ -0,0 +1,18 @@ +using System; +using System.Threading.Tasks; + +class X +{ + public static void Main () + { + Invoke (async delegate { + await Task.Yield (); + return 1; + }); + } + + static T Invoke (Func> m) + { + return default (T); + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-65.cs b/mcs/tests/test-async-65.cs new file mode 100644 index 0000000000..3967236691 --- /dev/null +++ b/mcs/tests/test-async-65.cs @@ -0,0 +1,54 @@ +using System; +using System.Threading.Tasks; + +class C +{ + static int counter; + + public static async Task TestRethrow (Exception e) + { + try { + throw e; + } catch (ApplicationException) { + Console.WriteLine ("x1a"); + counter = 1; + await Task.Delay (1); + Console.WriteLine ("x2a"); + counter = 3; + throw; + } catch { + counter = 9; + await Task.Delay (1); + Console.WriteLine ("ga"); + throw; + } + } + + public static int Main () + { + var ex = new ApplicationException (); + try { + TestRethrow (ex).Wait (); + } catch (AggregateException e) { + if (e.InnerException != ex) + return 1; + } + + if (counter != 3) + return 2; + + var ex2 = new NotSupportedException (); + try { + TestRethrow (ex2).Wait (); + } catch (AggregateException e) { + if (e.InnerException != ex2) + return 3; + } + + if (counter != 9) + return 4; + + Console.WriteLine ("ok"); + return 0; + } +} diff --git a/mcs/tests/test-async-66.cs b/mcs/tests/test-async-66.cs new file mode 100644 index 0000000000..bbba098022 --- /dev/null +++ b/mcs/tests/test-async-66.cs @@ -0,0 +1,42 @@ +using System; +using System.Threading.Tasks; + +class TestFinally +{ + static int counter; + + async static Task Test (bool throwException) + { + try { + if (throwException) + throw new ApplicationException (); + + ++counter; + System.Console.WriteLine (); + } finally { + counter += 10; + await Task.Delay (2); + counter += 100; + } + counter += 1000; + } + + static int Main () + { + Test (false).Wait (); + if (counter != 1111) + return 1; + + counter = 0; + try { + Test (true).Wait (); + return 2; + } catch (AggregateException) { + } + + if (counter != 110) + return 3; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-67.cs b/mcs/tests/test-async-67.cs new file mode 100644 index 0000000000..2348dc7ff7 --- /dev/null +++ b/mcs/tests/test-async-67.cs @@ -0,0 +1,24 @@ +using System; +using System.Threading.Tasks; + +class Test +{ + public static async Task Run () + { + return new int[] { + 1, await Task.Factory.StartNew (() => 2) + }; + } + + public static int Main () + { + var t = Run ().Result; + if (t [0] != 1) + return 1; + + if (t [1] != 2) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-69.cs b/mcs/tests/test-async-69.cs new file mode 100644 index 0000000000..af133f953c --- /dev/null +++ b/mcs/tests/test-async-69.cs @@ -0,0 +1,151 @@ +using System; +using System.Threading.Tasks; + +class Test +{ + static bool fin; + + static async Task YieldValue (int a) + { + await Task.Yield (); + return a; + } + + static async Task TestFinallyWithReturn (int value) + { + fin = false; + try { + if (value > 4) + return 5; + + value += 10; + Console.WriteLine ("try"); + } finally { + fin = true; + Console.WriteLine ("finally"); + value += await YieldValue (100); + } + + value += 1000; + Console.WriteLine ("over"); + + return value; + } + + static async Task TestFinallyWithReturnNoValue (int value) + { + fin = false; + try { + if (value > 4) + return; + + value += 10; + Console.WriteLine ("try"); + } finally { + fin = true; + Console.WriteLine ("finally"); + value += await YieldValue (100); + } + + value += 1000; + Console.WriteLine ("over"); + } + + static async Task TestFinallyWithGoto (int value) + { + fin = false; + try { + if (value > 4) + goto L; + + value += 10; + Console.WriteLine ("try"); + } finally { + fin = true; + Console.WriteLine ("finally"); + value += await YieldValue (100); + } + value += 1000; +L: + Console.WriteLine ("over"); + return value; + } + + static async Task TestFinallyWithGotoAndReturn (int value) + { + fin = false; + try { + if (value > 4) + goto L; + + value += 10; + Console.WriteLine ("try"); + if (value > 12) + return 9; + } finally { + fin = true; + Console.WriteLine ("finally"); + value += await YieldValue (100); + } + value += 1000; +L: + Console.WriteLine ("over"); + return value; + } + + public static int Main () + { + if (TestFinallyWithReturn (9).Result != 5) + return 1; + + if (!fin) + return 2; + + if (TestFinallyWithReturn (1).Result != 1111) + return 3; + + if (!fin) + return 4; + + TestFinallyWithReturnNoValue (9).Wait (); + if (!fin) + return 5; + + TestFinallyWithReturnNoValue (1).Wait (); + if (!fin) + return 6; + + if (TestFinallyWithGoto (9).Result != 109) + return 7; + + if (!fin) + return 8; + + if (TestFinallyWithGoto (1).Result != 1111) + return 9; + + if (!fin) + return 10; + + if (TestFinallyWithGotoAndReturn (9).Result != 109) + return 11; + + if (!fin) + return 12; + + if (TestFinallyWithGotoAndReturn (1).Result != 1111) + return 13; + + if (!fin) + return 14; + + if (TestFinallyWithGotoAndReturn (3).Result != 9) + return 15; + + if (!fin) + return 16; + + Console.WriteLine ("ok"); + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-70.cs b/mcs/tests/test-async-70.cs new file mode 100644 index 0000000000..550c2bbcb8 --- /dev/null +++ b/mcs/tests/test-async-70.cs @@ -0,0 +1,97 @@ +using System; +using System.Threading.Tasks; + +class Test +{ + static async Task YieldValue (int a) + { + await Task.Yield (); + return a; + } + + static async Task TestNestedReturn (int v) + { + int x = 0; + + try { + try { + x = await YieldValue (1); + Console.WriteLine ("T1"); + if (x == v) + return 6; + } finally { + Console.WriteLine ("F1"); + + x += await YieldValue (2); + } + + Console.WriteLine ("AF1"); + } finally { + Console.WriteLine ("F2"); + try { + x += await YieldValue (4); + Console.WriteLine ("T3"); + } finally { + Console.WriteLine ("F3"); + x += await YieldValue (8); + } + } + + Console.WriteLine ("END"); + + return x; + } + + static async Task TestNestedGoto (int v) + { + int x = 0; + + try { + try { + Console.WriteLine ("T1"); + if (x == v) + goto L; + + x = await YieldValue (1); + } finally { + Console.WriteLine ("F1"); + + x += await YieldValue (2); + } + + Console.WriteLine ("AF1"); + } finally { + Console.WriteLine ("F2"); + try { + x += await YieldValue (4); + Console.WriteLine ("T3"); + } finally { + Console.WriteLine ("F3"); + x += await YieldValue (8); + } + } + + Console.WriteLine ("END"); +L: + Console.WriteLine ("END L"); + + return x; + } + + public static int Main () + { + if (TestNestedReturn (1).Result != 6) + return 1; + + if (TestNestedReturn (0).Result != 15) + return 2; + + if (TestNestedGoto (1).Result != 15) + return 3; + + if (TestNestedGoto (0).Result != 14) + return 4; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-71.cs b/mcs/tests/test-async-71.cs new file mode 100644 index 0000000000..2b7c425f8b --- /dev/null +++ b/mcs/tests/test-async-71.cs @@ -0,0 +1,25 @@ +// Compiler options: -unsafe + +using System; +using System.Threading.Tasks; + +class UnsafeContext +{ + static int Main() + { + if (TestUnsafe (1).Result != 0) + return 1; + + return 0; + } + + static async Task TestUnsafe (int g) + { + unsafe { + int* ga = &g; + } + + await Task.Yield (); + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-72.cs b/mcs/tests/test-async-72.cs new file mode 100644 index 0000000000..3621863a75 --- /dev/null +++ b/mcs/tests/test-async-72.cs @@ -0,0 +1,88 @@ +using System; +using System.Threading.Tasks; + +class Test +{ + static async Task YieldValue (int a) + { + await Task.Yield (); + return a; + } + + public static async Task BreakTest () + { + int value = 0; + try { + for (int i = 0; i < 8; ++i) { + try { + try { + value += await YieldValue (1); + + Console.WriteLine ("i = " + i); + + if (i > 2) + break; + + if (i > 1) + throw new ApplicationException (); + } catch (ApplicationException) { + Console.WriteLine ("catch"); + value += await YieldValue (100); + } + } finally { + Console.WriteLine ("F1"); + value += await YieldValue (10); + } + } + } finally { + Console.WriteLine ("F2"); + value += await YieldValue (1000); + } + + return value; + } + + public static async Task ContinueTest () + { + int value = 0; + try { + for (int i = 0; i < 8; ++i) { + try { + try { + value += await YieldValue (1); + + Console.WriteLine ("i = " + i); + + if (i < 2) + continue; + + if (i > 1) + throw new ApplicationException (); + } catch (ApplicationException) { + Console.WriteLine ("catch"); + value += await YieldValue (100); + } + } finally { + Console.WriteLine ("F1"); + value += await YieldValue (10); + } + } + } finally { + Console.WriteLine ("F2"); + value += await YieldValue (1000); + } + + return value; + } + + public static int Main () + { + if (BreakTest ().Result != 1144) + return 1; + + if (ContinueTest ().Result != 1688) + return 1; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-73.cs b/mcs/tests/test-async-73.cs new file mode 100644 index 0000000000..dc1935ff74 --- /dev/null +++ b/mcs/tests/test-async-73.cs @@ -0,0 +1,31 @@ +using System.Threading.Tasks; +using System; + +class X +{ + static async Task Foo () + { + var v = Throws (); + + try { + await v; + } catch (Exception e) { + return 0; + } + + return 1; + } + + static async Task Throws () + { + throw new Exception (); + } + + static int Main () + { + if (Foo ().Result != 0) + return 1; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-async-74.cs b/mcs/tests/test-async-74.cs new file mode 100644 index 0000000000..97bb7fd946 --- /dev/null +++ b/mcs/tests/test-async-74.cs @@ -0,0 +1,27 @@ +using System; +using System.Threading.Tasks; + +class AwaitGotoBug +{ + public async Task Test() + { + using ((IDisposable)null) + { + retry: + + if (Equals(1, 2)) + { + await Task.Yield(); + goto retry; + } + else + { + await Task.Yield(); + } + } + } + + public static void Main () + { + } +} \ No newline at end of file diff --git a/mcs/tests/test-ex-filter-03.cs b/mcs/tests/test-ex-filter-03.cs new file mode 100644 index 0000000000..d2a3e91041 --- /dev/null +++ b/mcs/tests/test-ex-filter-03.cs @@ -0,0 +1,21 @@ +using System; + +class X +{ + public static int Main () + { + try { + bool x = true; + try { + throw new ApplicationException (); + } catch (NullReferenceException) if (x) { + throw; + } + + return 1; + } catch (ApplicationException) { + Console.WriteLine ("ok"); + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/test-ex-filter-04.cs b/mcs/tests/test-ex-filter-04.cs new file mode 100644 index 0000000000..122accb2ee --- /dev/null +++ b/mcs/tests/test-ex-filter-04.cs @@ -0,0 +1,74 @@ +using System; +using System.Threading.Tasks; + +class X +{ + static Exception ex = new ApplicationException (); + + public static int Main () + { + if (Test (5, null).Result != 5) + return 1; + + try { + Test (5, ex).Wait (); + return 2; + } catch (AggregateException ae) { + if (ae.InnerException != ex) + return 3; + } + + try { + Test (15, ex).Wait (); + return 4; + } catch (AggregateException ae) { + if (ae.InnerException != ex) + return 5; + } + + try { + TestGeneric (5).Wait (); + return 10; + } catch (AggregateException ae) { + if (ae.InnerException != ex) + return 11; + } + + try { + TestGeneric (15).Wait (); + return 12; + } catch (AggregateException ae) { + if (ae.InnerException != ex) + return 13; + } + + return 0; + } + + async static Task Test (int x, Exception e) + { + try { + Console.WriteLine (x); + if (e != null) + throw e; + } catch (Exception) if (x != 15) { + await Task.FromResult (0); + throw; + } + + return x; + } + + async static Task TestGeneric (int x) + { + try { + Console.WriteLine (x); + throw ex; + } catch if (x != 15) { + await Task.FromResult (0); + throw; + } + + return x; + } +} \ No newline at end of file diff --git a/mcs/tests/test-ex-filter-05.cs b/mcs/tests/test-ex-filter-05.cs new file mode 100644 index 0000000000..5d1251a34d --- /dev/null +++ b/mcs/tests/test-ex-filter-05.cs @@ -0,0 +1,40 @@ +using System; +using System.Threading.Tasks; + +class Test +{ + static bool Verify (Func f) + { + return f (); + } + + static async Task TestCapturedException (Exception e) + { + try { + if (e != null) + throw e; + } catch (Exception ex) if (Verify (() => ex.Message == "foo")) { + await Task.Yield (); + Console.WriteLine (ex); + return 1; + } catch (Exception ex) if (Verify (() => ex.Message != null)) { + await Task.Yield (); + Console.WriteLine (ex); + return 2; + } + + return 3; + } + + public static int Main() + { + if (TestCapturedException (null).Result != 3) + return 1; + + var ex = new ApplicationException (); + if (TestCapturedException (ex).Result != 2) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-ex-filter-06.cs b/mcs/tests/test-ex-filter-06.cs new file mode 100644 index 0000000000..86bbf0e2ea --- /dev/null +++ b/mcs/tests/test-ex-filter-06.cs @@ -0,0 +1,29 @@ +using System; +using System.IO; +using System.Collections.Generic; + +class C +{ + static int Test () where T : Exception + { + try { + throw null; + } catch (T t) if (t.Message != null) { + return 0; + } + } + + static int Main() + { + try { + Test (); + return 1; + } catch { + } + + if (Test () != 0) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-expression-bodied-01.cs b/mcs/tests/test-expression-bodied-01.cs new file mode 100644 index 0000000000..6d827f21ed --- /dev/null +++ b/mcs/tests/test-expression-bodied-01.cs @@ -0,0 +1,54 @@ +using System; + +class C +{ + int value; + string f1 = "f-1"; + string f2 = "f=2"; + + public static string Test1 (string a, string b) => a + "|" + b; + void Test2 (int x) => value = x; + Func Test3 (int a) => () => a; + + public static implicit operator string (C c) => "op"; + + protected string Prop => f1 + " " + f2; + static Func Prop2 => () => "n1"; + + public int this[int arg1, int arg2] => arg2 - arg1; + + + int Check () + { + if (Test1 ("1", "5") != "1|5") + return 1; + + Test2 (6); + if (value != 6) + return 2; + + if (Test3 (9) () != 9) + return 3; + + string s = this; + if (s != "op") + return 4; + + if (Prop != "f-1 f=2") + return 5; + + if (Prop2 () != "n1") + return 6; + + if (this [13, 20] != 7) + return 7; + + return 0; + } + + static int Main() + { + var c = new C (); + return c.Check (); + } +} \ No newline at end of file diff --git a/mcs/tests/test-partial-26.cs b/mcs/tests/test-partial-26.cs index 54cfb9cb4e..78a543212d 100644 --- a/mcs/tests/test-partial-26.cs +++ b/mcs/tests/test-partial-26.cs @@ -1,21 +1,25 @@ using System; -namespace ConsoleApplication1 +namespace TestAttributesCollecting { - public partial class X + class A : Attribute { - [CLSCompliant (true)] - partial void Foo (); } public partial class X { - partial void Foo () + [A] + partial void Foo<[A] T>(/*[A]*/ int p); + } + + public partial class X + { + partial void Foo (int p) { int i; } } - + public partial class Y { partial void Foo () @@ -23,7 +27,7 @@ namespace ConsoleApplication1 int i; } } - + public partial class Y { [CLSCompliant (true)] @@ -34,16 +38,22 @@ namespace ConsoleApplication1 { public static int Main () { - var x = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true); + var m = typeof (X).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); + var x = m.GetCustomAttributes (true); Console.WriteLine (x.Length); if (x.Length != 1) return 1; + var ga = m.GetGenericArguments (); + x = ga [0].GetCustomAttributes (false); + if (x.Length != 1) + return 2; + x = typeof (Y).GetMethod ("Foo", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetCustomAttributes (true); Console.WriteLine (x.Length); if (x.Length != 1) - return 2; - + return 3; + return 0; } } diff --git a/mcs/tests/test-primary-ctor-01.cs b/mcs/tests/test-primary-ctor-01.cs index dac84c863c..f2b2239fd4 100644 --- a/mcs/tests/test-primary-ctor-01.cs +++ b/mcs/tests/test-primary-ctor-01.cs @@ -1,10 +1,6 @@ class Simple(int arg) { - int Property { - get { - return arg; - } - } + int Property { get; } = arg; public static int Main () { @@ -22,9 +18,5 @@ class Simple(int arg) struct S(decimal arg) { - internal decimal Property { - get { - return arg; - } - } + internal decimal Property { get; } = arg; } \ No newline at end of file diff --git a/mcs/tests/test-primary-ctor-02.cs b/mcs/tests/test-primary-ctor-02.cs index 5369a49c9b..bc02c026c7 100644 --- a/mcs/tests/test-primary-ctor-02.cs +++ b/mcs/tests/test-primary-ctor-02.cs @@ -5,22 +5,21 @@ partial class Part public Part (string s) : this (5) { - if (arg != 5) - throw new ApplicationException ("1"); - - if (Property != 12) - throw new ApplicationException ("2"); } } partial class Part(int arg) { - int field = 7; + static int field = 7; - int Property { - get { - return arg + field; - } + int Property { get; } = arg + field; + + { + if (arg != 5) + throw new ApplicationException ("1"); + + if (Property != 12) + throw new ApplicationException ("2"); } public static int Main () diff --git a/mcs/tests/test-primary-ctor-03.cs b/mcs/tests/test-primary-ctor-03.cs index d6e472e4d4..269dfe8dd1 100644 --- a/mcs/tests/test-primary-ctor-03.cs +++ b/mcs/tests/test-primary-ctor-03.cs @@ -4,7 +4,7 @@ class D(string arg) : Base (arg) abstract class Base (object obj) { - public string Prop { get { return obj.ToString (); } } + public string Prop { get; } = obj.ToString (); } class X diff --git a/mcs/tests/test-primary-ctor-05.cs b/mcs/tests/test-primary-ctor-05.cs index 503e944c55..f127ceccc3 100644 --- a/mcs/tests/test-primary-ctor-05.cs +++ b/mcs/tests/test-primary-ctor-05.cs @@ -7,21 +7,19 @@ class A : Attribute { } -class X ([field:A] int value) +[method:A] +class X (int value) { public int f = value; - public int P { - get { - return value; - } - } + public int P { get; } = value; public static int Main () { - var attr = (A)typeof (X).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttribute (typeof (A)); + var x = typeof (X); + var attr = x.GetConstructors ()[0].GetCustomAttribute (typeof (A)) as A; if (attr == null) - return 1; + return 2; return 0; } diff --git a/mcs/tests/test-primary-ctor-06.cs b/mcs/tests/test-primary-ctor-06.cs new file mode 100644 index 0000000000..7d9ef1e9c5 --- /dev/null +++ b/mcs/tests/test-primary-ctor-06.cs @@ -0,0 +1,15 @@ +using System; + +class ID () : IDisposable +{ + void IDisposable.Dispose () + { + } +} + +class X +{ + public static void Main () + { + } +} \ No newline at end of file diff --git a/mcs/tests/test-primary-ctor-07.cs b/mcs/tests/test-primary-ctor-07.cs new file mode 100644 index 0000000000..233cfd0d03 --- /dev/null +++ b/mcs/tests/test-primary-ctor-07.cs @@ -0,0 +1,29 @@ +using System; + +struct S (int x) +{ + public int y = x; + + public S (char x) + : this (1) + { + } + + static S () + { + } +} + +class X +{ + public static int Main () + { + if (new S (-5).y != -5) + return 1; + + if (new S ('x').y != 1) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-primary-ctor-08.cs b/mcs/tests/test-primary-ctor-08.cs new file mode 100644 index 0000000000..9f24885856 --- /dev/null +++ b/mcs/tests/test-primary-ctor-08.cs @@ -0,0 +1,31 @@ +struct S (int arg) +{ + { + v = arg; + } + + public readonly int v; +} + +class C (int arg) +{ + { + v = arg; + } + + public readonly int v; +} + +class Test +{ + public static int Main () + { + if (new C (4).v != 4) + return 1; + + if (new S (3).v != 3) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-primary-ctor-09.cs b/mcs/tests/test-primary-ctor-09.cs new file mode 100644 index 0000000000..64e5ac6332 --- /dev/null +++ b/mcs/tests/test-primary-ctor-09.cs @@ -0,0 +1,30 @@ +using System; + +class A (Func barg) +{ + public Func BaseArg = barg; +} + +partial class PC +{ + public Func f1 = (a) => arg; +} + +partial class PC (int arg) + : A ((a) => arg) +{ +} + +class X +{ + public static int Main () + { + if (new PC (3).f1 (4) != 3) + return 1; + + if (new PC (3).BaseArg (4) != 3) + return 2; + + return 0; + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-01.cs b/mcs/tests/test-static-using-01.cs new file mode 100644 index 0000000000..88358aaa28 --- /dev/null +++ b/mcs/tests/test-static-using-01.cs @@ -0,0 +1,28 @@ +// Compiler options: -langversion:6 + +using A.B.X; + +namespace A.B +{ + static class X + { + public static int Test () + { + return 5; + } + } +} + +namespace C +{ + class M + { + public static int Main () + { + if (Test () != 5) + return 1; + + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-02.cs b/mcs/tests/test-static-using-02.cs new file mode 100644 index 0000000000..db11121394 --- /dev/null +++ b/mcs/tests/test-static-using-02.cs @@ -0,0 +1,42 @@ +// Compiler options: -langversion:6 + +using System; + +namespace A.B +{ + static class X + { + public static int Test (object o) + { + return 1; + } + } +} + +namespace A.C +{ + static class X + { + public static int Test (int o) + { + return 2; + } + } +} + +namespace C +{ + using A.B.X; + using A.C.X; + + class M + { + public static int Main () + { + if (Test (3) != 2) + return 1; + + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-03.cs b/mcs/tests/test-static-using-03.cs new file mode 100644 index 0000000000..870643f465 --- /dev/null +++ b/mcs/tests/test-static-using-03.cs @@ -0,0 +1,42 @@ +// Compiler options: -langversion:6 + +using System; +using A.B.X; + +namespace A.B +{ + static class X + { + public static int Test (int o) + { + return 1; + } + } +} + +namespace A.C +{ + static class X + { + public static int Test (int o) + { + return 2; + } + } +} + +namespace C +{ + using A.C.X; + + class M + { + public static int Main () + { + if (Test (3) != 2) + return 1; + + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-04.cs b/mcs/tests/test-static-using-04.cs new file mode 100644 index 0000000000..fe18b97deb --- /dev/null +++ b/mcs/tests/test-static-using-04.cs @@ -0,0 +1,42 @@ +// Compiler options: -langversion:6 + +using System; + +namespace A.B +{ + static class X + { + public static int Test (object o) + { + return 1; + } + } +} + +namespace A.C +{ + static class X + { + private static int Test (int o) + { + return 2; + } + } +} + +namespace C +{ + using A.B.X; + using A.C.X; + + class M + { + public static int Main () + { + if (Test (3) != 1) + return 1; + + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-05.cs b/mcs/tests/test-static-using-05.cs new file mode 100644 index 0000000000..0ddabc0c75 --- /dev/null +++ b/mcs/tests/test-static-using-05.cs @@ -0,0 +1,11 @@ +using System.Console; +using System.Linq.Enumerable; + +class Test +{ + static void Main() + { + var range = Range (5, 17); + WriteLine (range.Where (i => i % 2 == 0).Count ()); + } +} \ No newline at end of file diff --git a/mcs/tests/test-static-using-06.cs b/mcs/tests/test-static-using-06.cs new file mode 100644 index 0000000000..fe259c8216 --- /dev/null +++ b/mcs/tests/test-static-using-06.cs @@ -0,0 +1,44 @@ +// Compiler options: -langversion:6 + +using System; +using A.B.X; +using A.C.X; + +namespace A.B +{ + static class X + { + public static int Test (object o) + { + return 1; + } + } +} + +namespace A.C +{ + static class X + { + public static int Test (T o) + { + if (typeof (T) != typeof (object)) + return -1; + + return 2; + } + } +} + +namespace C +{ + class M + { + public static int Main () + { + if (Test ("") != 2) + return 1; + + return 0; + } + } +} \ No newline at end of file diff --git a/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id b/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id index 69ad8e7e74..0aaa45a695 100644 --- a/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id +++ b/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id @@ -1 +1 @@ -5ea5442888e9df7fe09b3e0314235e0d2b5b540d \ No newline at end of file +39ede7039d281d13439d8c657506fe625d60631c \ No newline at end of file diff --git a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs index 30b7779f58..430f2c2c88 100644 --- a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs +++ b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs @@ -290,12 +290,28 @@ namespace Mono.Linker.Steps { if (CheckProcessed (assembly)) return; + ProcessModule (assembly); + MarkCustomAttributes (assembly); foreach (ModuleDefinition module in assembly.Modules) MarkCustomAttributes (module); } + void ProcessModule (AssemblyDefinition assembly) + { + // Pre-mark if there is any methods as they need to be executed + // at assembly load time + foreach (TypeDefinition type in assembly.MainModule.Types) + { + if (type.Name == "" && type.HasMethods) + { + MarkType (type); + break; + } + } + } + protected void MarkField (FieldReference reference) { // if (IgnoreScope (reference.DeclaringType.Scope)) diff --git a/mcs/tools/linker/Mono.Linker/LinkContext.cs b/mcs/tools/linker/Mono.Linker/LinkContext.cs index 8d97f8dc15..c4d71083cd 100644 --- a/mcs/tools/linker/Mono.Linker/LinkContext.cs +++ b/mcs/tools/linker/Mono.Linker/LinkContext.cs @@ -217,6 +217,14 @@ namespace Mono.Linker { case "mscorlib": case "Accessibility": case "Mono.Security": + // WPF + case "PresentationFramework": + case "PresentationCore": + case "WindowsBase": + case "UIAutomationProvider": + case "UIAutomationTypes": + case "PresentationUI": + case "ReachFramework": return true; default: return name.Name.StartsWith ("System") diff --git a/mcs/tools/mono-shlib-cop/Makefile b/mcs/tools/mono-shlib-cop/Makefile index ec9d5a2a87..f63dafc218 100644 --- a/mcs/tools/mono-shlib-cop/Makefile +++ b/mcs/tools/mono-shlib-cop/Makefile @@ -20,7 +20,7 @@ cleanup: run-test-local: run-mono-shlib-cop-test run-mono-shlib-cop-test: $(the_lib) $(TEST_INPUT) - $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out + MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out $(TEST_INPUT) : test.cs $(CSCOMPILE) -target:library $< -out:$@ diff --git a/mcs/tools/mono-shlib-cop/test.cs b/mcs/tools/mono-shlib-cop/test.cs index d67d7b778c..bfd106b750 100644 --- a/mcs/tools/mono-shlib-cop/test.cs +++ b/mcs/tools/mono-shlib-cop/test.cs @@ -42,8 +42,8 @@ namespace Mono.Unmanaged.Check { private static extern int g_module_close (IntPtr handle); // Warning - [DllImport ("libglib-2.0.so")] - private static extern void g_free (IntPtr mem); + [DllImport ("libMonoPosixHelper.so")] + private static extern int Mono_Posix_Stdlib_TMP_MAX (); // Error: no such library [DllImport ("does-not-exist")] @@ -60,7 +60,7 @@ namespace Mono.Unmanaged.Check { Test () { g_module_close (IntPtr.Zero); - g_free (IntPtr.Zero); + Mono_Posix_Stdlib_TMP_MAX (); Foo (); RenameMe (); DoesNotExist (); diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile index 31d53299aa..5e8dd82bd0 100644 --- a/mcs/tools/xbuild/Makefile +++ b/mcs/tools/xbuild/Makefile @@ -47,6 +47,8 @@ install-frameworks: $(INSTALL_DATA) frameworks/net_4.0.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/RedistList/FrameworkList.xml $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList $(INSTALL_DATA) frameworks/net_4.0_client.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.0/Profile/Client/RedistList/FrameworkList.xml + $(MKINSTALLDIRS) $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList + $(INSTALL_DATA) frameworks/net_4.5.1.xml $(DESTDIR)$(NETFRAMEWORK_DIR)/v4.5.1/RedistList/FrameworkList.xml install-pcl-targets: $(MKINSTALLDIRS) $(DESTDIR)$(PORTABLE_TARGETS_DIR)/v4.0 @@ -91,6 +93,7 @@ EXTRA_DISTFILES = \ frameworks/net_4.0.xml \ frameworks/net_4.0_client.xml \ frameworks/net_4.5.xml \ + frameworks/net_4.5.1.xml \ targets/Microsoft.Portable.CSharp_4.0.targets \ targets/Microsoft.Portable.CSharp_4.5.targets \ targets/Microsoft.Portable.Common.targets \ diff --git a/mcs/tools/xbuild/SolutionParser.cs b/mcs/tools/xbuild/SolutionParser.cs index 92fd84e949..47ae1d9c04 100644 --- a/mcs/tools/xbuild/SolutionParser.cs +++ b/mcs/tools/xbuild/SolutionParser.cs @@ -262,6 +262,10 @@ namespace Mono.XBuild.CommandLine { if (info != null) projectInfo.Dependencies [info.Guid] = info; } + + // unload the project after reading info from it + // it'll be reloaded with proper context when building the solution + p.ParentEngine.UnloadProject (currentProject); } // fill in the project info for deps found in the .sln file diff --git a/mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets b/mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets index 0936512b57..11b40d66a9 100644 --- a/mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets +++ b/mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets @@ -31,11 +31,24 @@ directories for mscorlib.dll by constructing a filtered item set, and assume it only has one item. --> - + <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')"> false + + <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll + + + <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')"> + false + + + + <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')"> + false + + - + Condition="'$(TargetFrameworkVersion)' != 'v4.5.1' and '$(TargetFrameworkVersion)' != 'v4.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/> diff --git a/mcs/tools/xbuild/data/4.0/Microsoft.CSharp.targets b/mcs/tools/xbuild/data/4.0/Microsoft.CSharp.targets index 0936512b57..11b40d66a9 100644 --- a/mcs/tools/xbuild/data/4.0/Microsoft.CSharp.targets +++ b/mcs/tools/xbuild/data/4.0/Microsoft.CSharp.targets @@ -31,11 +31,24 @@ directories for mscorlib.dll by constructing a filtered item set, and assume it only has one item. --> - + <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')"> false + + <_ExplicitMSCorlibPath>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries ('$(TargetFrameworkIdentifier)', '$(TargetFrameworkVersion)', '$(TargetFrameworkProfile)'))\mscorlib.dll + + + <_ExplicitReference Include="@(_TargetFrameworkDirectories->'%(FullPath)\mscorlib.dll')" Condition="Exists('%(FullPath)\mscorlib.dll')"> + false + + + + <_ExplicitReference Include="$(_ExplicitMSCorlibPath)" Condition="Exists('$(_ExplicitMSCorlibPath)')"> + false + + + + diff --git a/mono-core.spec b/mono-core.spec index 9dc38c0a8f..015be96546 100644 --- a/mono-core.spec +++ b/mono-core.spec @@ -12,7 +12,7 @@ License: LGPL v2.1 only Group: Development/Languages/Mono Summary: A .NET Runtime Environment Url: http://www.mono-project.com -Version: 3.6.0 +Version: 3.8.0 Release: 0 Source0: mono-%{version}.tar.bz2 BuildRequires: bison @@ -62,7 +62,6 @@ Provides: mono(Mono.Cairo) = 1.0.5000.0 Provides: mono(Mono.CompilerServices.SymbolWriter) = 1.0.5000.0 Provides: mono(Mono.Posix) = 1.0.5000.0 Provides: mono(Mono.Security) = 1.0.5000.0 -Provides: mono(OpenSystem.C) = 1.0.5000.0 Provides: mono(System) = 1.0.5000.0 Provides: mono(System.Security) = 1.0.5000.0 Provides: mono(System.Xml) = 1.0.5000.0 @@ -210,7 +209,6 @@ rm -rf %buildroot %_prefix/lib/mono/2.0/Mono.Security.dll %_prefix/lib/mono/2.0/Mono.Simd.dll %_prefix/lib/mono/2.0/Mono.Tasklets.dll -%_prefix/lib/mono/2.0/OpenSystem.C.dll %_prefix/lib/mono/2.0/System.Configuration.dll %_prefix/lib/mono/2.0/System.Core.dll %_prefix/lib/mono/2.0/System.Drawing.dll @@ -241,7 +239,6 @@ rm -rf %buildroot %_prefix/lib/mono/4.0/Mono.Security.dll %_prefix/lib/mono/4.0/Mono.Simd.dll %_prefix/lib/mono/4.0/Mono.Tasklets.dll -%_prefix/lib/mono/4.0/OpenSystem.C.dll %_prefix/lib/mono/4.0/System.Configuration.dll %_prefix/lib/mono/4.0/System.Core.dll %_prefix/lib/mono/4.0/System.Drawing.dll @@ -289,7 +286,6 @@ rm -rf %buildroot %_prefix/lib/mono/4.5/Mono.Security.dll %_prefix/lib/mono/4.5/Mono.Simd.dll %_prefix/lib/mono/4.5/Mono.Tasklets.dll -%_prefix/lib/mono/4.5/OpenSystem.C.dll %_prefix/lib/mono/4.5/System.Configuration.dll %_prefix/lib/mono/4.5/System.Core.dll %_prefix/lib/mono/4.5/System.Drawing.dll @@ -332,7 +328,6 @@ rm -rf %buildroot %_prefix/lib/mono/gac/Mono.Security %_prefix/lib/mono/gac/Mono.Simd %_prefix/lib/mono/gac/Mono.Tasklets -%_prefix/lib/mono/gac/OpenSystem.C %_prefix/lib/mono/gac/System %_prefix/lib/mono/gac/System.Configuration %_prefix/lib/mono/gac/System.Core @@ -926,14 +921,12 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_bindir/wsdl2 %_bindir/xsd %_libdir/pkgconfig/aspnetwebstack.pc -%_libdir/pkgconfig/mono.web.pc %_mandir/man1/disco.1%ext_man %_mandir/man1/mconfig.1%ext_man %_mandir/man1/soapsuds.1%ext_man %_mandir/man1/wsdl.1%ext_man %_mandir/man1/xsd.1%ext_man %_prefix/lib/mono/2.0/Mono.Http.dll -%_prefix/lib/mono/2.0/Mono.Web.dll %_prefix/lib/mono/2.0/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/2.0/System.Runtime.Remoting.dll %_prefix/lib/mono/2.0/System.Runtime.Serialization.Formatters.Soap.dll @@ -945,7 +938,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/2.0/xsd.exe* %_prefix/lib/mono/4.0/Microsoft.Web.Infrastructure.dll %_prefix/lib/mono/4.0/Mono.Http.dll -%_prefix/lib/mono/4.0/Mono.Web.dll %_prefix/lib/mono/4.0/System.ComponentModel.Composition.dll %_prefix/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/4.0/System.Runtime.Remoting.dll @@ -956,7 +948,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/4.0/System.Web.Services.dll %_prefix/lib/mono/4.0/System.Web.dll %_prefix/lib/mono/4.5/Mono.Http.dll -%_prefix/lib/mono/4.5/Mono.Web.dll %_prefix/lib/mono/4.5/System.ComponentModel.Composition.dll %_prefix/lib/mono/4.5/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/4.5/System.Net.Http.Formatting.dll @@ -982,7 +973,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/4.5/Microsoft.Web.Infrastructure.dll %_prefix/lib/mono/gac/Microsoft.Web.Infrastructure %_prefix/lib/mono/gac/Mono.Http -%_prefix/lib/mono/gac/Mono.Web %_prefix/lib/mono/gac/System.ComponentModel.Composition %_prefix/lib/mono/gac/System.ComponentModel.DataAnnotations %_prefix/lib/mono/gac/System.Net.Http.Formatting diff --git a/mono-core.spec.in b/mono-core.spec.in index 88217bad1b..0b7337d05d 100644 --- a/mono-core.spec.in +++ b/mono-core.spec.in @@ -62,7 +62,6 @@ Provides: mono(Mono.Cairo) = 1.0.5000.0 Provides: mono(Mono.CompilerServices.SymbolWriter) = 1.0.5000.0 Provides: mono(Mono.Posix) = 1.0.5000.0 Provides: mono(Mono.Security) = 1.0.5000.0 -Provides: mono(OpenSystem.C) = 1.0.5000.0 Provides: mono(System) = 1.0.5000.0 Provides: mono(System.Security) = 1.0.5000.0 Provides: mono(System.Xml) = 1.0.5000.0 @@ -210,7 +209,6 @@ rm -rf %buildroot %_prefix/lib/mono/2.0/Mono.Security.dll %_prefix/lib/mono/2.0/Mono.Simd.dll %_prefix/lib/mono/2.0/Mono.Tasklets.dll -%_prefix/lib/mono/2.0/OpenSystem.C.dll %_prefix/lib/mono/2.0/System.Configuration.dll %_prefix/lib/mono/2.0/System.Core.dll %_prefix/lib/mono/2.0/System.Drawing.dll @@ -241,7 +239,6 @@ rm -rf %buildroot %_prefix/lib/mono/4.0/Mono.Security.dll %_prefix/lib/mono/4.0/Mono.Simd.dll %_prefix/lib/mono/4.0/Mono.Tasklets.dll -%_prefix/lib/mono/4.0/OpenSystem.C.dll %_prefix/lib/mono/4.0/System.Configuration.dll %_prefix/lib/mono/4.0/System.Core.dll %_prefix/lib/mono/4.0/System.Drawing.dll @@ -289,7 +286,6 @@ rm -rf %buildroot %_prefix/lib/mono/4.5/Mono.Security.dll %_prefix/lib/mono/4.5/Mono.Simd.dll %_prefix/lib/mono/4.5/Mono.Tasklets.dll -%_prefix/lib/mono/4.5/OpenSystem.C.dll %_prefix/lib/mono/4.5/System.Configuration.dll %_prefix/lib/mono/4.5/System.Core.dll %_prefix/lib/mono/4.5/System.Drawing.dll @@ -332,7 +328,6 @@ rm -rf %buildroot %_prefix/lib/mono/gac/Mono.Security %_prefix/lib/mono/gac/Mono.Simd %_prefix/lib/mono/gac/Mono.Tasklets -%_prefix/lib/mono/gac/OpenSystem.C %_prefix/lib/mono/gac/System %_prefix/lib/mono/gac/System.Configuration %_prefix/lib/mono/gac/System.Core @@ -926,14 +921,12 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_bindir/wsdl2 %_bindir/xsd %_libdir/pkgconfig/aspnetwebstack.pc -%_libdir/pkgconfig/mono.web.pc %_mandir/man1/disco.1%ext_man %_mandir/man1/mconfig.1%ext_man %_mandir/man1/soapsuds.1%ext_man %_mandir/man1/wsdl.1%ext_man %_mandir/man1/xsd.1%ext_man %_prefix/lib/mono/2.0/Mono.Http.dll -%_prefix/lib/mono/2.0/Mono.Web.dll %_prefix/lib/mono/2.0/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/2.0/System.Runtime.Remoting.dll %_prefix/lib/mono/2.0/System.Runtime.Serialization.Formatters.Soap.dll @@ -945,7 +938,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/2.0/xsd.exe* %_prefix/lib/mono/4.0/Microsoft.Web.Infrastructure.dll %_prefix/lib/mono/4.0/Mono.Http.dll -%_prefix/lib/mono/4.0/Mono.Web.dll %_prefix/lib/mono/4.0/System.ComponentModel.Composition.dll %_prefix/lib/mono/4.0/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/4.0/System.Runtime.Remoting.dll @@ -956,7 +948,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/4.0/System.Web.Services.dll %_prefix/lib/mono/4.0/System.Web.dll %_prefix/lib/mono/4.5/Mono.Http.dll -%_prefix/lib/mono/4.5/Mono.Web.dll %_prefix/lib/mono/4.5/System.ComponentModel.Composition.dll %_prefix/lib/mono/4.5/System.ComponentModel.DataAnnotations.dll %_prefix/lib/mono/4.5/System.Net.Http.Formatting.dll @@ -982,7 +973,6 @@ Mono implementation of ASP.NET, Remoting and Web Services. %_prefix/lib/mono/4.5/Microsoft.Web.Infrastructure.dll %_prefix/lib/mono/gac/Microsoft.Web.Infrastructure %_prefix/lib/mono/gac/Mono.Http -%_prefix/lib/mono/gac/Mono.Web %_prefix/lib/mono/gac/System.ComponentModel.Composition %_prefix/lib/mono/gac/System.ComponentModel.DataAnnotations %_prefix/lib/mono/gac/System.Net.Http.Formatting diff --git a/mono/Makefile.in b/mono/Makefile.in index 5874dd618a..70b0089cc9 100644 --- a/mono/Makefile.in +++ b/mono/Makefile.in @@ -220,6 +220,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -228,6 +229,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -294,6 +296,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -343,6 +346,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/Makefile.in b/mono/arch/Makefile.in index 31773eb14a..78530945c7 100644 --- a/mono/arch/Makefile.in +++ b/mono/arch/Makefile.in @@ -249,6 +249,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -257,6 +258,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -323,6 +325,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -372,6 +375,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/amd64/Makefile.in b/mono/arch/amd64/Makefile.in index f402101a2a..6f4b3eb966 100644 --- a/mono/arch/amd64/Makefile.in +++ b/mono/arch/amd64/Makefile.in @@ -206,6 +206,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -214,6 +215,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -280,6 +282,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -329,6 +332,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/arm/Makefile.in b/mono/arch/arm/Makefile.in index 9b0a7c6d90..1b793b1697 100644 --- a/mono/arch/arm/Makefile.in +++ b/mono/arch/arm/Makefile.in @@ -208,6 +208,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -216,6 +217,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -282,6 +284,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -331,6 +334,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/arm64/Makefile.in b/mono/arch/arm64/Makefile.in index b6e0f13c6b..6af32414d4 100644 --- a/mono/arch/arm64/Makefile.in +++ b/mono/arch/arm64/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/ia64/Makefile.in b/mono/arch/ia64/Makefile.in index 613f526f9e..c480efa4db 100644 --- a/mono/arch/ia64/Makefile.in +++ b/mono/arch/ia64/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/mips/Makefile.in b/mono/arch/mips/Makefile.in index 44736bc600..f03fc99e5f 100644 --- a/mono/arch/mips/Makefile.in +++ b/mono/arch/mips/Makefile.in @@ -212,6 +212,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -220,6 +221,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -286,6 +288,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -335,6 +338,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/ppc/Makefile.in b/mono/arch/ppc/Makefile.in index 02cdd80e3a..2953d2bf19 100644 --- a/mono/arch/ppc/Makefile.in +++ b/mono/arch/ppc/Makefile.in @@ -214,6 +214,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -222,6 +223,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -288,6 +290,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -337,6 +340,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/s390x/Makefile.in b/mono/arch/s390x/Makefile.in index a9337faafc..246af6dc3e 100644 --- a/mono/arch/s390x/Makefile.in +++ b/mono/arch/s390x/Makefile.in @@ -206,6 +206,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -214,6 +215,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -280,6 +282,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -329,6 +332,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/s390x/s390x-codegen.h b/mono/arch/s390x/s390x-codegen.h index 3677b2d95b..47e656422e 100644 --- a/mono/arch/s390x/s390x-codegen.h +++ b/mono/arch/s390x/s390x-codegen.h @@ -6,6 +6,7 @@ #define S390X_H #include #include +#include #define FLOAT_REGS 2 /* No. float registers for parms */ #define GENERAL_REGS 5 /* No. general registers for parms */ @@ -136,13 +137,16 @@ typedef enum { s390_fpc = 256, } S390SpecialRegister; -#define s390_is_imm16(val) ((glong)val >= (glong)-(1<<15) && \ - (glong)val <= (glong)((1<<15)-1)) -#define s390_is_uimm16(val) ((glong)val >= 0 && (glong)val <= 65535) +#define s390_is_imm16(val) ((glong)val >= (glong) SHRT_MIN && \ + (glong)val <= (glong) SHRT_MAX) +#define s390_is_imm32(val) ((glong)val >= (glong) INT_MIN && \ + (glong)val <= (glong) INT_MAX) +#define s390_is_uimm16(val) ((glong)val >= 0 && (glong)val <= (glong) USHRT_MAX) +#define s390_is_uimm32(val) ((glong)val >= 0 && (glong)val <= (glong) UINT_MAX) #define s390_is_uimm20(val) ((glong)val >= 0 && (glong)val <= 1048575) #define s390_is_imm20(val) ((glong)val >= -524288 && (glong)val <= 524287) -#define s390_is_imm12(val) ((glong)val >= (glong)-(1<<11) && \ - (glong)val <= (glong)((1<<11)-1)) +#define s390_is_imm12(val) ((glong)val >= (glong)-4096 && \ + (glong)val <= (glong)4095) #define s390_is_uimm12(val) ((glong)val >= 0 && (glong)val <= 4095) #define STK_BASE s390_r15 @@ -349,7 +353,36 @@ typedef struct { short i2; char xx; char op2; -} RIE_Format; +} RIE_Format_1; + +typedef struct { + char op1; + char r1 : 4; + char r3 : 4; + short i2; + char m2 : 4; + char xx : 4; + char op2; +} RIE_Format_2; + +typedef struct { + char op1; + char r1 : 4; + char r3 : 4; + short d; + char i; + char op2; +} RIE_Format_3; + +typedef struct { + char op1; + char r1 : 4; + char yy : 4; + short i2; + char m3 : 4; + char xx : 4; + char op2; +} RIE_Format_4; typedef struct { char op1; @@ -427,12 +460,22 @@ typedef struct { typedef struct { short op; - char b1 : 4; + short tb1 : 4; short d1 : 12; - char b2 : 4; + short b2 : 4; short d2 : 12; } __attribute__ ((packed)) SSE_Format; +typedef struct { + short op; + char r3 : 4; + char o2 : 4; + short b1 : 4; + short d1 : 12; + short b2 : 4; + short d2 : 12; +} __attribute__ ((packed)) SSF_Format; + #define s390_emit16(c, x) do \ { \ *((guint16 *) c) = (guint16) x; \ @@ -509,12 +552,33 @@ typedef struct { #define S390_RI(c,opc,g1,m2) s390_emit32(c, ((opc >> 4) << 24 | (g1) << 20 | (opc & 0x0f) << 16 | (m2 & 0xffff))) -#define S390_RIE(c,opc,g1,g3,m2) do \ +#define S390_RIE_1(c,opc,g1,g3,m2) do \ { \ s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | g3)); \ s390_emit32(c, ((m2) << 16 | (opc & 0xff))); \ } while (0) +#define S390_RIE_2(c,opc,g1,g2,m3,v) do \ +{ \ + s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | g3)); \ + s390_emit16(c, (v)); \ + s390_emit16(c, ((m2) << 12 | (opc & 0xff))); \ +} while (0) + +#define S390_RIE_3(c,opc,g1,i,m3,d) do \ +{ \ + s390_emit16(c, ((opc & 0xff00) | (g1) << 4 | m3)); \ + s390_emit16(c, (d)); \ + s390_emit16(c, ((i) << 8 | (opc & 0xff))); \ +} while (0) + +#define S390_RIE_4(c,opc,g1,i2,m3) do \ +{ \ + s390_emit16(c, ((opc & 0xff00) | (g1) << 4); \ + s390_emit16(c, (i2)); \ + s390_emit16(c, ((m3) << 12 | (opc & 0xff))); \ +} while (0) + #define S390_RIL_1(c,opc,g1,m2) do \ { \ s390_emit16(c, ((opc >> 4) << 8 | (g1) << 4 | (opc & 0xf))); \ @@ -527,6 +591,20 @@ typedef struct { s390_emit32(c, m2); \ } while (0) +#define S390_RIS(c,opc,r,i,m3,b,d) do \ +{ \ + s390_emit16(c, ((opc, & 0xff00) | (r1) << 4) | (r2)); \ + s390_emit16(c, ((b) << 12) | (d)); \ + s390_emit16(c, ((i) << 4) | ((opc) & 0xff)); \ +} + +#define S390_RRS(c,opc,r1,r2,m3,b,d) do \ +{ \ + s390_emit16(c, ((opc, & 0xff00) | (r1) << 4) | (r2)); \ + s390_emit16(c, ((b) << 12) | (d)); \ + s390_emit16(c, ((m3) << 12) | ((opc) & 0xff)); \ +} + #define S390_SI(c,opc,s1,p1,m2) s390_emit32(c, (opc << 24 | (m2) << 16 | (s1) << 12 | ((p1) & 0xfff))); #define S390_SIY(c,opc,s1,p1,m2) do \ @@ -573,23 +651,60 @@ typedef struct { s390_emit16(c, ((s2) << 12 | ((p2) & 0xfff))); \ } while (0) +#define S390_SSF(c,opc,r3,s1,p1,s2,p2) do \ +{ \ + s390_emit16(c, (((opc) & 0xff00) << 8) | ((r3) << 4) | \ + ((opc) & 0xf)); \ + s390_emit16(c, ((s1) << 12 | ((p1) & 0xfff))); \ + s390_emit16(c, ((s2) << 12 | ((p2) & 0xfff))); \ +} while (0) + #define s390_a(c, r, x, b, d) S390_RX(c, 0x5a, r, x, b, d) #define s390_adb(c, r, x, b, d) S390_RXE(c, 0xed1a, r, x, b, d) #define s390_adbr(c, r1, r2) S390_RRE(c, 0xb31a, r1, r2) #define s390_aebr(c, r1, r2) S390_RRE(c, 0xb30a, r1, r2) +#define s390_afi(c, r, v) S390_RIL_1(c, 0xc29, r, v); #define s390_ag(c, r, x, b, d) S390_RXY(c, 0xe308, r, x, b, d) #define s390_agf(c, r, x, b, d) S390_RXY(c, 0xe318, r, x, b, d) +#define s390_agfi(c, r, v) S390_RIL_1(c, 0xc28, r, v) +#define s390_afgr(c, r1, r2) S390_RRE(c, 0xb918, r1, r2) #define s390_aghi(c, r, v) S390_RI(c, 0xa7b, r, v) +#define s390_aghik(c, r, v) S390_RIE_1(c, 0xecd9, r, v) #define s390_agr(c, r1, r2) S390_RRE(c, 0xb908, r1, r2) +#define s390_agrk(c, r1, r2, r3) S390_RRF_1(c, 0xb9e8, r1, r2, r3) +#define s390_agsi(c, r, v) S390_SIY(c, 0xeb7a, r v) +#define s390_ahhhr(c, r1, r2, r3) S390_RRF_1(c, 0xb9c8, r1, r2, r3) +#define s390_ahhlr(c, r1, r2, r3) S390_RRF_1(c, 0xb9d8, r1, r2, r3) #define s390_ahi(c, r, v) S390_RI(c, 0xa7a, r, v) +#define s390_ahik(c, r, v) S390_RIE_1(c, 0xecd8, r, v) +#define s390_ahy(c, r, x, b, d) S390_RXY(c, 0xe37a, r, b, d) +#define s390_aih(c, r, v) S390_RIL_1(c, 0xcc8, r, v) +#define s390_al(c, r, x, b, d) S390_RX(c, 0x5e, r, x, b, d) +#define s390_alc(c, r, x, b, d) S390_RXY(c, 0xe398, r, x, b, d) +#define s390_alcg(c, r, x, b, d) S390_RXY(c, 0xe388, r, x, b, d) #define s390_alcgr(c, r1, r2) S390_RRE(c, 0xb988, r1, r2) #define s390_alcr(c, r1, r2) S390_RRE(c, 0xb998, r1, r2) -#define s390_al(c, r, x, b, d) S390_RX(c, 0x5e, r, x, b, d) +#define s390_alfi(c, r, v) S390_RIL_1(c, 0xc2b, r, v) #define s390_alg(c, r, x, b, d) S390_RXY(c, 0xe30a, r, x, b, d) #define s390_algf(c, r, x, b, d) S390_RXY(c, 0xe31a, r, x, b, d) +#define s390_algfi(c, r, v) S390_RIL_1(c, 0xc2a, r, v) +#define s390_algfr(c, r1, r2) S390_RRE(c, 0xb91a, r1, r2) +#define s390_alghsik(c, r, v) S390_RIE_1(c, 0xecd8, r, v) #define s390_algr(c, r1, r2) S390_RRE(c, 0xb90a, r1, r2) +#define s390_algsi(c, r, v) S390_SIY(c, 0xeb7e, r, v) +#define s390_alhhhr(c, r1, r2, r3) S390_RRF_1(c, 0xb9ca, r1, r2, r3) +#define s390_alhhlr(c, r1, r2, r3) S390_RRF_1(c, 0xb9da, r1, r2, r3) +#define s390_alhsik(c, r, v) S390_RIE_1(c, 0xecda, r, v) #define s390_alr(c, r1, r2) S390_RR(c, 0x1e, r1, r2) +#define s390_alrk(c, r1, r2) S390_RRF(c, 0xb9fa, r1, r2) +#define s390_alsi(c, r, v) S390_SIY(c, 0xeb6e, r, v) +#define s390_alsih(c, r, v) S390_RIL_1(c, 0xcca, r, v) +#define s390_alsihn(c, r, v) S390_RIL_1(c, 0xccb, r, v) +#define s390_aly(c, r, x, b, d) S390_RXY(c, 0xe35e, r, x, b, d) #define s390_ar(c, r1, r2) S390_RR(c, 0x1a, r1, r2) +#define s390_ark(c, r1, r2, r3) S390_RRF_1(c, 0xb9f8, r1, r2, r3) +#define s390_asi(c, r, v) S390_SIY(c, 0xeb6a, r, v) +#define s390_ay(c, r, x, b, d) S390_RXY(c, 0xe35a, r, x, b, d) #define s390_basr(c, r1, r2) S390_RR(c, 0x0d, r1, r2) #define s390_bctr(c, r1, r2) S390_RR(c, 0x06, r1, r2) #define s390_bctrg(c, r1, r2) S390_RRE(c, 0xb946, r1, r2) @@ -610,19 +725,46 @@ typedef struct { #define s390_cdsg(c, r1, r2, b, d) S390_RSY_1(c, 0xeb3e, r1, r2, b, d) #define s390_cdsy(c, r1, r2, b, d) S390_RSY_1(c, 0xeb31, r1, r2, b, d) #define s390_cebr(c, r1, r2) S390_RRE(c, 0xb309, r1, r2) +#define s390_cegbr(c, r1, r2) S390_RRE(c, 0xb3a4, r1, r2) #define s390_cfdbr(c, r1, m, r2) S390_RRF_2(c, 0xb399, r1, m, r2) +#define s390_cfi(c, r, v) S390_RIL_1(c, 0xc2d, r, v) #define s390_cgdbr(c, r1, m, r2) S390_RRF_2(c, 0xb3a9, r1, m, r2) #define s390_cg(c, r, x, b, d) S390_RXY(c, 0xe320, r, x, b, d) +#define s390_cgfi(c, r, v) S390_RIL_1(c, 0xc2c, r, v) +#define s390_cgfrl(c, r, v) S390_RIL_1(c, 0xc6c, r, v) #define s390_cghi(c, r, i) S390_RI(c, 0xa7f, r, i) +#define s390_cgib(c, r, i, m, b, d) S390_RIS(c, 0xecfc, r, i, m, b, d) +#define s390_cgij(c, r, i, m, d) S390_RIE_3(c, 0xec7c, r, i, m, d) +#define s390_cgit(c, r, i, m) S390_RIE_4(c, 0xec70, r, i m); #define s390_cgr(c, r1, r2) S390_RRE(c, 0xb920, r1, r2) +#define s390_cgrb(c, r1, r2, m3, b, d) S390_RRS(c, 0xece4, r1, r2, m3, b, d) +#define s390_cgrj(c, r1, r2, m3, v) S390_RIE_2(c, 0xec64, r1, r2, m3, v) +#define s390_cgrl(c, r, v) S390_RIL_1(c, 0xc68, r, v) #define s390_chi(c, r, i) S390_RI(c, 0xa7e, r, i) +#define s390_cib(c, r, i, m, b, d) S390_RIS(c, 0xecfe, r, i, m, b, d) +#define s390_cij(c, r, i, m, d) S390_RIE_3(c, 0xec7e, r, i, m, d) +#define s390_cit(c, r, i, m) S390_RIE_4(c, 0xec72, r, i m); #define s390_cl(c, r, x, b, d) S390_RX(c, 0x55, r, x, b, d) #define s390_clg(c, r, x, b, d) S390_RXY(c, 0xe321, r, x, b, d) +#define s390_clgib(c, r, i, m, b, d) S390_RIS(c, 0xecfd, r, i, m, b, d) +#define s390_clgij(c, r, i, b) S390_RIE_3(c, 0xec7d, r, i, m, d) #define s390_clgr(c, r1, r2) S390_RRE(c, 0xb921, r1, r2) +#define s390_clgrj(c, r1, r2, m, v) S390_RIE_2(c, 0xec65, r1, r2, m, v) +#define s390_clgrb(c, r1, r2, m3, b, d) S390_RRS(c, 0xece5, r1, r2, m3, b, d) +#define s390_clib(c, r, i, m, b, d) S390_RIS(c, 0xecff, r, i, m, b, d) +#define s390_clij(c, r, i, b) S390_RIE_3(c, 0xec7f, r, i, m, d) #define s390_clr(c, r1, r2) S390_RR(c, 0x15, r1, r2) +#define s390_clrb(c, r1, r2, m3, b, d) S390_RRS(c, 0xecf7, r1, r2, m3, b, d) +#define s390_clrj(c, r1, r2, m, v) S390_RIE_2(c, 0xec77, r1, r2, m, v) #define s390_cr(c, r1, r2) S390_RR(c, 0x19, r1, r2) +#define s390_crb(c, r1, r2, m3, b, d) S390_RRS(c, 0xecf6, r1, r2, m3, b, d) +#define s390_crj(c, r1, r2, m3, v) S390_RIE_2(c, 0xec76, r1, r2, m3, v) +#define s390_crl(c, r, v) S390_RIL_1(c, 0xc6d, r, v) +#define s390_crt(c, r1, r2, m3) S390_RRF_2(c, 0xb972, r1, r2, m3); +#define s390_cgrt(c, r1, r2, m3) S390_RRF_2(c, 0xb960, r1, r2, m3); #define s390_cs(c, r1, r2, b, d) S390_RX(c, 0xba, r1, r2, b, d) #define s390_csg(c, r1, r2, b, d) S390_RSY_1(c, 0xeb30, r1, r2, b, d) +#define s390_csst(c, d1, b1, d2, b2, r) S390_SSF(c, 0xc82, b1, d1, b2, d2, r) #define s390_csy(c, r1, r2, b, d) S390_RSY_1(c, 0xeb14, r1, r2, b, d) #define s390_ddbr(c, r1, r2) S390_RRE(c, 0xb31d, r1, r2) #define s390_debr(c, r1, r2) S390_RRE(c, 0xb30d, r1, r2) @@ -637,6 +779,12 @@ typedef struct { #define s390_icm(c, r, m, b, d) S390_RX(c, 0xbf, r, m, b, d) #define s390_icmy(c, r, x, b, d) S390_RXY(c, 0xeb81, r, x, b, d) #define s390_icy(c, r, x, b, d) S390_RXY(c, 0xe373, r, x, b, d) +#define s390_iihf(c, r, v) S390_RIL_1(c, 0xc08, r, v) +#define s390_iihh(c, r, v) S390_RI(c, 0xa50, r, v) +#define s390_iihl(c, r, v) S390_RI(c, 0xa51, r, v) +#define s390_iilf(c, r, v) S390_RIL_1(c, 0xc09, r, v) +#define s390_iilh(c, r, v) S390_RI(c, 0xa52, r, v) +#define s390_iill(c, r, v) S390_RI(c, 0xa53, r, v) #define s390_j(c,d) s390_brc(c, S390_CC_UN, d) #define s390_jc(c, m, d) s390_brc(c, m, d) #define s390_jcl(c, m, d) s390_brcl(c, m, d) @@ -690,23 +838,28 @@ typedef struct { #define s390_ldy(c, r, x, b, d) S390_RXY(c, 0xed65, r, x, b, d) #define s390_ldeb(c, r, x, b, d) S390_RXE(c, 0xed04, r, x, b, d) #define s390_ldebr(c, r1, r2) S390_RRE(c, 0xb304, r1, r2) +#define s390_ldgr(c, r1, r2) S390_RRE(c, 0xb3c1, r1, r2) #define s390_ldr(c, r1, r2) S390_RR(c, 0x28, r1, r2) #define s390_le(c, f, x, b, d) S390_RX(c, 0x78, f, x, b, d) #define s390_ledbr(c, r1, r2) S390_RRE(c, 0xb344, r1, r2) #define s390_ler(c, r1, r2) S390_RR(c, 0x38, r1, r2) #define s390_ley(c, r, x, b, d) S390_RXY(c, 0xed64, r, x, b, d) +#define s390_lg(c, r, x, b, d) S390_RXY(c, 0xe304, r, x, b, d) #define s390_lgb(c, r, x, b, d) S390_RXY(c, 0xe377, r, x, b, d) #define s390_lgbr(c, r1, r2) S390_RRE(c, 0xb906, r1, r2) -#define s390_lg(c, r, x, b, d) S390_RXY(c, 0xe304, r, x, b, d) +#define s390_lgdr(c, r1, r2) S390_RRE(c, 0xb3cd, r1, r2) #define s390_lgf(c, r, x, b, d) S390_RXY(c, 0xe314, r, x, b, d) +#define s390_lgfi(c, r, v) S390_RIL_1(c, 0xc01, r, v) +#define s390_lgfrl(c, r1, d) S390_RIL_1(c, 0xc4c, r1, d) #define s390_lgfr(c, r1, r2) S390_RRE(c, 0xb914, r1, r2) #define s390_lgh(c, r, x, b, d) S390_RXY(c, 0xe315, r, x, b, d) #define s390_lghi(c, r, v) S390_RI(c, 0xa79, r, v) +#define s390_lghr(c, r1, r2) S390_RRE(c, 0xb907, r1, r2) #define s390_lgr(c, r1, r2) S390_RRE(c, 0xb904, r1, r2) +#define s390_lgrl(c, r1, d) S390_RIL_1(c, 0xc48, r1, d) #define s390_lh(c, r, x, b, d) S390_RX(c, 0x48, r, x, b, d) #define s390_lhr(c, r1, r2) S390_RRE(c, 0xb927, r1, r2) #define s390_lhg(c, r, x, b, d) S390_RXY(c, 0xe315, r, x, b, d) -#define s390_lghr(c, r1, r2) S390_RRE(c, 0xb907, r1, r2) #define s390_lhi(c, r, v) S390_RI(c, 0xa78, r, v) #define s390_lhy(c, r, x, b, d) S390_RXY(c, 0xe378, r, x, b, d) #define s390_llcr(c, r1, r2) S390_RRE(c, 0xb994, r1, r2) @@ -717,6 +870,12 @@ typedef struct { #define s390_llgh(c, r, x, b, d) S390_RXY(c, 0xe391, r, x, b, d) #define s390_llghr(c, r1, r2) S390_RRE(c, 0xb985, r1, r2) #define s390_llhr(c, r1, r2) S390_RRE(c, 0xb995, r1, r2) +#define s390_llihf(c, r, v) S390_RIL_1(c, 0xc0e, r, v) +#define s390_llihh(c, r, v) S390_RI(c, 0xa5c, r, v) +#define s390_llihl(c, r, v) S390_RI(c, 0xa5d, r, v) +#define s390_llilf(c, r, v) S390_RIL_1(c, 0xc0f, r, v) +#define s390_llilh(c, r, v) S390_RI(c, 0xa5e, r, v) +#define s390_llill(c, r, v) S390_RI(c, 0xa5f, r, v) #define s390_lm(c, r1, r2, b, d) S390_RS_1(c, 0x98, r1, r2, b, d) #define s390_lmg(c, r1, r2, b, d) S390_RSY_1(c, 0xeb04, r1, r2, b, d) #define s390_lndbr(c, r1, r2) S390_RRE(c, 0xb311, r1, r2) @@ -726,6 +885,7 @@ typedef struct { #define s390_lpgr(c, r1, r2) S390_RRE(c, 0xb900, r1, r2) #define s390_lpr(c, r1, r2) S390_RR(c, 0x10, r1, r2) #define s390_lr(c, r1, r2) S390_RR(c, 0x18, r1, r2) +#define s390_lrl(c, r1, d) S390_RIL_1(c, 0xc4d, r1, d) #define s390_ltgfr(c, r1, r2) S390_RRE(c, 0xb912, r1, r2) #define s390_ltgr(c, r1, r2) S390_RRE(c, 0xb902, r1, r2) #define s390_ltr(c, r1, r2) S390_RR(c, 0x12, r1, r2) @@ -734,24 +894,44 @@ typedef struct { #define s390_m(c, r, x, b, d) S390_RX(c, 0x5c, r, x, b, d) #define s390_mdbr(c, r1, r2) S390_RRE(c, 0xb31c, r1, r2) #define s390_meebr(c, r1, r2) S390_RRE(c, 0xb317, r1, r2) +#define s390_mfy(c, r, x, b, d) S390_RXY(c, 0xe35c, r, x, b, d) #define s390_mlgr(c, r1, r2) S390_RRE(c, 0xb986, r1, r2) #define s390_mlr(c, r1, r2) S390_RRE(c, 0xb996, r1, r2) #define s390_mr(c, r1, r2) S390_RR(c, 0x1c, r1, r2) #define s390_ms(c, r, x, b, d) S390_RX(c, 0x71, r, x, b, d) +#define s390_msi(c, r, v) S390_RIL_1(c, 0xc21, r, v) #define s390_msgfr(c, r1, r2) S390_RRE(c, 0xb91c, r1, r2) +#define s390_msgi(c, r, v) S390_RIL_1(c, 0xc20, r, v) #define s390_msgr(c, r1, r2) S390_RRE(c, 0xb90c, r1, r2) #define s390_msr(c, r1, r2) S390_RRE(c, 0xb252, r1, r2) #define s390_mvc(c, l, b1, d1, b2, d2) S390_SS_1(c, 0xd2, l, b1, d1, b2, d2) #define s390_mvcl(c, r1, r2) S390_RR(c, 0x0e, r1, r2) #define s390_mvcle(c, r1, r3, d2, b2) S390_RS_1(c, 0xa8, r1, r3, d2, b2) #define s390_n(c, r, x, b, d) S390_RX(c, 0x54, r, x, b, d) +#define s390_nc(c, l, b1, d1, b2, d2) S390_SS_1(c, 0xd4, l, b1, d1, b2, d2) #define s390_ng(c, r, x, b, d) S390_RXY(c, 0xe380, r, x, b, d) #define s390_ngr(c, r1, r2) S390_RRE(c, 0xb980, r1, r2) +#define s390_ngrk(c, r1, r2, r3) S390_RRF_1(c, 0xb9e4, r1, r2, r3) +#define s390_ni(c, b, d, v) S390_SI(c, 0x94, b, d, v) +#define s390_nihf(c, r, v) S390_RIL_1(c, 0xc0a, r, v) +#define s390_nihh(c, r, v) S390_RI(c, 0xa54, r, v) +#define s390_nihl(c, r, v) S390_RI(c, 0xa55, r, v) +#define s390_nilf(c, r, v) S390_RIL_1(c, 0xc0b, r, v) #define s390_nilh(c, r, v) S390_RI(c, 0xa56, r, v) #define s390_nill(c, r, v) S390_RI(c, 0xa57, r, v) +#define s390_niy(c, b, d, v) S390_SIY(c, 0xeb54, b, d, v) #define s390_nop(c) S390_RR(c, 0x07, 0x0, 0) #define s390_nr(c, r1, r2) S390_RR(c, 0x14, r1, r2) +#define s390_nrk(c, r1, r2) S390_RRF_1(c, 0xb9f4, r1, r2) +#define s390_ny(c, r, x, b, d) S390_RRY(c, 0xe354, r1, r2) #define s390_o(c, r, x, b, d) S390_RX(c, 0x56, r, x, b, d) +#define s390_oihf(c, r, v) S390_RIL_1(c, 0xc0c, r, v) +#define s390_oihh(c, r, v) S390_RI(c, 0xa58, r, v) +#define s390_oihl(c, r, v) S390_RI(c, 0xa59, r, v) +#define s390_oilf(c, r, v) S390_RIL_1(c, 0xc0d, r, v) +#define s390_oilh(c, r, v) S390_RI(c, 0xa5a, r, v) +#define s390_oill(c, r, v) S390_RI(c, 0xa5b` r, v) +#define s390_oiy(c, b, d, v) S390_SIY(c, 0xeb56 b, d, v) #define s390_og(c, r, x, b, d) S390_RXY(c, 0xe381, r, x, b, d) #define s390_ogr(c, r1, r2) S390_RRE(c, 0xb981, r1, r2) #define s390_or(c, r1, r2) S390_RR(c, 0x16, r1, r2) @@ -762,16 +942,19 @@ typedef struct { #define s390_sg(c, r, x, b, d) S390_RXY(c, 0xe309, r, x, b, d) #define s390_sgf(c, r, x, b, d) S390_RXY(c, 0xe319, r, x, b, d) #define s390_sgr(c, r1, r2) S390_RRE(c, 0xb909, r1, r2) +#define s390_sl(c, r, x, b, d) S390_RX(c, 0x5f, r, x, b, d) #define s390_sla(c, r, b, d) S390_RS_3(c, 0x8b, r, b, d) #define s390_slag(c, r1, r2, b, d) S390_RSY_1(c, 0xeb0b, r1, r2, b, d) #define s390_slbg(c, r, x, b, d) S390_RXY(c, 0xe389, r, x, b, d) #define s390_slbgr(c, r1, r2) S390_RRE(c, 0xb989, r1, r2) #define s390_slbr(c, r1, r2) S390_RRE(c, 0xb999, r1, r2) -#define s390_sl(c, r, x, b, d) S390_RX(c, 0x5f, r, x, b, d) #define s390_slda(c, r, b, d) S390_RS_3(c, 0x8f, r, b, d) #define s390_sldl(c, r, b, d) S390_RS_3(c, 0x8d, r, b, d) +#define s390_slfi(c, r, v) S390_RIL_1(c, 0xc25, r, v) #define s390_slg(c, r, x, b, d) S390_RXY(c, 0xe30b, r, x, b, d) #define s390_slgf(c, r, x, b, d) S390_RXY(c, 0xe31b, r, x, b, d) +#define s390_slgfr(c, r1, r2) S390_RRE(c, 0xb91b, r1, r2) +#define s390_slgfi(c, r, v) S390_RIL_1(c, 0xc24, r, v) #define s390_slgr(c, r1, r2) S390_RRE(c, 0xb90b, r1, r2) #define s390_sll(c, r, b, d) S390_RS_3(c, 0x89, r, b, d) #define s390_sllg(c, r1, r2, b, d) S390_RSY_1(c, 0xeb0d, r1, r2, b, d) @@ -805,7 +988,10 @@ typedef struct { #define s390_tcdb(c, r, x, b, d) S390_RXE(c, 0xed11, r, x, b, d) #define s390_tceb(c, r, x, b, d) S390_RXE(c, 0xed10, r, x, b, d) #define s390_x(c, r, x, b, d) S390_RX(c, 0x57, r, x, b, d) +#define s390_xihf(c, r, v) S390_RIL_1(c, 0xc06, r, v) +#define s390_xilf(c, r, v) S390_RIL_1(c, 0xc07, r, v) #define s390_xg(c, r, x, b, d) S390_RXY(c, 0xe382, r, x, b, d) #define s390_xgr(c, r1, r2) S390_RRE(c, 0xb982, r1, r2) #define s390_xr(c, r1, r2) S390_RR(c, 0x17, r1, r2) +#define s390_xy(c, r, x, b, d) S390_RXY(c, 0xe357, r, x, b, d) #endif diff --git a/mono/arch/sparc/Makefile.in b/mono/arch/sparc/Makefile.in index 656a8d5e83..b6ca976c1e 100644 --- a/mono/arch/sparc/Makefile.in +++ b/mono/arch/sparc/Makefile.in @@ -206,6 +206,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -214,6 +215,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -280,6 +282,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -329,6 +332,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/arch/x86/Makefile.in b/mono/arch/x86/Makefile.in index 58e259c84b..b03142a4ae 100644 --- a/mono/arch/x86/Makefile.in +++ b/mono/arch/x86/Makefile.in @@ -208,6 +208,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -216,6 +217,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -282,6 +284,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -331,6 +334,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/benchmark/Makefile.in b/mono/benchmark/Makefile.in index 9b58e8bfca..6311f95a4b 100644 --- a/mono/benchmark/Makefile.in +++ b/mono/benchmark/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/cil/Makefile.in b/mono/cil/Makefile.in index 914288e4f9..35c4e274e1 100644 --- a/mono/cil/Makefile.in +++ b/mono/cil/Makefile.in @@ -191,6 +191,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -199,6 +200,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -265,6 +267,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -314,6 +317,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/dis/Makefile.in b/mono/dis/Makefile.in index 79e62b83e7..eefbb9a31e 100644 --- a/mono/dis/Makefile.in +++ b/mono/dis/Makefile.in @@ -269,6 +269,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -277,6 +278,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -343,6 +345,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -392,6 +395,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/dis/util.c b/mono/dis/util.c index 116824da9e..70f3f6e4ce 100755 --- a/mono/dis/util.c +++ b/mono/dis/util.c @@ -12,6 +12,7 @@ #include #include #include "util.h" +#include "mono/utils/mono-compiler.h" #ifdef HAVE_IEEEFP_H #include diff --git a/mono/interpreter/Makefile.in b/mono/interpreter/Makefile.in index 03375346be..1d5db63467 100644 --- a/mono/interpreter/Makefile.in +++ b/mono/interpreter/Makefile.in @@ -254,6 +254,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -262,6 +263,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -328,6 +330,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -377,6 +380,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/io-layer/Makefile.in b/mono/io-layer/Makefile.in index 787c7d2ba1..ed9fc70dfd 100644 --- a/mono/io-layer/Makefile.in +++ b/mono/io-layer/Makefile.in @@ -231,6 +231,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -239,6 +240,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -305,6 +307,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -354,6 +357,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/io-layer/io.c.REMOVED.git-id b/mono/io-layer/io.c.REMOVED.git-id index 024c048f80..7a5a495a12 100644 --- a/mono/io-layer/io.c.REMOVED.git-id +++ b/mono/io-layer/io.c.REMOVED.git-id @@ -1 +1 @@ -9e2fb959697245a7cab2e78ef642f118e752bc8e \ No newline at end of file +d87bee7ec41981d2aa55d0cb2b5e9c3552032f2c \ No newline at end of file diff --git a/mono/io-layer/misc-private.h b/mono/io-layer/misc-private.h index 00b209c4eb..60e8cd827b 100644 --- a/mono/io-layer/misc-private.h +++ b/mono/io-layer/misc-private.h @@ -12,6 +12,7 @@ #include #include +#include extern void _wapi_calc_timeout(struct timespec *timeout, guint32 ms); diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c index afbe440448..c65bf23813 100644 --- a/mono/io-layer/processes.c +++ b/mono/io-layer/processes.c @@ -24,7 +24,9 @@ #include #include #include +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #ifdef HAVE_SYS_MKDEV_H diff --git a/mono/io-layer/security.c b/mono/io-layer/security.c index 1d702d3188..d1bf3d0362 100644 --- a/mono/io-layer/security.c +++ b/mono/io-layer/security.c @@ -19,19 +19,6 @@ #include #include - -/* Disclaimers */ - -#if defined(__GNUC__) -#ifndef HAVE_GETRESUID - #warning getresuid not supported. WindowsImpersonationContext wont work -#endif -#ifndef HAVE_SETRESUID - #warning setresuid not supported. WindowsImpersonationContext wont work -#endif -#endif - - gboolean ImpersonateLoggedOnUser (gpointer handle) { diff --git a/mono/io-layer/wapi_glob.c b/mono/io-layer/wapi_glob.c index bd5006db60..7889ad8ff3 100644 --- a/mono/io-layer/wapi_glob.c +++ b/mono/io-layer/wapi_glob.c @@ -66,7 +66,7 @@ #define M_MASK 0xffff #define M_ASCII 0x00ff -typedef u_short Char; +typedef unsigned short Char; #else @@ -87,7 +87,7 @@ typedef char Char; #define ismeta(c) (((c)&M_QUOTE) != 0) -static int g_Ctoc(const gchar *, char *, u_int); +static int g_Ctoc(const gchar *, char *, unsigned int); static int glob0(GDir *dir, const gchar *, wapi_glob_t *, gboolean, gboolean); static int glob1(GDir *dir, gchar *, gchar *, wapi_glob_t *, size_t *, @@ -103,11 +103,11 @@ static void qprintf(const char *, Char *); int _wapi_glob(GDir *dir, const char *pattern, int flags, wapi_glob_t *pglob) { - const u_char *patnext; + const unsigned char *patnext; int c; gchar *bufnext, *bufend, patbuf[PATH_MAX]; - patnext = (u_char *) pattern; + patnext = (unsigned char *) pattern; if (!(flags & WAPI_GLOB_APPEND)) { pglob->gl_pathc = 0; pglob->gl_pathv = NULL; @@ -262,7 +262,7 @@ globextend(const gchar *path, wapi_glob_t *pglob, size_t *limitp) { char **pathv; int i; - u_int newsize, len; + unsigned int newsize, len; char *copy; const gchar *p; @@ -368,7 +368,7 @@ _wapi_globfree(wapi_glob_t *pglob) } static int -g_Ctoc(const gchar *str, char *buf, u_int len) +g_Ctoc(const gchar *str, char *buf, unsigned int len) { while (len--) { diff --git a/mono/metadata/Makefile.am b/mono/metadata/Makefile.am index d3c19c25ba..731c05c976 100644 --- a/mono/metadata/Makefile.am +++ b/mono/metadata/Makefile.am @@ -86,6 +86,9 @@ libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD) null_sources = \ console-null.c +null_gc_sources = \ + null-gc.c + common_sources = \ $(platform_sources) \ assembly.c \ @@ -159,7 +162,6 @@ common_sources = \ monitor.h \ nacl-stub.c \ normalization-tables.h \ - null-gc.c \ number-formatter.h \ object-internals.h \ opcodes.c \ @@ -194,7 +196,10 @@ common_sources = \ reflection-internals.h \ file-mmap-posix.c \ file-mmap-windows.c \ - file-mmap.h + file-mmap.h \ + object-offsets.h \ + abi-details.h \ + metadata-cross-helpers.c # These source files have compile time dependencies on GC code @@ -266,7 +271,7 @@ sgen_sources = \ sgen-qsort.c \ sgen-qsort.h -libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(boehm_sources) +libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources) libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES) libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources) diff --git a/mono/metadata/Makefile.am.in b/mono/metadata/Makefile.am.in index d3c19c25ba..731c05c976 100644 --- a/mono/metadata/Makefile.am.in +++ b/mono/metadata/Makefile.am.in @@ -86,6 +86,9 @@ libmonoruntime_static_la_LIBADD = $(bundle_obj) $(libmonoruntime_la_LIBADD) null_sources = \ console-null.c +null_gc_sources = \ + null-gc.c + common_sources = \ $(platform_sources) \ assembly.c \ @@ -159,7 +162,6 @@ common_sources = \ monitor.h \ nacl-stub.c \ normalization-tables.h \ - null-gc.c \ number-formatter.h \ object-internals.h \ opcodes.c \ @@ -194,7 +196,10 @@ common_sources = \ reflection-internals.h \ file-mmap-posix.c \ file-mmap-windows.c \ - file-mmap.h + file-mmap.h \ + object-offsets.h \ + abi-details.h \ + metadata-cross-helpers.c # These source files have compile time dependencies on GC code @@ -266,7 +271,7 @@ sgen_sources = \ sgen-qsort.c \ sgen-qsort.h -libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(boehm_sources) +libmonoruntime_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(null_gc_sources) $(boehm_sources) libmonoruntime_la_CFLAGS = $(BOEHM_DEFINES) libmonoruntimesgen_la_SOURCES = $(common_sources) $(gc_dependent_sources) $(sgen_sources) diff --git a/mono/metadata/Makefile.in.REMOVED.git-id b/mono/metadata/Makefile.in.REMOVED.git-id index 93ebdd38f3..67aaa9957a 100644 --- a/mono/metadata/Makefile.in.REMOVED.git-id +++ b/mono/metadata/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -90fad16d348364d75591bcd07498c94f72be1bf1 \ No newline at end of file +aac85511c1d76e845222b1f0a50fec772d9538d7 \ No newline at end of file diff --git a/mono/metadata/abi-details.h b/mono/metadata/abi-details.h new file mode 100644 index 0000000000..01c741b35d --- /dev/null +++ b/mono/metadata/abi-details.h @@ -0,0 +1,31 @@ +/* + * Copyright 2014 Xamarin Inc + */ +#ifndef __MONO_METADATA_ABI_DETAILS_H__ +#define __MONO_METADATA_ABI_DETAILS_H__ + +#include +#include + +#define MONO_ABI_ALIGNOF(type) MONO_ALIGN_ ## type +#define MONO_CURRENT_ABI_ALIGNOF(type) ((int)G_STRUCT_OFFSET(struct { char c; type x; }, x)) + + +#undef DECL_OFFSET +#undef DECL_OFFSET2 +#define DECL_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field = -1, +#define DECL_OFFSET2(struct,field,offset) MONO_OFFSET_ ## struct ## _ ## field = offset, +#define DECL_ALIGN(type) MONO_ALIGN_ ##type = MONO_CURRENT_ABI_ALIGNOF (type), +#define DECL_ALIGN2(type,size) MONO_ALIGN_ ##type = size, + +enum { +#include "object-offsets.h" +}; + +#ifdef USED_CROSS_COMPILER_OFFSETS +#define MONO_STRUCT_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field +#else +#define MONO_STRUCT_OFFSET(struct,field) (MONO_OFFSET_ ## struct ## _ ## field == -1, G_STRUCT_OFFSET (struct,field)) +#endif + +#endif diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c index 5b3294aa6b..1f0a4f59d7 100644 --- a/mono/metadata/appdomain.c +++ b/mono/metadata/appdomain.c @@ -242,10 +242,10 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb, mono_thread_init (start_cb, attach_cb); class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomainSetup"); - setup = (MonoAppDomainSetup *) mono_object_new (domain, class); + setup = (MonoAppDomainSetup *) mono_object_new_pinned (domain, class); class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomain"); - ad = (MonoAppDomain *) mono_object_new (domain, class); + ad = (MonoAppDomain *) mono_object_new_pinned (domain, class); ad->data = domain; domain->domain = ad; domain->setup = setup; @@ -330,7 +330,7 @@ mono_context_init (MonoDomain *domain) MonoAppContext *context; class = mono_class_from_name (mono_defaults.corlib, "System.Runtime.Remoting.Contexts", "Context"); - context = (MonoAppContext *) mono_object_new (domain, class); + context = (MonoAppContext *) mono_object_new_pinned (domain, class); context->domain_id = domain->domain_id; context->context_id = 0; domain->default_context = context; @@ -403,6 +403,25 @@ mono_domain_create_appdomain (char *friendly_name, char *configuration_file) return mono_domain_from_appdomain (ad); } +/** + * mono_domain_set_config: + * @domain: MonoDomain initialized with the appdomain we want to change + * @base_dir: new base directory for the appdomain + * @config_file_name: path to the new configuration for the app domain + * + * Used to set the system configuration for an appdomain + * + * Without using this, embedded builds will get 'System.Configuration.ConfigurationErrorsException: + * Error Initializing the configuration system. ---> System.ArgumentException: + * The 'ExeConfigFilename' argument cannot be null.' for some managed calls. + */ +void +mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name) +{ + MONO_OBJECT_SETREF (domain->setup, application_base, mono_string_new (domain, base_dir)); + MONO_OBJECT_SETREF (domain->setup, configuration_file, mono_string_new (domain, config_file_name)); +} + static MonoAppDomainSetup* copy_app_domain_setup (MonoDomain *domain, MonoAppDomainSetup *setup) { @@ -1861,7 +1880,7 @@ mono_domain_assembly_search (MonoAssemblyName *aname, for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) { ass = tmp->data; /* Dynamic assemblies can't match here in MS.NET */ - if (ass->dynamic || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname)) + if (assembly_is_dynamic (ass) || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname)) continue; mono_domain_assemblies_unlock (domain); @@ -2253,12 +2272,12 @@ deregister_reflection_info_roots (MonoDomain *domain) * promoting it from a simple lock to a complex lock, which we better avoid if * possible. */ - if (image->dynamic) + if (image_is_dynamic (image)) deregister_reflection_info_roots_from_list (image); for (i = 0; i < image->module_count; ++i) { MonoImage *module = image->modules [i]; - if (module && module->dynamic) + if (module && image_is_dynamic (module)) deregister_reflection_info_roots_from_list (module); } } diff --git a/mono/metadata/appdomain.h b/mono/metadata/appdomain.h index 3b3884330f..e0c2f671c2 100644 --- a/mono/metadata/appdomain.h +++ b/mono/metadata/appdomain.h @@ -66,6 +66,9 @@ mono_domain_create (void); MONO_API MonoDomain * mono_domain_create_appdomain (char *friendly_name, char *configuration_file); +MONO_API void +mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name); + MONO_API MonoDomain * mono_domain_get (void); diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c index 15d6041142..a4988a8243 100644 --- a/mono/metadata/assembly.c +++ b/mono/metadata/assembly.c @@ -582,7 +582,7 @@ compute_base (char *path) return NULL; /* Not a well known Mono executable, we are embedded, cant guess the base */ - if (strcmp (p, "/mono") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis") && strcmp (p, "/mint") && strcmp (p, "/monodiet")) + if (strcmp (p, "/mono") && strcmp (p, "/mono-boehm") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis")) return NULL; *p = 0; @@ -3024,7 +3024,7 @@ mono_assembly_release_gc_roots (MonoAssembly *assembly) if (assembly == NULL || assembly == REFERENCE_MISSING) return; - if (assembly->dynamic) { + if (assembly_is_dynamic (assembly)) { int i; MonoDynamicImage *dynimg = (MonoDynamicImage *)assembly->image; for (i = 0; i < dynimg->image.module_count; ++i) @@ -3087,7 +3087,7 @@ mono_assembly_close_finish (MonoAssembly *assembly) if (assembly->image) mono_image_close_finish (assembly->image); - if (assembly->dynamic) { + if (assembly_is_dynamic (assembly)) { g_free ((char*)assembly->aname.culture); } else { g_free (assembly); diff --git a/mono/metadata/attach.c b/mono/metadata/attach.c index 86a83c3a62..83b06dc6ff 100644 --- a/mono/metadata/attach.c +++ b/mono/metadata/attach.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -220,7 +221,7 @@ mono_attach_start (void) * by creating it is to enable the attach mechanism if the process receives a * SIGQUIT signal, which can only be sent by the owner/root. */ - snprintf (path, sizeof (path), "/tmp/.mono_attach_pid%d", getpid ()); + snprintf (path, sizeof (path), "/tmp/.mono_attach_pid%"PRIdMAX"", (intmax_t) getpid ()); fd = open (path, O_RDONLY); if (fd == -1) return FALSE; @@ -405,7 +406,7 @@ ipc_connect (void) } } - filename = g_strdup_printf ("%s/.mono-%d", directory, getpid ()); + filename = g_strdup_printf ("%s/.mono-%"PRIdMAX"", directory, (intmax_t) getpid ()); unlink (filename); /* Bind a name to the socket. */ @@ -440,7 +441,7 @@ ipc_connect (void) ipc_filename = g_strdup (filename); - server_uri = g_strdup_printf ("unix://%s/.mono-%d?/vm", directory, getpid ()); + server_uri = g_strdup_printf ("unix://%s/.mono-%"PRIdMAX"?/vm", directory, (intmax_t) getpid ()); g_free (filename); g_free (directory); diff --git a/mono/metadata/attach.h b/mono/metadata/attach.h index 19ad3ca58e..b396ed12ed 100644 --- a/mono/metadata/attach.h +++ b/mono/metadata/attach.h @@ -1,6 +1,9 @@ #ifndef __MONO_ATTACH_H__ #define __MONO_ATTACH_H__ +#include +#include + G_BEGIN_DECLS void diff --git a/mono/metadata/boehm-gc.c b/mono/metadata/boehm-gc.c index 49a5f42454..af9eff4780 100644 --- a/mono/metadata/boehm-gc.c +++ b/mono/metadata/boehm-gc.c @@ -59,6 +59,9 @@ boehm_thread_unregister (MonoThreadInfo *p); static void register_test_toggleref_callback (void); +#define BOEHM_GC_BIT_FINALIZER_AWARE 1 +static MonoGCFinalizerCallbacks fin_callbacks; + static void mono_gc_warning (char *msg, GC_word arg) { @@ -1174,7 +1177,7 @@ mono_gc_conservatively_scan_area (void *start, void *end) } void * -mono_gc_scan_object (void *obj) +mono_gc_scan_object (void *obj, void *gc_data) { g_assert_not_reached (); return NULL; @@ -1242,6 +1245,7 @@ void mono_gc_pthread_exit (void *retval) { pthread_exit (retval); + g_assert_not_reached (); } #endif @@ -1260,6 +1264,10 @@ BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reser guint mono_gc_get_vtable_bits (MonoClass *class) { + if (fin_callbacks.is_class_finalization_aware) { + if (fin_callbacks.is_class_finalization_aware (class)) + return BOEHM_GC_BIT_FINALIZER_AWARE; + } return 0; } @@ -1339,4 +1347,29 @@ register_test_toggleref_callback (void) mono_gc_toggleref_register_callback (test_toggleref_callback); } +static gboolean +is_finalization_aware (MonoObject *obj) +{ + MonoVTable *vt = obj->vtable; + return (vt->gc_bits & BOEHM_GC_BIT_FINALIZER_AWARE) == BOEHM_GC_BIT_FINALIZER_AWARE; +} + +static void +fin_notifier (MonoObject *obj) +{ + if (is_finalization_aware (obj)) + fin_callbacks.object_queued_for_finalization (obj); +} + +void +mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks) +{ + if (callbacks->version != MONO_GC_FINALIZER_EXTENSION_VERSION) + g_error ("Invalid finalizer callback version. Expected %d but got %d\n", MONO_GC_FINALIZER_EXTENSION_VERSION, callbacks->version); + + fin_callbacks = *callbacks; + + GC_set_finalizer_notify_proc ((void (*) (GC_PTR))fin_notifier); +} + #endif /* no Boehm GC */ diff --git a/mono/metadata/char-conversions.h.REMOVED.git-id b/mono/metadata/char-conversions.h.REMOVED.git-id index 4dad556b68..6bf0baecda 100644 --- a/mono/metadata/char-conversions.h.REMOVED.git-id +++ b/mono/metadata/char-conversions.h.REMOVED.git-id @@ -1 +1 @@ -3517e76a90f414e1c46d8cfbffa90fc243bc2509 \ No newline at end of file +5628ce7dd656dabd757ef054b67e8fb93bcc887c \ No newline at end of file diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h index 2160b11741..ab4a5cb578 100644 --- a/mono/metadata/class-internals.h +++ b/mono/metadata/class-internals.h @@ -673,7 +673,7 @@ void mono_class_setup_supertypes (MonoClass *klass) MONO_INTERNAL; void -mono_class_setup_fields_locking (MonoClass *class) MONO_INTERNAL; +mono_class_setup_fields_locking (MonoClass *klass) MONO_INTERNAL; /* WARNING * Only call this function if you can ensure both @klass and @parent @@ -712,38 +712,38 @@ typedef struct { typedef struct { guint64 new_object_count; - gulong initialized_class_count; - gulong generic_vtable_count; - gulong used_class_count; - gulong method_count; - gulong class_vtable_size; - gulong class_static_data_size; - gulong generic_instance_count; - gulong generic_class_count; - gulong inflated_method_count; - gulong inflated_method_count_2; - gulong inflated_type_count; - gulong generics_metadata_size; - gulong delegate_creations; - gulong imt_tables_size; - gulong imt_number_of_tables; - gulong imt_number_of_methods; - gulong imt_used_slots; - gulong imt_slots_with_collisions; - gulong imt_max_collisions_in_slot; - gulong imt_method_count_when_max_collisions; - gulong imt_thunks_size; - gulong jit_info_table_insert_count; - gulong jit_info_table_remove_count; - gulong jit_info_table_lookup_count; - gulong generics_sharable_methods; - gulong generics_unsharable_methods; - gulong generics_shared_methods; - gulong gsharedvt_methods; - gulong minor_gc_count; - gulong major_gc_count; - gulong minor_gc_time_usecs; - gulong major_gc_time_usecs; + size_t initialized_class_count; + size_t generic_vtable_count; + size_t used_class_count; + size_t method_count; + size_t class_vtable_size; + size_t class_static_data_size; + size_t generic_instance_count; + size_t generic_class_count; + size_t inflated_method_count; + size_t inflated_method_count_2; + size_t inflated_type_count; + size_t generics_metadata_size; + size_t delegate_creations; + size_t imt_tables_size; + size_t imt_number_of_tables; + size_t imt_number_of_methods; + size_t imt_used_slots; + size_t imt_slots_with_collisions; + size_t imt_max_collisions_in_slot; + size_t imt_method_count_when_max_collisions; + size_t imt_thunks_size; + size_t jit_info_table_insert_count; + size_t jit_info_table_remove_count; + size_t jit_info_table_lookup_count; + size_t generics_sharable_methods; + size_t generics_unsharable_methods; + size_t generics_shared_methods; + size_t gsharedvt_methods; + size_t minor_gc_count; + size_t major_gc_count; + size_t minor_gc_time_usecs; + size_t major_gc_time_usecs; gboolean enabled; } MonoStats; @@ -881,6 +881,16 @@ typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInf typedef gboolean (*MonoGetClassFromName) (MonoImage *image, const char *name_space, const char *name, MonoClass **res); +static inline gboolean +method_is_dynamic (MonoMethod *method) +{ +#ifdef DISABLE_REFLECTION_EMIT + return FALSE; +#else + return method->dynamic; +#endif +} + void mono_classes_init (void) MONO_INTERNAL; @@ -909,13 +919,13 @@ void mono_class_setup_parent (MonoClass *klass, MonoClass *parent) MONO_INTERNAL; MonoMethod* -mono_class_get_method_by_index (MonoClass *class, int index) MONO_INTERNAL; +mono_class_get_method_by_index (MonoClass *klass, int index) MONO_INTERNAL; MonoMethod* -mono_class_get_inflated_method (MonoClass *class, MonoMethod *method) MONO_INTERNAL; +mono_class_get_inflated_method (MonoClass *klass, MonoMethod *method) MONO_INTERNAL; MonoMethod* -mono_class_get_vtable_entry (MonoClass *class, int offset) MONO_INTERNAL; +mono_class_get_vtable_entry (MonoClass *klass, int offset) MONO_INTERNAL; GPtrArray* mono_class_get_implemented_interfaces (MonoClass *klass, MonoError *error) MONO_INTERNAL; @@ -985,7 +995,7 @@ void mono_install_get_class_from_name (MonoGetClassFromName func) MONO_INTERNAL; MonoGenericContext* -mono_class_get_context (MonoClass *class) MONO_INTERNAL; +mono_class_get_context (MonoClass *klass) MONO_INTERNAL; MonoMethodSignature* mono_method_signature_checked (MonoMethod *m, MonoError *err) MONO_INTERNAL; @@ -1263,7 +1273,7 @@ char* mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format) MONO_INTERNAL; char* -mono_type_get_full_name (MonoClass *class) MONO_INTERNAL; +mono_type_get_full_name (MonoClass *klass) MONO_INTERNAL; MonoArrayType *mono_dup_array_type (MonoImage *image, MonoArrayType *a) MONO_INTERNAL; MonoMethodSignature *mono_metadata_signature_deep_dup (MonoImage *image, MonoMethodSignature *sig) MONO_INTERNAL; @@ -1324,7 +1334,7 @@ MonoMethod* mono_method_search_in_array_class (MonoClass *klass, const char *name, MonoMethodSignature *sig) MONO_INTERNAL; void -mono_class_setup_interface_id (MonoClass *class) MONO_INTERNAL; +mono_class_setup_interface_id (MonoClass *klass) MONO_INTERNAL; MonoGenericContainer* mono_class_get_generic_container (MonoClass *klass) MONO_INTERNAL; @@ -1342,7 +1352,7 @@ MonoClassField* mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoType *type) MONO_INTERNAL; MonoVTable* -mono_class_vtable_full (MonoDomain *domain, MonoClass *class, gboolean raise_on_error) MONO_INTERNAL; +mono_class_vtable_full (MonoDomain *domain, MonoClass *klass, gboolean raise_on_error) MONO_INTERNAL; gboolean mono_class_is_assignable_from_slow (MonoClass *target, MonoClass *candidate) MONO_INTERNAL; @@ -1362,13 +1372,13 @@ MonoClassField* mono_class_get_fields_lazy (MonoClass* klass, gpointer *iter) MONO_INTERNAL; gboolean -mono_class_check_vtable_constraints (MonoClass *class, GList *in_setup) MONO_INTERNAL; +mono_class_check_vtable_constraints (MonoClass *klass, GList *in_setup) MONO_INTERNAL; gboolean mono_class_has_finalizer (MonoClass *klass) MONO_INTERNAL; void -mono_unload_interface_id (MonoClass *class) MONO_INTERNAL; +mono_unload_interface_id (MonoClass *klass) MONO_INTERNAL; GPtrArray* mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bflags, gboolean ignore_case, gboolean allow_ctors, MonoException **ex) MONO_INTERNAL; diff --git a/mono/metadata/class.c.REMOVED.git-id b/mono/metadata/class.c.REMOVED.git-id index 7a70f7194f..d93cd697dd 100644 --- a/mono/metadata/class.c.REMOVED.git-id +++ b/mono/metadata/class.c.REMOVED.git-id @@ -1 +1 @@ -36a86794e77bf55a723c6e26bebff446b1fdb4ce \ No newline at end of file +df1eda26820cc45243b96f9ec5d2874c9f234c6a \ No newline at end of file diff --git a/mono/metadata/cominterop.c b/mono/metadata/cominterop.c index 19b624c3fb..f722716d1e 100644 --- a/mono/metadata/cominterop.c +++ b/mono/metadata/cominterop.c @@ -14,6 +14,7 @@ #include "object.h" #include "loader.h" #include "cil-coff.h" +#include "metadata/abi-details.h" #include "metadata/cominterop.h" #include "metadata/marshal.h" #include "metadata/method-builder.h" @@ -695,11 +696,11 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, // load src mono_mb_emit_ldloc (mb, 0); mono_mb_emit_byte (mb, CEE_LDIND_REF); - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp)); mono_mb_emit_byte (mb, CEE_LDIND_REF); /* load the RCW from the ComInteropProxy*/ - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object)); mono_mb_emit_byte (mb, CEE_LDIND_REF); if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE) { @@ -1002,11 +1003,11 @@ mono_cominterop_get_invoke (MonoMethod *method) /* get real proxy object, which is a ComInteropProxy in this case*/ temp_obj = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg); mono_mb_emit_ldarg (mb, 0); - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp)); mono_mb_emit_byte (mb, CEE_LDIND_REF); /* load the RCW from the ComInteropProxy*/ - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object)); mono_mb_emit_byte (mb, CEE_LDIND_REF); /* load args and make the call on the RCW */ @@ -1034,7 +1035,7 @@ mono_cominterop_get_invoke (MonoMethod *method) cache_proxy = mono_class_get_method_from_name (com_interop_proxy_class, "CacheProxy", 0); mono_mb_emit_ldarg (mb, 0); - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp)); mono_mb_emit_byte (mb, CEE_LDIND_REF); mono_mb_emit_managed_call (mb, cache_proxy, NULL); } diff --git a/mono/metadata/console-io.h b/mono/metadata/console-io.h index a7ef7686b6..6693051115 100644 --- a/mono/metadata/console-io.h +++ b/mono/metadata/console-io.h @@ -15,6 +15,7 @@ #include #include +#include G_BEGIN_DECLS diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c index b8987c9ec3..6a70b35008 100644 --- a/mono/metadata/console-unix.c +++ b/mono/metadata/console-unix.c @@ -17,6 +17,9 @@ #include #include #include +#ifdef HAVE_SYS_SELECT_H +# include +#endif #ifdef HAVE_SYS_TIME_H # include #endif diff --git a/mono/metadata/coree.c b/mono/metadata/coree.c index 9e48a3fe07..6c7ff4a1f2 100644 --- a/mono/metadata/coree.c +++ b/mono/metadata/coree.c @@ -11,12 +11,6 @@ #ifdef HOST_WIN32 -#if _WIN32_WINNT < 0x0501 -/* Required for ACTCTX. */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif /* _WIN32_WINNT < 0x0501 */ - #include #include #include @@ -226,10 +220,12 @@ STDAPI _CorValidateImage(PVOID *ImageBase, LPCWSTR FileName) { IMAGE_DOS_HEADER* DosHeader; IMAGE_NT_HEADERS32* NtHeaders32; - IMAGE_NT_HEADERS64* NtHeaders64; IMAGE_DATA_DIRECTORY* CliHeaderDir; +#ifdef _WIN64 + IMAGE_NT_HEADERS64* NtHeaders64; MonoCLIHeader* CliHeader; DWORD SizeOfHeaders; +#endif DWORD* Address; DWORD OldProtect; @@ -410,7 +406,9 @@ HMODULE WINAPI MonoLoadImage(LPCWSTR FileName) HANDLE MapHandle; IMAGE_DOS_HEADER* DosHeader; IMAGE_NT_HEADERS32* NtHeaders32; +#ifdef _WIN64 IMAGE_NT_HEADERS64* NtHeaders64; +#endif HMODULE ModuleHandle; FileHandle = CreateFile(FileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); @@ -458,7 +456,9 @@ InvalidImageFormat: goto UnmapView; } +#ifdef _WIN64 ValidImage: +#endif UnmapViewOfFile(DosHeader); CloseHandle(MapHandle); diff --git a/mono/metadata/coree.h b/mono/metadata/coree.h index a2bec50a0f..e5f842f252 100644 --- a/mono/metadata/coree.h +++ b/mono/metadata/coree.h @@ -11,10 +11,12 @@ #define __MONO_COREE_H__ #include +#include #ifdef HOST_WIN32 #include +#include #include "image.h" #define STATUS_SUCCESS 0x00000000L diff --git a/mono/metadata/culture-info.h b/mono/metadata/culture-info.h index 50e174ffe0..5ee2eaf03f 100644 --- a/mono/metadata/culture-info.h +++ b/mono/metadata/culture-info.h @@ -3,6 +3,7 @@ #define _MONO_METADATA_CULTURE_INFO_H_ 1 #include +#include #define NUM_DAYS 7 #define NUM_MONTHS 13 diff --git a/mono/metadata/debug-helpers.c b/mono/metadata/debug-helpers.c index a24e415d18..aa62ad230e 100644 --- a/mono/metadata/debug-helpers.c +++ b/mono/metadata/debug-helpers.c @@ -575,7 +575,7 @@ dis_one (GString *str, MonoDisHelper *dh, MonoMethod *method, const unsigned cha size_t len2; char *blob2 = NULL; - if (!method->klass->image->dynamic && !method->dynamic) { + if (!image_is_dynamic (method->klass->image) && !method_is_dynamic (method)) { token = read32 (ip); blob = mono_metadata_user_string (method->klass->image, mono_metadata_token_index (token)); diff --git a/mono/metadata/decimal.h b/mono/metadata/decimal.h index 43c782a207..e9737c752b 100644 --- a/mono/metadata/decimal.h +++ b/mono/metadata/decimal.h @@ -1,3 +1,7 @@ +#ifndef _MONO_DECIMAL_H_ +#define _MONO_DECIMAL_H_ + +#include #include "mono/metadata/object.h" #include "mono/utils/mono-compiler.h" @@ -45,3 +49,4 @@ gint32 mono_decimalSetExponent(/*[In, Out]*/decimal_repr* pA, gint32 texp) MONO_ gint32 mono_string2decimal(/*[Out]*/decimal_repr* pA, /*[In]*/MonoString* s, gint32 decrDecimal, gint32 sign) MONO_INTERNAL; +#endif diff --git a/mono/metadata/domain-internals.h b/mono/metadata/domain-internals.h index 09c6479c03..a9031eb97e 100644 --- a/mono/metadata/domain-internals.h +++ b/mono/metadata/domain-internals.h @@ -197,8 +197,7 @@ struct _MonoJitInfo { } d; struct _MonoJitInfo *next_jit_code_hash; gpointer code_start; - /* This might contain an id for the unwind info instead of a register mask */ - guint32 used_regs; + guint32 unwind_info; int code_size; guint32 num_clauses:15; /* Whenever the code is domain neutral or 'shared' */ diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index a9bf81b5cd..f42554f739 100644 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -856,13 +856,13 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end) { MonoJitInfo *ji; - mono_appdomains_lock (); + g_assert (mono_root_domain); + mono_domain_lock (mono_root_domain); /* * We reuse MonoJitInfoTable to store AOT module info, * this gives us async-safe lookup. */ - g_assert (mono_root_domain); if (!mono_root_domain->aot_modules) { mono_root_domain->num_jit_info_tables ++; mono_root_domain->aot_modules = jit_info_table_new (mono_root_domain); @@ -874,7 +874,7 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end) ji->code_size = (guint8*)end - (guint8*)start; jit_info_table_add (mono_root_domain, &mono_root_domain->aot_modules, ji); - mono_appdomains_unlock (); + mono_domain_unlock (mono_root_domain); } void @@ -2023,7 +2023,7 @@ mono_domain_free (MonoDomain *domain, gboolean force) /* Close dynamic assemblies first, since they have no ref count */ for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) { MonoAssembly *ass = tmp->data; - if (!ass->image || !ass->image->dynamic) + if (!ass->image || !image_is_dynamic (ass->image)) continue; mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count); if (!mono_assembly_close_except_image_pools (ass)) @@ -2034,7 +2034,7 @@ mono_domain_free (MonoDomain *domain, gboolean force) MonoAssembly *ass = tmp->data; if (!ass) continue; - if (!ass->image || ass->image->dynamic) + if (!ass->image || image_is_dynamic (ass->image)) continue; mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count); if (!mono_assembly_close_except_image_pools (ass)) diff --git a/mono/metadata/file-mmap-posix.c b/mono/metadata/file-mmap-posix.c index 63648f66a3..32f555ae7b 100644 --- a/mono/metadata/file-mmap-posix.c +++ b/mono/metadata/file-mmap-posix.c @@ -296,7 +296,7 @@ done: return (void*)handle; } -#define MONO_ANON_FILE_TEMPLATE "/tmp/mono.anonmap.XXXXXXXXX" +#define MONO_ANON_FILE_TEMPLATE "/mono.anonmap.XXXXXXXXX" static void* open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *error) { @@ -326,7 +326,9 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in //XXX should we ftruncate if the file is smaller than capacity? } else { int fd; - char file_name [sizeof (MONO_ANON_FILE_TEMPLATE) + 1]; + char *file_name; + const char *tmp_dir; + int unused G_GNUC_UNUSED, alloc_size; if (mode == FILE_MODE_OPEN) { *error = FILE_NOT_FOUND; @@ -334,7 +336,16 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in } *capacity = align_up_to_page_size (*capacity); - strcpy (file_name, MONO_ANON_FILE_TEMPLATE); + tmp_dir = g_get_tmp_dir (); + alloc_size = strlen (tmp_dir) + strlen (MONO_ANON_FILE_TEMPLATE) + 1; + if (alloc_size > 1024) {//rather fail that stack overflow + *error = COULD_NOT_MAP_MEMORY; + goto done; + } + file_name = alloca (alloc_size); + strcpy (file_name, tmp_dir); + strcat (file_name, MONO_ANON_FILE_TEMPLATE); + fd = mkstemp (file_name); if (fd == -1) { *error = COULD_NOT_MAP_MEMORY; @@ -342,7 +353,7 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in } unlink (file_name); - int unused G_GNUC_UNUSED = ftruncate (fd, (off_t)*capacity); + unused = ftruncate (fd, (off_t)*capacity); handle = g_new0 (MmapHandle, 1); handle->ref_count = 1; diff --git a/mono/metadata/filewatcher.h b/mono/metadata/filewatcher.h index a17872c936..c0a1ca2fcd 100644 --- a/mono/metadata/filewatcher.h +++ b/mono/metadata/filewatcher.h @@ -19,10 +19,6 @@ #include #endif -#ifdef HAVE_SYS_SYSCALL_H -#include -#endif - G_BEGIN_DECLS gint ves_icall_System_IO_FSW_SupportsFSW (void) MONO_INTERNAL; diff --git a/mono/metadata/gc-internal.h b/mono/metadata/gc-internal.h index 01f8435269..62fdb109d4 100644 --- a/mono/metadata/gc-internal.h +++ b/mono/metadata/gc-internal.h @@ -13,6 +13,7 @@ #include #include #include +#include #include typedef struct { @@ -20,6 +21,14 @@ typedef struct { int major_gc_count; long long minor_gc_time_usecs; long long major_gc_time_usecs; +#ifdef HEAVY_STATISTICS + unsigned long long gray_queue_section_alloc; + unsigned long long gray_queue_section_free; + unsigned long long gray_queue_enqueue_fast_path; + unsigned long long gray_queue_dequeue_fast_path; + unsigned long long gray_queue_enqueue_slow_path; + unsigned long long gray_queue_dequeue_slow_path; +#endif } GCStats; #define mono_domain_finalizers_lock(domain) EnterCriticalSection (&(domain)->finalizable_objects_hash_lock); @@ -142,8 +151,8 @@ void* mono_gc_make_root_descr_all_refs (int numbits) MONO_INTERNAL; * foreach (ref in GC references in the are structure pointed to by ADDR) * mark_func (ref) */ -typedef void (*MonoGCMarkFunc) (void **addr); -typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func); +typedef void (*MonoGCMarkFunc) (void **addr, void *gc_data); +typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func, void *gc_data); /* Create a descriptor with a user defined marking function */ MONO_API void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker); @@ -267,7 +276,7 @@ typedef struct { * - in the second pass, it should mark the remaining areas of the stack * using precise marking by calling mono_gc_scan_object (). */ - void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise); + void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data); } MonoGCCallbacks; /* Set the callback functions callable by the GC */ @@ -280,7 +289,7 @@ MonoGCCallbacks *mono_gc_get_gc_callbacks (void) MONO_INTERNAL; void mono_gc_conservatively_scan_area (void *start, void *end) MONO_INTERNAL; /* Scan OBJ, returning its new address */ -void *mono_gc_scan_object (void *obj) MONO_INTERNAL; +void *mono_gc_scan_object (void *obj, void *gc_data) MONO_INTERNAL; /* Return the bitmap encoded by a descriptor */ gsize* mono_gc_get_bitmap_for_descr (void *descr, int *numbits) MONO_INTERNAL; @@ -356,6 +365,19 @@ struct _MonoReferenceQueue { gboolean should_be_deleted; }; +enum { + MONO_GC_FINALIZER_EXTENSION_VERSION = 1, +}; + +typedef struct { + int version; + gboolean (*is_class_finalization_aware) (MonoClass *klass); + void (*object_queued_for_finalization) (MonoObject *object); +} MonoGCFinalizerCallbacks; + +void mono_gc_register_finalizer_callbacks (MonoGCFinalizerCallbacks *callbacks); + + #ifdef HOST_WIN32 BOOL APIENTRY mono_gc_dllmain (HMODULE module_handle, DWORD reason, LPVOID reserved) MONO_INTERNAL; #endif @@ -369,7 +391,7 @@ void mono_gc_bzero_aligned (void *dest, size_t size) MONO_INTERNAL; void mono_gc_memmove_atomic (void *dest, const void *src, size_t size) MONO_INTERNAL; void mono_gc_memmove_aligned (void *dest, const void *src, size_t size) MONO_INTERNAL; -guint mono_gc_get_vtable_bits (MonoClass *class) MONO_INTERNAL; +guint mono_gc_get_vtable_bits (MonoClass *klass) MONO_INTERNAL; void mono_gc_register_altstack (gpointer stack, gint32 stack_size, gpointer altstack, gint32 altstack_size) MONO_INTERNAL; diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c index 1f7a5fb137..3d4532648a 100644 --- a/mono/metadata/gc.c +++ b/mono/metadata/gc.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include /* for mono_delegate_free_ftnptr () */ @@ -1061,6 +1062,8 @@ finalize_domain_objects (DomainFinalizationReq *req) static guint32 finalizer_thread (gpointer unused) { + gboolean wait = TRUE; + while (!finished) { /* Wait to be notified that there's at least one * finaliser to run @@ -1068,12 +1071,15 @@ finalizer_thread (gpointer unused) g_assert (mono_domain_get () == mono_get_root_domain ()); + if (wait) { /* An alertable wait is required so this thread can be suspended on windows */ #ifdef MONO_HAS_SEMAPHORES - MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE); + MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE); #else - WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE); + WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE); #endif + } + wait = TRUE; mono_threads_perform_thread_dump (); @@ -1105,7 +1111,16 @@ finalizer_thread (gpointer unused) reference_queue_proccess_all (); - SetEvent (pending_done_event); +#ifdef MONO_HAS_SEMAPHORES + /* Avoid posting the pending done event until there are pending finalizers */ + if (MONO_SEM_TIMEDWAIT (&finalizer_sem, 0) == 0) + /* Don't wait again at the start of the loop */ + wait = FALSE; + else + SetEvent (pending_done_event); +#else + SetEvent (pending_done_event); +#endif } SetEvent (shutdown_event); @@ -1139,6 +1154,14 @@ mono_gc_init (void) mono_counters_register ("Major GC collections", MONO_COUNTER_GC | MONO_COUNTER_INT, &gc_stats.major_gc_count); mono_counters_register ("Minor GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.minor_gc_time_usecs); mono_counters_register ("Major GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.major_gc_time_usecs); +#ifdef HEAVY_STATISTICS + mono_counters_register ("Gray Queue alloc section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_alloc); + mono_counters_register ("Gray Queue free section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_free); + mono_counters_register ("Gray Queue enqueue fast path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_enqueue_fast_path); + mono_counters_register ("Gray Queue dequeue fast path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_dequeue_fast_path); + mono_counters_register ("Gray Queue enqueue slow path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_enqueue_slow_path); + mono_counters_register ("Gray Queue dequeue slow path", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_dequeue_slow_path); +#endif mono_gc_base_init (); diff --git a/mono/metadata/icall.c.REMOVED.git-id b/mono/metadata/icall.c.REMOVED.git-id index bf6130844f..9fb2dbad9a 100644 --- a/mono/metadata/icall.c.REMOVED.git-id +++ b/mono/metadata/icall.c.REMOVED.git-id @@ -1 +1 @@ -f711003792d87d41833143dbee518b81c4d4ab5c \ No newline at end of file +0559152fa60c19d73660ad2cc9ab0925ab9eaefb \ No newline at end of file diff --git a/mono/metadata/image.c b/mono/metadata/image.c index f89f0c9ecc..3a4d69c3b5 100644 --- a/mono/metadata/image.c +++ b/mono/metadata/image.c @@ -534,7 +534,7 @@ mono_image_check_for_module_cctor (MonoImage *image) MonoTableInfo *t, *mt; t = &image->tables [MONO_TABLE_TYPEDEF]; mt = &image->tables [MONO_TABLE_METHOD]; - if (image->dynamic) { + if (image_is_dynamic (image)) { /* FIXME: */ image->checked_module_cctor = TRUE; return; @@ -671,12 +671,20 @@ class_next_value (gpointer value) void mono_image_init (MonoImage *image) { + InitializeCriticalSection (&image->lock); + InitializeCriticalSection (&image->szarray_cache_lock); + image->mempool = mono_mempool_new_size (512); mono_internal_hash_table_init (&image->class_cache, g_direct_hash, class_key_extract, class_next_value); - image->field_cache = g_hash_table_new (NULL, NULL); +#ifdef HOST_WIN32 + // FIXME: + image->field_cache = mono_conc_hashtable_new (&image->lock, NULL, NULL); +#else + image->field_cache = mono_conc_hashtable_new (&image->lock.mutex, NULL, NULL); +#endif image->typespec_cache = g_hash_table_new (NULL, NULL); image->memberref_signatures = g_hash_table_new (NULL, NULL); @@ -684,8 +692,6 @@ mono_image_init (MonoImage *image) image->method_signatures = g_hash_table_new (NULL, NULL); image->property_hash = mono_property_hash_new (); - InitializeCriticalSection (&image->lock); - InitializeCriticalSection (&image->szarray_cache_lock); } #if G_BYTE_ORDER != G_LITTLE_ENDIAN @@ -1539,7 +1545,7 @@ mono_image_close_except_pools (MonoImage *image) * assemblies, so we can't release these references in mono_assembly_close () since the * MonoImage might outlive its associated MonoAssembly. */ - if (image->references && !image->dynamic) { + if (image->references && !image_is_dynamic (image)) { for (i = 0; i < image->nreferences; i++) { if (image->references [i] && image->references [i] != REFERENCE_MISSING) { if (!mono_assembly_close_except_image_pools (image->references [i])) @@ -1602,7 +1608,7 @@ mono_image_close_except_pools (MonoImage *image) if (image->methodref_cache) g_hash_table_destroy (image->methodref_cache); mono_internal_hash_table_destroy (&image->class_cache); - g_hash_table_destroy (image->field_cache); + mono_conc_hashtable_destroy (image->field_cache); if (image->array_cache) { g_hash_table_foreach (image->array_cache, free_array_cache_entry, NULL); g_hash_table_destroy (image->array_cache); @@ -1697,7 +1703,7 @@ mono_image_close_except_pools (MonoImage *image) DeleteCriticalSection (&image->lock); /*g_print ("destroy image %p (dynamic: %d)\n", image, image->dynamic);*/ - if (image->dynamic) { + if (image_is_dynamic (image)) { /* Dynamic images are GC_MALLOCed */ g_free ((char*)image->module_name); mono_dynamic_image_free ((MonoDynamicImage*)image); @@ -1713,7 +1719,7 @@ mono_image_close_finish (MonoImage *image) { int i; - if (image->references && !image->dynamic) { + if (image->references && !image_is_dynamic (image)) { for (i = 0; i < image->nreferences; i++) { if (image->references [i] && image->references [i] != REFERENCE_MISSING) mono_assembly_close_finish (image->references [i]); @@ -1734,7 +1740,7 @@ mono_image_close_finish (MonoImage *image) mono_perfcounters->loader_bytes -= mono_mempool_get_allocated (image->mempool); #endif - if (!image->dynamic) { + if (!image_is_dynamic (image)) { if (debug_assembly_unload) mono_mempool_invalidate (image->mempool); else { @@ -2105,7 +2111,7 @@ mono_image_get_public_key (MonoImage *image, guint32 *size) const char *pubkey; guint32 len, tok; - if (image->dynamic) { + if (image_is_dynamic (image)) { if (size) *size = ((MonoDynamicImage*)image)->public_key_len; return (char*)((MonoDynamicImage*)image)->public_key; @@ -2202,7 +2208,7 @@ mono_image_get_assembly (MonoImage *image) gboolean mono_image_is_dynamic (MonoImage *image) { - return image->dynamic; + return image_is_dynamic (image); } /** @@ -2366,7 +2372,7 @@ void mono_image_append_class_to_reflection_info_set (MonoClass *class) { MonoImage *image = class->image; - g_assert (image->dynamic); + g_assert (image_is_dynamic (image)); mono_image_lock (image); image->reflection_info_unregister_classes = g_slist_prepend_mempool (image->mempool, image->reflection_info_unregister_classes, class); mono_image_unlock (image); diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c index f950055953..f1ed2d01dc 100644 --- a/mono/metadata/loader.c +++ b/mono/metadata/loader.c @@ -517,7 +517,7 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, guint32 type; MonoClassField *field; - if (image->dynamic) { + if (image_is_dynamic (image)) { MonoClassField *result; MonoClass *handle_class; @@ -532,13 +532,10 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, return result; } - mono_image_lock (image); - if ((field = g_hash_table_lookup (image->field_cache, GUINT_TO_POINTER (token)))) { + if ((field = mono_conc_hashtable_lookup (image->field_cache, GUINT_TO_POINTER (token)))) { *retklass = field->parent; - mono_image_unlock (image); return field; } - mono_image_unlock (image); if (mono_metadata_token_table (token) == MONO_TABLE_MEMBERREF) field = field_from_memberref (image, token, retklass, context); @@ -555,10 +552,9 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, field = mono_class_get_field (k, token); } - mono_image_lock (image); if (field && field->parent && !field->parent->generic_class && !field->parent->generic_container) - g_hash_table_insert (image->field_cache, GUINT_TO_POINTER (token), field); - mono_image_unlock (image); + mono_conc_hashtable_insert (image->field_cache, GUINT_TO_POINTER (token), field); + return field; } @@ -596,7 +592,7 @@ find_method_in_class (MonoClass *klass, const char *name, const char *qname, con /* Search directly in the metadata to avoid calling setup_methods () */ /* FIXME: !from_class->generic_class condition causes test failures. */ - if (klass->type_token && !klass->image->dynamic && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) { + if (klass->type_token && !image_is_dynamic (klass->image) && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) { for (i = 0; i < klass->method.count; ++i) { guint32 cols [MONO_METHOD_SIZE]; MonoMethod *method; @@ -855,11 +851,9 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to if (method->klass->generic_class) return mono_method_signature (method); -#ifndef DISABLE_REFLECTION_EMIT - if (image->dynamic) { + if (image_is_dynamic (image)) { sig = mono_reflection_lookup_signature (image, method, token); } else { -#endif mono_metadata_decode_row (&image->tables [MONO_TABLE_MEMBERREF], idx-1, cols, MONO_MEMBERREF_SIZE); sig_idx = cols [MONO_MEMBERREF_SIGNATURE]; @@ -888,10 +882,7 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to mono_loader_set_error_bad_image (g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, image->name)); return NULL; } -#ifndef DISABLE_REFLECTION_EMIT } -#endif - if (context) { MonoError error; @@ -1351,7 +1342,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char if (piinfo->addr) return piinfo->addr; - if (method->klass->image->dynamic) { + if (image_is_dynamic (method->klass->image)) { MonoReflectionMethodAux *method_aux = g_hash_table_lookup ( ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method); @@ -1695,7 +1686,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass, int size; guint32 cols [MONO_TYPEDEF_SIZE]; - if (image->dynamic) { + if (image_is_dynamic (image)) { MonoClass *handle_class; result = mono_lookup_dynamic_token_class (image, token, TRUE, &handle_class, context); @@ -1823,7 +1814,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass, if (!image->method_cache) image->method_cache = g_hash_table_new (NULL, NULL); result = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token))); - } else if (!image->dynamic) { + } else if (!image_is_dynamic (image)) { if (!image->methodref_cache) image->methodref_cache = g_hash_table_new (NULL, NULL); result = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token)); @@ -1844,7 +1835,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass, if (mono_metadata_token_table (token) == MONO_TABLE_METHOD) result2 = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token))); - else if (!image->dynamic) + else if (!image_is_dynamic (image)) result2 = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token)); if (result2) { @@ -1854,7 +1845,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass, if (mono_metadata_token_table (token) == MONO_TABLE_METHOD) g_hash_table_insert (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)), result); - else if (!image->dynamic) + else if (!image_is_dynamic (image)) g_hash_table_insert (image->methodref_cache, GINT_TO_POINTER (token), result); } @@ -1986,7 +1977,7 @@ mono_free_method (MonoMethod *method) /* g_free (method->signature); */ } - if (method->dynamic) { + if (method_is_dynamic (method)) { MonoMethodWrapper *mw = (MonoMethodWrapper*)method; int i; @@ -2039,7 +2030,7 @@ mono_method_get_param_names (MonoMethod *method, const char **names) mono_class_init (klass); - if (klass->image->dynamic) { + if (image_is_dynamic (klass->image)) { MonoReflectionMethodAux *method_aux = g_hash_table_lookup ( ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method); @@ -2096,9 +2087,8 @@ mono_method_get_param_token (MonoMethod *method, int index) mono_class_init (klass); - if (klass->image->dynamic) { + if (image_is_dynamic (klass->image)) g_assert_not_reached (); - } methodt = &klass->image->tables [MONO_TABLE_METHOD]; idx = mono_method_get_index (method); @@ -2131,7 +2121,7 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs) for (i = 0; i < signature->param_count + 1; ++i) mspecs [i] = NULL; - if (method->klass->image->dynamic) { + if (image_is_dynamic (method->klass->image)) { MonoReflectionMethodAux *method_aux = g_hash_table_lookup ( ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method); @@ -2186,7 +2176,7 @@ mono_method_has_marshal_info (MonoMethod *method) MonoTableInfo *paramt; guint32 idx; - if (method->klass->image->dynamic) { + if (image_is_dynamic (method->klass->image)) { MonoReflectionMethodAux *method_aux = g_hash_table_lookup ( ((MonoDynamicImage*)method->klass->image)->method_aux_hash, method); @@ -2567,6 +2557,7 @@ mono_method_get_header (MonoMethod *method) MonoImage* img; gpointer loc; MonoMethodHeader *header; + MonoGenericContainer *container; if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) || (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) || (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)) return NULL; @@ -2616,7 +2607,14 @@ mono_method_get_header (MonoMethod *method) if (!loc) return NULL; - header = mono_metadata_parse_mh_full (img, mono_method_get_generic_container (method), loc); + /* + * When parsing the types of local variables, we must pass any container available + * to ensure that both VAR and MVAR will get the right owner. + */ + container = mono_method_get_generic_container (method); + if (!container) + container = method->klass->generic_container; + header = mono_metadata_parse_mh_full (img, container, loc); return header; } diff --git a/mono/metadata/locales.h b/mono/metadata/locales.h index 7ebdde0133..26919ea43c 100644 --- a/mono/metadata/locales.h +++ b/mono/metadata/locales.h @@ -26,28 +26,28 @@ typedef enum { CompareOptions_Ordinal=0x40000000 } MonoCompareOptions; -extern void ves_icall_System_Globalization_CultureInfo_construct_internal_locale (MonoCultureInfo *this, MonoString *locale) MONO_INTERNAL; +extern void ves_icall_System_Globalization_CultureInfo_construct_internal_locale (MonoCultureInfo *this_obj, MonoString *locale) MONO_INTERNAL; extern MonoString* ves_icall_System_Globalization_CultureInfo_get_current_locale_name (void) MONO_INTERNAL; -extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_lcid (MonoCultureInfo *this, gint lcid) MONO_INTERNAL; -extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (MonoCultureInfo *this, MonoString *name) MONO_INTERNAL; +extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_lcid (MonoCultureInfo *this_obj, gint lcid) MONO_INTERNAL; +extern MonoBoolean ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (MonoCultureInfo *this_obj, MonoString *name) MONO_INTERNAL; extern MonoArray *ves_icall_System_Globalization_CultureInfo_internal_get_cultures (MonoBoolean neutral, MonoBoolean specific, MonoBoolean installed) MONO_INTERNAL; -extern void ves_icall_System_Globalization_CultureInfo_construct_datetime_format (MonoCultureInfo *this) MONO_INTERNAL; -extern void ves_icall_System_Globalization_CultureInfo_construct_number_format (MonoCultureInfo *this) MONO_INTERNAL; +extern void ves_icall_System_Globalization_CultureInfo_construct_datetime_format (MonoCultureInfo *this_obj) MONO_INTERNAL; +extern void ves_icall_System_Globalization_CultureInfo_construct_number_format (MonoCultureInfo *this_obj) MONO_INTERNAL; extern void ves_icall_System_Globalization_CompareInfo_construct_compareinfo (MonoCompareInfo *comp, MonoString *locale) MONO_INTERNAL; -extern int ves_icall_System_Globalization_CompareInfo_internal_compare (MonoCompareInfo *this, MonoString *str1, gint32 off1, gint32 len1, MonoString *str2, gint32 off2, gint32 len2, gint32 options) MONO_INTERNAL; -extern void ves_icall_System_Globalization_CompareInfo_free_internal_collator (MonoCompareInfo *this) MONO_INTERNAL; +extern int ves_icall_System_Globalization_CompareInfo_internal_compare (MonoCompareInfo *this_obj, MonoString *str1, gint32 off1, gint32 len1, MonoString *str2, gint32 off2, gint32 len2, gint32 options) MONO_INTERNAL; +extern void ves_icall_System_Globalization_CompareInfo_free_internal_collator (MonoCompareInfo *this_obj) MONO_INTERNAL; extern MonoBoolean -ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_lcid (MonoRegionInfo *this, gint lcid) MONO_INTERNAL; +ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_lcid (MonoRegionInfo *this_obj, gint lcid) MONO_INTERNAL; extern MonoBoolean -ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this, +ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this_obj, MonoString *name) MONO_INTERNAL; -extern void ves_icall_System_Globalization_CompareInfo_assign_sortkey (MonoCompareInfo *this, MonoSortKey *key, MonoString *source, gint32 options) MONO_INTERNAL; -extern int ves_icall_System_Globalization_CompareInfo_internal_index (MonoCompareInfo *this, MonoString *source, gint32 sindex, gint32 count, MonoString *value, gint32 options, MonoBoolean first) MONO_INTERNAL; -extern int ves_icall_System_Globalization_CompareInfo_internal_index_char (MonoCompareInfo *this, MonoString *source, gint32 sindex, gint32 count, gunichar2 value, gint32 options, MonoBoolean first) MONO_INTERNAL; +extern void ves_icall_System_Globalization_CompareInfo_assign_sortkey (MonoCompareInfo *this_obj, MonoSortKey *key, MonoString *source, gint32 options) MONO_INTERNAL; +extern int ves_icall_System_Globalization_CompareInfo_internal_index (MonoCompareInfo *this_obj, MonoString *source, gint32 sindex, gint32 count, MonoString *value, gint32 options, MonoBoolean first) MONO_INTERNAL; +extern int ves_icall_System_Globalization_CompareInfo_internal_index_char (MonoCompareInfo *this_obj, MonoString *source, gint32 sindex, gint32 count, gunichar2 value, gint32 options, MonoBoolean first) MONO_INTERNAL; extern int ves_icall_System_Threading_Thread_current_lcid (void) MONO_INTERNAL; -extern MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this, MonoString *old, MonoString *new, MonoCompareInfo *comp) MONO_INTERNAL; -extern MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this, MonoCultureInfo *cult) MONO_INTERNAL; -extern MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this, MonoCultureInfo *cult) MONO_INTERNAL; +extern MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this_obj, MonoString *old, MonoString *new_str, MonoCompareInfo *comp) MONO_INTERNAL; +extern MonoString *ves_icall_System_String_InternalToLower_Comp (MonoString *this_obj, MonoCultureInfo *cult) MONO_INTERNAL; +extern MonoString *ves_icall_System_String_InternalToUpper_Comp (MonoString *this_obj, MonoCultureInfo *cult) MONO_INTERNAL; extern gunichar2 ves_icall_System_Char_InternalToUpper_Comp (gunichar2 c, MonoCultureInfo *cult) MONO_INTERNAL; extern gunichar2 ves_icall_System_Char_InternalToLower_Comp (gunichar2 c, MonoCultureInfo *cult) MONO_INTERNAL; extern void load_normalization_resource (guint8 **argProps, guint8** argMappedChars, guint8** argCharMapIndex, guint8** argHelperIndex, guint8** argMapIdxToComposite, guint8** argCombiningClass) MONO_INTERNAL; diff --git a/mono/metadata/marshal.c.REMOVED.git-id b/mono/metadata/marshal.c.REMOVED.git-id index 32afd17c1c..8e8f93cb22 100644 --- a/mono/metadata/marshal.c.REMOVED.git-id +++ b/mono/metadata/marshal.c.REMOVED.git-id @@ -1 +1 @@ -8a8b6b8b512b3ade4dd00580152c020beae85bed \ No newline at end of file +4555510e80131af50660e4c699dd6102d9d9514c \ No newline at end of file diff --git a/mono/metadata/marshal.h b/mono/metadata/marshal.h index a85bd5d26f..0c311c8893 100644 --- a/mono/metadata/marshal.h +++ b/mono/metadata/marshal.h @@ -194,7 +194,7 @@ typedef struct { G_BEGIN_DECLS /*type of the function pointer of methods returned by mono_marshal_get_runtime_invoke*/ -typedef MonoObject *(*RuntimeInvokeFunction) (MonoObject *this, void **params, MonoObject **exc, void* compiled_method); +typedef MonoObject *(*RuntimeInvokeFunction) (MonoObject *this_obj, void **params, MonoObject **exc, void* compiled_method); typedef void (*RuntimeInvokeDynamicFunction) (void *args, MonoObject **exc, void* compiled_method); @@ -299,7 +299,7 @@ MonoMethod * mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del) MONO_INTERNAL; MonoMethod * -mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual) MONO_INTERNAL; +mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean is_virtual) MONO_INTERNAL; MonoMethod* mono_marshal_get_runtime_invoke_dynamic (void) MONO_INTERNAL; @@ -368,7 +368,7 @@ MonoMethod * mono_marshal_get_array_accessor_wrapper (MonoMethod *method) MONO_INTERNAL; MonoMethod * -mono_marshal_get_generic_array_helper (MonoClass *class, MonoClass *iface, +mono_marshal_get_generic_array_helper (MonoClass *klass, MonoClass *iface, gchar *name, MonoMethod *method) MONO_INTERNAL; MonoMethod * diff --git a/mono/metadata/metadata-cross-helpers.c b/mono/metadata/metadata-cross-helpers.c new file mode 100644 index 0000000000..5953691401 --- /dev/null +++ b/mono/metadata/metadata-cross-helpers.c @@ -0,0 +1,6 @@ +#include "config.h" + +#ifdef ENABLE_EXTENSION_MODULE +#include "../../../mono-extensions/mono/metadata/metadata-cross-helpers.c" +#endif + diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h index 618fd5b59d..f165929b27 100644 --- a/mono/metadata/metadata-internals.h +++ b/mono/metadata/metadata-internals.h @@ -13,6 +13,7 @@ #include "mono/utils/mono-property-hash.h" #include "mono/utils/mono-value-hash.h" #include +#include "mono/utils/mono-conc-hashtable.h" struct _MonoType { union { @@ -224,7 +225,7 @@ struct _MonoImage { /* * Indexed by fielddef and memberref tokens */ - GHashTable *field_cache; /*protected by the image lock*/ + MonoConcurrentHashTable *field_cache; /*protected by the image lock*/ /* indexed by typespec tokens. */ GHashTable *typespec_cache; @@ -524,6 +525,26 @@ struct _MonoMethodSignature { #define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P) +static inline gboolean +image_is_dynamic (MonoImage *image) +{ +#ifdef DISABLE_REFLECTION_EMIT + return FALSE; +#else + return image->dynamic; +#endif +} + +static inline gboolean +assembly_is_dynamic (MonoAssembly *assembly) +{ +#ifdef DISABLE_REFLECTION_EMIT + return FALSE; +#else + return assembly->dynamic; +#endif +} + /* for use with allocated memory blocks (assumes alignment is to 8 bytes) */ guint mono_aligned_addr_hash (gconstpointer ptr) MONO_INTERNAL; @@ -577,7 +598,7 @@ void mono_remove_image_unload_hook (MonoImageUnloadFunc func, gpointer user_data) MONO_INTERNAL; void -mono_image_append_class_to_reflection_info_set (MonoClass *class) MONO_INTERNAL; +mono_image_append_class_to_reflection_info_set (MonoClass *klass) MONO_INTERNAL; gpointer mono_image_set_alloc (MonoImageSet *set, guint size) MONO_INTERNAL; @@ -719,7 +740,7 @@ gboolean mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only) MONO_INTERNAL; MonoMarshalSpec * -mono_metadata_parse_marshal_spec_full (MonoImage *image, const char *ptr) MONO_INTERNAL; +mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image, const char *ptr) MONO_INTERNAL; guint mono_metadata_generic_inst_hash (gconstpointer data) MONO_INTERNAL; gboolean mono_metadata_generic_inst_equal (gconstpointer ka, gconstpointer kb) MONO_INTERNAL; @@ -762,5 +783,7 @@ MonoMethod* method_from_method_def_or_ref (MonoImage *m, guint32 tok, MonoGeneri MonoMethod *mono_get_method_constrained_with_method (MonoImage *image, MonoMethod *method, MonoClass *constrained_class, MonoGenericContext *context) MONO_INTERNAL; +void mono_type_set_alignment (MonoTypeEnum type, int align) MONO_INTERNAL; + #endif /* __MONO_METADATA_INTERNALS_H__ */ diff --git a/mono/metadata/metadata.c.REMOVED.git-id b/mono/metadata/metadata.c.REMOVED.git-id index c692023d28..85e35eaaa7 100644 --- a/mono/metadata/metadata.c.REMOVED.git-id +++ b/mono/metadata/metadata.c.REMOVED.git-id @@ -1 +1 @@ -356dc2c24371b6a941f22ef84647bfc16630f6aa \ No newline at end of file +8ab41872ede146efa0b6f5e72ec91e83d1bd9af7 \ No newline at end of file diff --git a/mono/metadata/metadata.h b/mono/metadata/metadata.h index 4b880c7bab..0a61a2dc10 100644 --- a/mono/metadata/metadata.h +++ b/mono/metadata/metadata.h @@ -190,6 +190,7 @@ typedef struct { struct { char *custom_name; char *cookie; + MonoImage *image; } custom_data; struct { MonoMarshalVariant elem_type; diff --git a/mono/metadata/method-builder.c b/mono/metadata/method-builder.c index 0ed15e721a..cb24914888 100644 --- a/mono/metadata/method-builder.c +++ b/mono/metadata/method-builder.c @@ -10,6 +10,7 @@ #include "config.h" #include "loader.h" +#include "mono/metadata/abi-details.h" #include "mono/metadata/method-builder.h" #include "mono/metadata/tabledefs.h" #include "mono/metadata/exception.h" @@ -201,7 +202,7 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in GList *tmp; void **data; l = g_list_reverse (mw->method_data); - if (method->dynamic) + if (method_is_dynamic (method)) data = g_malloc (sizeof (gpointer) * (i + 1)); else data = mono_image_alloc (image, sizeof (gpointer) * (i + 1)); @@ -536,7 +537,7 @@ mono_mb_emit_exception_full (MonoMethodBuilder *mb, const char *exc_nspace, cons mono_mb_emit_op (mb, CEE_NEWOBJ, ctor); if (msg != NULL) { mono_mb_emit_byte (mb, CEE_DUP); - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoException, message)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoException, message)); mono_mb_emit_ldstr (mb, (char*)msg); mono_mb_emit_byte (mb, CEE_STIND_REF); } diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c index 9784437db4..fc9814b33a 100644 --- a/mono/metadata/monitor.c +++ b/mono/metadata/monitor.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -73,18 +74,6 @@ enum { * an object. */ -struct _MonoThreadsSync -{ - gsize owner; /* thread ID */ - guint32 nest; -#ifdef HAVE_MOVING_COLLECTOR - gint32 hash_code; -#endif - volatile gint32 entry_count; - HANDLE entry_sem; - GSList *wait_list; - void *data; -}; typedef struct _MonitorArray MonitorArray; @@ -813,7 +802,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch /* ldarg 0 obj conv.i objp - ldc.i4 G_STRUCT_OFFSET(MonoObject, synchronisation) objp off + ldc.i4 MONO_STRUCT_OFFSET(MonoObject, synchronisation) objp off add &syncp ldind.i syncp stloc syncp @@ -823,7 +812,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch mono_mb_emit_byte (mb, CEE_LDARG_0); mono_mb_emit_byte (mb, CEE_CONV_I); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoObject, synchronisation)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoObject, synchronisation)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); mono_mb_emit_stloc (mb, syncp_loc); @@ -889,7 +878,6 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) static MonoMethod *compare_exchange_method; int obj_null_branch, true_locktaken_branch = 0, syncp_null_branch, has_owner_branch, other_owner_branch, tid_branch, thin_hash_branch; int tid_loc, syncp_loc, owner_loc; - int thread_tls_offset; gboolean is_v4 = mono_method_signature (monitor_enter_method)->param_count == 2; int fast_path_idx = is_v4 ? FASTPATH_ENTERV4 : FASTPATH_ENTER; WrapperInfo *info; @@ -897,13 +885,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) /* The !is_v4 version is not used/tested */ g_assert (is_v4); - thread_tls_offset = mono_thread_get_tls_offset (); - if (thread_tls_offset == -1) - return NULL; - if (monitor_il_fastpaths [fast_path_idx]) return monitor_il_fastpaths [fast_path_idx]; + if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD)) + return NULL; + if (!compare_exchange_method) { MonoMethodDesc *desc; MonoClass *class; @@ -932,12 +919,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) /* mono. tls thread_tls_offset threadp - ldc.i4 G_STRUCT_OFFSET(MonoThread, tid) threadp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThread, tid) threadp off add &tid ldind.i tid stloc tid ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off add &owner ldind.i owner stloc owner @@ -948,12 +935,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX); mono_mb_emit_byte (mb, CEE_MONO_TLS); mono_mb_emit_i4 (mb, TLS_KEY_THREAD); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); mono_mb_emit_stloc (mb, tid_loc); mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); mono_mb_emit_stloc (mb, owner_loc); @@ -962,7 +949,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) /* ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off add &owner ldloc tid &owner tid ldc.i4 0 &owner tid 0 @@ -972,7 +959,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) */ mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_ldloc (mb, tid_loc); mono_mb_emit_byte (mb, CEE_LDC_I4_0); @@ -992,7 +979,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) ldloc tid owner tid brne.s other_owner ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off add &nest dup &nest &nest ldind.i4 &nest nest @@ -1007,7 +994,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method) mono_mb_emit_ldloc (mb, tid_loc); other_owner_branch = mono_mb_emit_short_branch (mb, CEE_BNE_UN_S); mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_DUP); mono_mb_emit_byte (mb, CEE_LDIND_I4); @@ -1061,17 +1048,15 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) MonoMethodBuilder *mb; MonoMethod *res; int obj_null_branch, has_waiting_branch, has_syncp_branch, owned_branch, nested_branch, thin_hash_branch; - int thread_tls_offset; int syncp_loc; WrapperInfo *info; - thread_tls_offset = mono_thread_get_tls_offset (); - if (thread_tls_offset == -1) - return NULL; - if (monitor_il_fastpaths [FASTPATH_EXIT]) return monitor_il_fastpaths [FASTPATH_EXIT]; + if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD)) + return NULL; + mb = mono_mb_new (mono_defaults.monitor_class, "FastMonitorExit", MONO_WRAPPER_UNKNOWN); mb->method->slot = -1; @@ -1092,11 +1077,11 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) /* has_syncp: ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off add &owner ldind.i owner mono. tls thread_tls_offset owner threadp - ldc.i4 G_STRUCT_OFFSET(MonoThread, tid) owner threadp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThread, tid) owner threadp off add owner &tid ldind.i owner tid beq.s owned @@ -1104,13 +1089,13 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) mono_mb_patch_short_branch (mb, has_syncp_branch); mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX); mono_mb_emit_byte (mb, CEE_MONO_TLS); mono_mb_emit_i4 (mb, TLS_KEY_THREAD); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); owned_branch = mono_mb_emit_short_branch (mb, CEE_BEQ_S); @@ -1124,7 +1109,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) /* owned: ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off add &nest dup &nest &nest ldind.i4 &nest nest @@ -1135,7 +1120,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) mono_mb_patch_short_branch (mb, owned_branch); mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_DUP); mono_mb_emit_byte (mb, CEE_LDIND_I4); @@ -1147,7 +1132,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) pop &nest pop ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, entry_count) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, entry_count) syncp off add &count ldind.i4 count brtrue.s has_waiting @@ -1156,14 +1141,14 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) mono_mb_emit_byte (mb, CEE_POP); mono_mb_emit_byte (mb, CEE_POP); mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, entry_count)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I4); has_waiting_branch = mono_mb_emit_short_branch (mb, CEE_BRTRUE_S); /* ldloc syncp syncp - ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off + ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off add &owner ldnull &owner 0 stind.i @@ -1171,7 +1156,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method) */ mono_mb_emit_ldloc (mb, syncp_loc); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDNULL); mono_mb_emit_byte (mb, CEE_STIND_I); @@ -1244,9 +1229,9 @@ mono_monitor_threads_sync_members_offset (int *owner_offset, int *nest_offset, i #define ENCODE_OFF_SIZE(o,s) (((o) << 8) | ((s) & 0xff)) - *owner_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner)); - *nest_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest)); - *entry_count_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count)); + *owner_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner)); + *nest_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest)); + *entry_count_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count)); } gboolean diff --git a/mono/metadata/monitor.h b/mono/metadata/monitor.h index 183c2ec0b5..a32780dcdf 100644 --- a/mono/metadata/monitor.h +++ b/mono/metadata/monitor.h @@ -12,10 +12,25 @@ #include #include +#include #include "mono/utils/mono-compiler.h" G_BEGIN_DECLS +struct _MonoThreadsSync +{ + gsize owner; /* thread ID */ + guint32 nest; +#ifdef HAVE_MOVING_COLLECTOR + gint32 hash_code; +#endif + volatile gint32 entry_count; + HANDLE entry_sem; + GSList *wait_list; + void *data; +}; + + MONO_API void mono_locks_dump (gboolean include_untaken); void mono_monitor_init (void) MONO_INTERNAL; diff --git a/mono/metadata/mono-basic-block.h b/mono/metadata/mono-basic-block.h index 77abd7a469..18457249d1 100644 --- a/mono/metadata/mono-basic-block.h +++ b/mono/metadata/mono-basic-block.h @@ -2,7 +2,9 @@ #define __MONO_METADATA_BASIC_BLOCK_H__ #include - +#include +#include +#include G_BEGIN_DECLS @@ -16,7 +18,6 @@ struct _MonoSimpleBasicBlock { unsigned dead : 1; }; - MonoSimpleBasicBlock* mono_basic_block_split (MonoMethod *method, MonoError *error) MONO_INTERNAL; diff --git a/mono/metadata/mono-debug.c b/mono/metadata/mono-debug.c index df012ee827..5e5173f932 100644 --- a/mono/metadata/mono-debug.c +++ b/mono/metadata/mono-debug.c @@ -639,7 +639,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma g_assert (size < max_size); total_size = size + sizeof (MonoDebugMethodAddress); - if (method->dynamic) { + if (method_is_dynamic (method)) { address = g_malloc0 (total_size); } else { address = (MonoDebugMethodAddress *) allocate_data_item ( @@ -682,7 +682,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma g_hash_table_insert (table->method_address_hash, method, address); - if (!method->dynamic) + if (!method_is_dynamic (method)) write_data_item (table, (guint8 *) address); mono_debugger_unlock (); @@ -700,7 +700,7 @@ mono_debug_remove_method (MonoMethod *method, MonoDomain *domain) if (!mono_debug_initialized) return; - g_assert (method->dynamic); + g_assert (method_is_dynamic (method)); mono_debugger_lock (); diff --git a/mono/metadata/mono-hash.c b/mono/metadata/mono-hash.c index a5f3ff809a..49fac50c68 100644 --- a/mono/metadata/mono-hash.c +++ b/mono/metadata/mono-hash.c @@ -68,7 +68,7 @@ struct _MonoGHashTable { #ifdef HAVE_SGEN_GC static void *table_hash_descr = NULL; -static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func); +static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data); static Slot* new_slot (MonoGHashTable *hash) @@ -481,7 +481,7 @@ mono_g_hash_table_print_stats (MonoGHashTable *table) /* GC marker function */ static void -mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func) +mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data) { MonoGHashTable *table = (MonoGHashTable*)addr; Slot *node; @@ -491,23 +491,23 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func) for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->key) - mark_func (&node->key); + mark_func (&node->key, gc_data); } } } else if (table->gc_type == MONO_HASH_VALUE_GC) { for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->value) - mark_func (&node->value); + mark_func (&node->value, gc_data); } } } else if (table->gc_type == MONO_HASH_KEY_VALUE_GC) { for (i = 0; i < table->table_size; i++) { for (node = table->table [i]; node; node = node->next) { if (node->key) - mark_func (&node->key); + mark_func (&node->key, gc_data); if (node->value) - mark_func (&node->value); + mark_func (&node->value, gc_data); } } } diff --git a/mono/metadata/null-gc.c b/mono/metadata/null-gc.c index 6115ec14eb..397f3849f3 100644 --- a/mono/metadata/null-gc.c +++ b/mono/metadata/null-gc.c @@ -20,13 +20,19 @@ void mono_gc_base_init (void) { MonoThreadInfoCallbacks cb; + int dummy; memset (&cb, 0, sizeof (cb)); - cb.mono_method_is_critical = mono_runtime_is_critical_method; + /* TODO: This casts away an incompatible pointer type warning in the same + manner that boehm-gc does it. This is probably worth investigating + more carefully. */ + cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method; cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create; cb.thread_exit = mono_gc_pthread_exit; mono_threads_init (&cb, sizeof (MonoThreadInfo)); + + mono_thread_info_attach (&dummy); } void @@ -379,7 +385,7 @@ mono_gc_conservatively_scan_area (void *start, void *end) } void * -mono_gc_scan_object (void *obj) +mono_gc_scan_object (void *obj, void *gc_data) { g_assert_not_reached (); return NULL; diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h index 2e03407768..9ec3893765 100644 --- a/mono/metadata/object-internals.h +++ b/mono/metadata/object-internals.h @@ -596,6 +596,7 @@ typedef struct { void (*set_cast_details) (MonoClass *from, MonoClass *to); void (*debug_log) (int level, MonoString *category, MonoString *message); gboolean (*debug_log_is_enabled) (void); + gboolean (*tls_key_supported) (MonoTlsKey key); } MonoRuntimeCallbacks; typedef gboolean (*MonoInternalStackWalk) (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer data); @@ -647,7 +648,7 @@ void mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoArray *out_args) MONO_INTERNAL; void -mono_delegate_ctor_with_method (MonoObject *this, MonoObject *target, gpointer addr, MonoMethod *method) MONO_INTERNAL; +mono_delegate_ctor_with_method (MonoObject *this_obj, MonoObject *target, gpointer addr, MonoMethod *method) MONO_INTERNAL; void mono_delegate_ctor (MonoObject *this_obj, MonoObject *target, gpointer addr) MONO_INTERNAL; @@ -1476,7 +1477,7 @@ void mono_array_full_copy (MonoArray *src, MonoArray *dest) MONO_INTERNAL; gboolean -mono_array_calc_byte_len (MonoClass *class, uintptr_t len, uintptr_t *res) MONO_INTERNAL; +mono_array_calc_byte_len (MonoClass *klass, uintptr_t len, uintptr_t *res) MONO_INTERNAL; #ifndef DISABLE_REMOTING MonoObject * @@ -1567,7 +1568,7 @@ void mono_runtime_unhandled_exception_policy_set (MonoRuntimeUnhandledExceptionPolicy policy) MONO_INTERNAL; MonoVTable * -mono_class_try_get_vtable (MonoDomain *domain, MonoClass *class) MONO_INTERNAL; +mono_class_try_get_vtable (MonoDomain *domain, MonoClass *klass) MONO_INTERNAL; MonoException * mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception) MONO_INTERNAL; @@ -1576,16 +1577,16 @@ void mono_method_clear_object (MonoDomain *domain, MonoMethod *method) MONO_INTERNAL; void -mono_class_compute_gc_descriptor (MonoClass *class) MONO_INTERNAL; +mono_class_compute_gc_descriptor (MonoClass *klass) MONO_INTERNAL; gsize* -mono_class_compute_bitmap (MonoClass *class, gsize *bitmap, int size, int offset, int *max_set, gboolean static_fields) MONO_INTERNAL; +mono_class_compute_bitmap (MonoClass *klass, gsize *bitmap, int size, int offset, int *max_set, gboolean static_fields) MONO_INTERNAL; MonoObject* mono_object_xdomain_representation (MonoObject *obj, MonoDomain *target_domain, MonoObject **exc) MONO_INTERNAL; gboolean -mono_class_is_reflection_method_or_constructor (MonoClass *class) MONO_INTERNAL; +mono_class_is_reflection_method_or_constructor (MonoClass *klass) MONO_INTERNAL; MonoObject * mono_get_object_from_blob (MonoDomain *domain, MonoType *type, const char *blob) MONO_INTERNAL; diff --git a/mono/metadata/object-offsets.h b/mono/metadata/object-offsets.h new file mode 100644 index 0000000000..f50cba1a64 --- /dev/null +++ b/mono/metadata/object-offsets.h @@ -0,0 +1,231 @@ +/* +This is a parameterized header. It's supposed/ok to be included multiple times. + +Input defines: (those to be defined by the includer file) + +Required: +DECL_OFFSET(struct,field) +DECL_OFFSET2(struct,field,offset) +DECL_ALIGN(name,type) +DECL_ALIGN2(name,alignment) + +Optional: +USE_CROSS_COMPILE_OFFSETS - if defined, force the cross compiler offsets to be used, otherwise + they will only be used if MONO_CROSS_COMPILE is defined + +Output defines: + +HAS_CROSS_COMPILER_OFFSETS - if set, it means we found some cross offsets, it doesnt mean we'll use it. +USED_CROSS_COMPILER_OFFSETS - if set, it means we used the cross offsets +*/ + + +#undef HAS_CROSS_COMPILER_OFFSETS +#undef USED_CROSS_COMPILER_OFFSETS + +#ifdef ENABLE_EXTENSION_MODULE +#include "../../../mono-extensions/mono/metadata/object-offsets.h" +#endif + + +#ifndef USED_CROSS_COMPILER_OFFSETS + +DECL_ALIGN(gint8) +DECL_ALIGN(gint16) +DECL_ALIGN(gint32) +DECL_ALIGN(gint64) +DECL_ALIGN(float) +DECL_ALIGN(double) +DECL_ALIGN(gpointer) + +#ifndef DISABLE_METADATA_OFFSETS +//object offsets +DECL_OFFSET(MonoObject, vtable) +DECL_OFFSET(MonoObject, synchronisation) + +DECL_OFFSET(MonoClass, interface_bitmap) +DECL_OFFSET(MonoClass, byval_arg) +DECL_OFFSET(MonoClass, cast_class) +DECL_OFFSET(MonoClass, element_class) +DECL_OFFSET(MonoClass, idepth) +DECL_OFFSET(MonoClass, instance_size) +DECL_OFFSET(MonoClass, interface_id) +DECL_OFFSET(MonoClass, max_interface_id) +DECL_OFFSET(MonoClass, parent) +DECL_OFFSET(MonoClass, rank) +DECL_OFFSET(MonoClass, sizes) +DECL_OFFSET(MonoClass, supertypes) + +DECL_OFFSET(MonoVTable, klass) +DECL_OFFSET(MonoVTable, max_interface_id) +DECL_OFFSET(MonoVTable, interface_bitmap) +DECL_OFFSET(MonoVTable, vtable) +DECL_OFFSET(MonoVTable, rank) +DECL_OFFSET(MonoVTable, type) +DECL_OFFSET(MonoVTable, runtime_generic_context) + +DECL_OFFSET(MonoDomain, stack_overflow_ex) + +DECL_OFFSET(MonoDelegate, target) +DECL_OFFSET(MonoDelegate, method_ptr) +DECL_OFFSET(MonoDelegate, invoke_impl) +DECL_OFFSET(MonoDelegate, method) +DECL_OFFSET(MonoDelegate, method_code) + +DECL_OFFSET(MonoInternalThread, tid) +DECL_OFFSET(MonoInternalThread, static_data) + +DECL_OFFSET(MonoMulticastDelegate, prev) + +DECL_OFFSET(MonoTransparentProxy, rp) +DECL_OFFSET(MonoTransparentProxy, remote_class) +DECL_OFFSET(MonoTransparentProxy, custom_type_info) + +DECL_OFFSET(MonoRealProxy, target_domain_id) +DECL_OFFSET(MonoRealProxy, context) +DECL_OFFSET(MonoRealProxy, unwrapped_server) + +DECL_OFFSET(MonoRemoteClass, proxy_class) + +DECL_OFFSET(MonoArray, vector) +DECL_OFFSET(MonoArray, max_length) +DECL_OFFSET(MonoArray, bounds) + +DECL_OFFSET(MonoArrayBounds, lower_bound) +DECL_OFFSET(MonoArrayBounds, length) + +DECL_OFFSET(MonoSafeHandle, handle) + +DECL_OFFSET(MonoHandleRef, handle) + +DECL_OFFSET(MonoComInteropProxy, com_object) + +DECL_OFFSET(MonoString, length) +DECL_OFFSET(MonoString, chars) + +DECL_OFFSET(MonoException, message) + +DECL_OFFSET(MonoTypedRef, type) +DECL_OFFSET(MonoTypedRef, klass) +DECL_OFFSET(MonoTypedRef, value) + +//Internal structs +DECL_OFFSET(MonoThreadsSync, owner) +DECL_OFFSET(MonoThreadsSync, nest) +DECL_OFFSET(MonoThreadsSync, entry_count) + +#if defined (HAVE_SGEN_GC) && !defined (HAVE_KW_THREAD) +DECL_OFFSET(SgenThreadInfo, tlab_next_addr) +DECL_OFFSET(SgenThreadInfo, tlab_temp_end) +#endif + +#endif //DISABLE METADATA OFFSETS + +#ifndef DISABLE_JIT_OFFSETS +DECL_OFFSET(MonoLMF, previous_lmf) + +DECL_OFFSET(MonoMethodRuntimeGenericContext, class_vtable) + +DECL_OFFSET(MonoJitTlsData, lmf) +DECL_OFFSET(MonoJitTlsData, class_cast_from) +DECL_OFFSET(MonoJitTlsData, class_cast_to) +DECL_OFFSET(MonoJitTlsData, handler_block_return_address) +DECL_OFFSET(MonoJitTlsData, restore_stack_prot) + +DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, locals_size) +DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, entries) //XXX more to fix here + +DECL_OFFSET(MonoContinuation, stack_used_size) +DECL_OFFSET(MonoContinuation, saved_stack) +DECL_OFFSET(MonoContinuation, return_sp) +DECL_OFFSET(MonoContinuation, lmf) +DECL_OFFSET(MonoContinuation, return_ip) + +#ifdef TARGET_X86 +DECL_OFFSET(MonoContext, eax) +DECL_OFFSET(MonoContext, ebx) +DECL_OFFSET(MonoContext, ecx) +DECL_OFFSET(MonoContext, edx) +DECL_OFFSET(MonoContext, edi) +DECL_OFFSET(MonoContext, esi) +DECL_OFFSET(MonoContext, esp) +DECL_OFFSET(MonoContext, ebp) +DECL_OFFSET(MonoContext, eip) + +DECL_OFFSET(MonoLMF, method) +DECL_OFFSET(MonoLMF, lmf_addr) +DECL_OFFSET(MonoLMF, esp) +DECL_OFFSET(MonoLMF, ebx) +DECL_OFFSET(MonoLMF, edi) +DECL_OFFSET(MonoLMF, esi) +DECL_OFFSET(MonoLMF, ebp) +DECL_OFFSET(MonoLMF, eip) +#endif + +#ifdef TARGET_ARM +DECL_OFFSET (MonoContext, pc) +DECL_OFFSET (MonoContext, regs) +DECL_OFFSET (MonoContext, fregs) + +DECL_OFFSET(MonoLMF, method) +DECL_OFFSET(MonoLMF, lmf_addr) +DECL_OFFSET(MonoLMF, sp) +DECL_OFFSET(MonoLMF, fp) +DECL_OFFSET(MonoLMF, ip) +DECL_OFFSET(MonoLMF, iregs) +DECL_OFFSET(MonoLMF, fregs) + +DECL_OFFSET(SeqPointInfo, bp_addrs) +DECL_OFFSET(SeqPointInfo, ss_trigger_page) + +DECL_OFFSET(DynCallArgs, res) +DECL_OFFSET(DynCallArgs, res2) +#endif + +#ifdef TARGET_AMD64 +DECL_OFFSET(MonoContext, rax) +DECL_OFFSET(MonoContext, rcx) +DECL_OFFSET(MonoContext, rdx) +DECL_OFFSET(MonoContext, rbx) +DECL_OFFSET(MonoContext, rbp) +DECL_OFFSET(MonoContext, rsi) +DECL_OFFSET(MonoContext, rdi) +DECL_OFFSET(MonoContext, rsp) +DECL_OFFSET(MonoContext, r8) +DECL_OFFSET(MonoContext, r9) +DECL_OFFSET(MonoContext, r10) +DECL_OFFSET(MonoContext, r12) +DECL_OFFSET(MonoContext, r13) +DECL_OFFSET(MonoContext, r14) +DECL_OFFSET(MonoContext, r15) +DECL_OFFSET(MonoContext, rip) + +#ifdef TARGET_WIN32 +DECL_OFFSET(MonoLMF, lmf_addr) +#endif + +DECL_OFFSET(MonoLMF, rsp) +DECL_OFFSET(MonoLMF, rbp) +DECL_OFFSET(MonoLMF, rip) + +DECL_OFFSET(SeqPointInfo, bp_addrs) +DECL_OFFSET(DynCallArgs, res) +DECL_OFFSET(SeqPointInfo, ss_trigger_page) + +DECL_OFFSET(MonoLMFTramp, regs) +DECL_OFFSET(MonoLMFTramp, lmf_addr) + +#endif + +DECL_OFFSET(MonoDelegateTrampInfo, invoke_impl) +DECL_OFFSET(MonoDelegateTrampInfo, method_ptr) + +#endif + +#endif + +#undef DECL_OFFSET +#undef DECL_OFFSET2 +#undef DECL_ALIGN +#undef DECL_ALIGN2 +#undef USE_CROSS_COMPILE_OFFSETS diff --git a/mono/metadata/object.c.REMOVED.git-id b/mono/metadata/object.c.REMOVED.git-id index 40db25974d..053bffbaef 100644 --- a/mono/metadata/object.c.REMOVED.git-id +++ b/mono/metadata/object.c.REMOVED.git-id @@ -1 +1 @@ -a9a86706f234a79c35762e85c190bd477cc81fc4 \ No newline at end of file +305a48820b980825278dd59f8c6005160cab9611 \ No newline at end of file diff --git a/mono/metadata/object.h b/mono/metadata/object.h index 0f96cf7ecc..8a62a1e10e 100644 --- a/mono/metadata/object.h +++ b/mono/metadata/object.h @@ -26,7 +26,7 @@ typedef struct _MonoDynamicImage MonoDynamicImage; typedef struct _MonoReflectionMethodBody MonoReflectionMethodBody; typedef struct _MonoAppContext MonoAppContext; -typedef struct { +typedef struct _MonoObject { MonoVTable *vtable; MonoThreadsSync *synchronisation; } MonoObject; diff --git a/mono/metadata/process.c b/mono/metadata/process.c index 658c43375e..c9e0f8bf63 100755 --- a/mono/metadata/process.c +++ b/mono/metadata/process.c @@ -23,9 +23,6 @@ #include #include #include -#if defined (MINGW_CROSS_COMPILE) && defined (HAVE_GETPROCESSID) -#undef HAVE_GETPROCESSID -#endif #ifndef HAVE_GETPROCESSID #if defined(_MSC_VER) || defined(HAVE_WINTERNL_H) #include diff --git a/mono/metadata/process.h b/mono/metadata/process.h index fb184a774b..96ea93b888 100644 --- a/mono/metadata/process.h +++ b/mono/metadata/process.h @@ -60,13 +60,13 @@ G_BEGIN_DECLS HANDLE ves_icall_System_Diagnostics_Process_GetProcess_internal (guint32 pid) MONO_INTERNAL; MonoArray *ves_icall_System_Diagnostics_Process_GetProcesses_internal (void) MONO_INTERNAL; guint32 ves_icall_System_Diagnostics_Process_GetPid_internal (void) MONO_INTERNAL; -void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this, HANDLE process) MONO_INTERNAL; -MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this, HANDLE process) MONO_INTERNAL; -void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this, MonoString *filename) MONO_INTERNAL; +void ves_icall_System_Diagnostics_Process_Process_free_internal (MonoObject *this_obj, HANDLE process) MONO_INTERNAL; +MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject *this_obj, HANDLE process) MONO_INTERNAL; +void ves_icall_System_Diagnostics_FileVersionInfo_GetVersionInfo_internal (MonoObject *this_obj, MonoString *filename) MONO_INTERNAL; MonoBoolean ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoProcessStartInfo *proc_start_info, MonoProcInfo *process_handle) MONO_INTERNAL; MonoBoolean ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInfo *proc_start_info, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_handle) MONO_INTERNAL; -MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL; -MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this, HANDLE process, gint32 ms) MONO_INTERNAL; +MonoBoolean ves_icall_System_Diagnostics_Process_WaitForExit_internal (MonoObject *this_obj, HANDLE process, gint32 ms) MONO_INTERNAL; +MonoBoolean ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal (MonoObject *this_obj, HANDLE process, gint32 ms) MONO_INTERNAL; gint64 ves_icall_System_Diagnostics_Process_ExitTime_internal (HANDLE process) MONO_INTERNAL; gint64 ves_icall_System_Diagnostics_Process_StartTime_internal (HANDLE process) MONO_INTERNAL; gint32 ves_icall_System_Diagnostics_Process_ExitCode_internal (HANDLE process) MONO_INTERNAL; diff --git a/mono/metadata/rand.c b/mono/metadata/rand.c index 4ed1203f85..77d152d5a6 100644 --- a/mono/metadata/rand.c +++ b/mono/metadata/rand.c @@ -44,8 +44,8 @@ get_entropy_from_server (const char *path, guchar *buf, int len) ret = -1; else { egd_addr.sun_family = AF_UNIX; - strncpy (egd_addr.sun_path, path, MONO_SIZEOF_SUNPATH - 1); - egd_addr.sun_path [MONO_SIZEOF_SUNPATH-1] = '\0'; + strncpy (egd_addr.sun_path, path, sizeof(egd_addr.sun_path) - 1); + egd_addr.sun_path [sizeof(egd_addr.sun_path)-1] = '\0'; ret = connect (file, (struct sockaddr *)&egd_addr, sizeof(egd_addr)); } if (ret == -1) { diff --git a/mono/metadata/rand.h b/mono/metadata/rand.h index 96b4efe76f..76864ca31c 100644 --- a/mono/metadata/rand.h +++ b/mono/metadata/rand.h @@ -12,6 +12,7 @@ #ifndef _MONO_METADATA_RAND_H_ #define _MONO_METADATA_RAND_H_ +#include #include #include "mono/utils/mono-compiler.h" diff --git a/mono/metadata/reflection.c.REMOVED.git-id b/mono/metadata/reflection.c.REMOVED.git-id index eb19514348..32619bb719 100644 --- a/mono/metadata/reflection.c.REMOVED.git-id +++ b/mono/metadata/reflection.c.REMOVED.git-id @@ -1 +1 @@ -089867768b97f2b0c88d2b48fe63c8ba327f74ec \ No newline at end of file +d6dd94c8104a77361dd7e82d80ed45b0ca41a05b \ No newline at end of file diff --git a/mono/metadata/reflection.h b/mono/metadata/reflection.h index 0301342806..a080809959 100644 --- a/mono/metadata/reflection.h +++ b/mono/metadata/reflection.h @@ -134,6 +134,8 @@ MONO_API MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, u MONO_API MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype); +MONO_API MonoAssembly* mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly); + MONO_END_DECLS #endif /* __METADATA_REFLECTION_H__ */ diff --git a/mono/metadata/runtime.h b/mono/metadata/runtime.h index 83f17b7d33..42b8d7d3d7 100644 --- a/mono/metadata/runtime.h +++ b/mono/metadata/runtime.h @@ -10,7 +10,10 @@ #ifndef _MONO_METADATA_RUNTIME_H_ #define _MONO_METADATA_RUNTIME_H_ +#include +#include #include +#include MONO_BEGIN_DECLS diff --git a/mono/metadata/security-core-clr.h b/mono/metadata/security-core-clr.h index 126a48da2c..987f745968 100644 --- a/mono/metadata/security-core-clr.h +++ b/mono/metadata/security-core-clr.h @@ -10,7 +10,9 @@ #ifndef _MONO_METADATA_SECURITY_CORE_CLR_H_ #define _MONO_METADATA_SECURITY_CORE_CLR_H_ +#include #include +#include typedef enum { /* We compare these values as integers, so the order must not @@ -37,8 +39,8 @@ typedef enum { extern gboolean mono_security_core_clr_test; -extern void mono_security_core_clr_check_inheritance (MonoClass *class) MONO_INTERNAL; -extern void mono_security_core_clr_check_override (MonoClass *class, MonoMethod *override, MonoMethod *base) MONO_INTERNAL; +extern void mono_security_core_clr_check_inheritance (MonoClass *klass) MONO_INTERNAL; +extern void mono_security_core_clr_check_override (MonoClass *klass, MonoMethod *override, MonoMethod *base) MONO_INTERNAL; extern void mono_security_core_clr_ensure_reflection_access_field (MonoClassField *field) MONO_INTERNAL; extern void mono_security_core_clr_ensure_reflection_access_method (MonoMethod *method) MONO_INTERNAL; @@ -50,7 +52,7 @@ extern gboolean mono_security_core_clr_can_access_internals (MonoImage *accessin extern MonoException* mono_security_core_clr_is_field_access_allowed (MonoMethod *caller, MonoClassField *field) MONO_INTERNAL; extern MonoException* mono_security_core_clr_is_call_allowed (MonoMethod *caller, MonoMethod *callee) MONO_INTERNAL; -extern MonoSecurityCoreCLRLevel mono_security_core_clr_class_level (MonoClass *class) MONO_INTERNAL; +extern MonoSecurityCoreCLRLevel mono_security_core_clr_class_level (MonoClass *klass) MONO_INTERNAL; extern MonoSecurityCoreCLRLevel mono_security_core_clr_method_level (MonoMethod *method, gboolean with_class_level) MONO_INTERNAL; extern gboolean mono_security_core_clr_is_platform_image (MonoImage *image) MONO_INTERNAL; diff --git a/mono/metadata/security.h b/mono/metadata/security.h index 6158ac820d..f30f5e82e1 100644 --- a/mono/metadata/security.h +++ b/mono/metadata/security.h @@ -11,7 +11,10 @@ #ifndef _MONO_METADATA_SECURITY_H_ #define _MONO_METADATA_SECURITY_H_ +#include #include +#include +#include G_BEGIN_DECLS diff --git a/mono/metadata/sgen-alloc.c b/mono/metadata/sgen-alloc.c index 6eb71c13c3..254f15d5bb 100644 --- a/mono/metadata/sgen-alloc.c +++ b/mono/metadata/sgen-alloc.c @@ -45,6 +45,7 @@ #include "metadata/profiler-private.h" #include "metadata/marshal.h" #include "metadata/method-builder.h" +#include "metadata/abi-details.h" #include "utils/mono-memory-model.h" #include "utils/mono-counters.h" @@ -117,15 +118,15 @@ alloc_degraded (MonoVTable *vtable, size_t size, gboolean for_mature) void *p; if (!for_mature) { - if (last_major_gc_warned < stat_major_gcs) { + if (last_major_gc_warned < gc_stats.major_gc_count) { ++num_degraded; if (num_degraded == 1 || num_degraded == 3) mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Degraded allocation. Consider increasing nursery-size if the warning persists."); else if (num_degraded == 10) mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Repeated degraded allocation. Consider increasing nursery-size."); - last_major_gc_warned = stat_major_gcs; + last_major_gc_warned = gc_stats.major_gc_count; } - InterlockedExchangeAdd (°raded_mode, size); + SGEN_ATOMIC_ADD_P (degraded_mode, size); sgen_ensure_free_space (size); } else { if (sgen_need_major_collection (size)) @@ -283,7 +284,7 @@ mono_gc_alloc_obj_nolock (MonoVTable *vtable, size_t size) if (degraded_mode && degraded_mode < DEFAULT_NURSERY_SIZE) return alloc_degraded (vtable, size, FALSE); - available_in_tlab = TLAB_REAL_END - TLAB_NEXT; + available_in_tlab = (int)(TLAB_REAL_END - TLAB_NEXT);//We'll never have tlabs > 2Gb if (size > tlab_size || available_in_tlab > SGEN_MAX_NURSERY_WASTE) { /* Allocate directly from the nursery */ do { @@ -396,7 +397,7 @@ mono_gc_try_alloc_obj_nolock (MonoVTable *vtable, size_t size) new_next = (char*)p + size; real_end = TLAB_REAL_END; - available_in_tlab = real_end - (char*)p; + available_in_tlab = (int)(real_end - (char*)p);//We'll never have tlabs > 2Gb if (G_LIKELY (new_next < real_end)) { TLAB_NEXT = new_next; @@ -508,7 +509,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length) arr = mono_gc_try_alloc_obj_nolock (vtable, size); if (arr) { /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/ - arr->max_length = max_length; + arr->max_length = (mono_array_size_t)max_length; EXIT_CRITICAL_REGION; return arr; } @@ -523,7 +524,7 @@ mono_gc_alloc_vector (MonoVTable *vtable, size_t size, uintptr_t max_length) return mono_gc_out_of_memory (size); } - arr->max_length = max_length; + arr->max_length = (mono_array_size_t)max_length; UNLOCK_GC; @@ -545,7 +546,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint arr = mono_gc_try_alloc_obj_nolock (vtable, size); if (arr) { /*This doesn't require fencing since EXIT_CRITICAL_REGION already does it for us*/ - arr->max_length = max_length; + arr->max_length = (mono_array_size_t)max_length; bounds = (MonoArrayBounds*)((char*)arr + size - bounds_size); arr->bounds = bounds; @@ -563,7 +564,7 @@ mono_gc_alloc_array (MonoVTable *vtable, size_t size, uintptr_t max_length, uint return mono_gc_out_of_memory (size); } - arr->max_length = max_length; + arr->max_length = (mono_array_size_t)max_length; bounds = (MonoArrayBounds*)((char*)arr + size - bounds_size); arr->bounds = bounds; @@ -797,10 +798,10 @@ create_allocator (int atype) if (atype == ATYPE_NORMAL || atype == ATYPE_SMALL) { /* size = vtable->klass->instance_size; */ mono_mb_emit_ldarg (mb, 0); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, instance_size)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, instance_size)); mono_mb_emit_byte (mb, CEE_ADD); /* FIXME: assert instance_size stays a 4 byte integer */ mono_mb_emit_byte (mb, CEE_LDIND_U4); @@ -840,10 +841,10 @@ create_allocator (int atype) /* vtable->klass->sizes.element_size */ mono_mb_emit_ldarg (mb, 0); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_I); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, sizes.element_size)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, sizes)); mono_mb_emit_byte (mb, CEE_ADD); mono_mb_emit_byte (mb, CEE_LDIND_U4); mono_mb_emit_byte (mb, CEE_CONV_I); @@ -940,7 +941,7 @@ create_allocator (int atype) /* tlab_next_addr (local) = tlab_next_addr (TLS var) */ tlab_next_addr_var = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg); - EMIT_TLS_ACCESS (mb, tlab_next_addr, TLS_KEY_SGEN_TLAB_NEXT_ADDR); + EMIT_TLS_ACCESS_NEXT_ADDR (mb); mono_mb_emit_stloc (mb, tlab_next_addr_var); /* p = (void**)tlab_next; */ @@ -959,7 +960,7 @@ create_allocator (int atype) /* if (G_LIKELY (new_next < tlab_temp_end)) */ mono_mb_emit_ldloc (mb, new_next_var); - EMIT_TLS_ACCESS (mb, tlab_temp_end, TLS_KEY_SGEN_TLAB_TEMP_END); + EMIT_TLS_ACCESS_TEMP_END (mb); slowpath_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLT_UN_S); /* Slowpath */ @@ -997,7 +998,7 @@ create_allocator (int atype) /*The tlab store must be visible before the the vtable store. This could be replaced with a DDS but doing it with IL would be tricky. */ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); - mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, StoreStoreBarrier); + mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, (gpointer)StoreStoreBarrier); /* *p = vtable; */ mono_mb_emit_ldloc (mb, p_var); @@ -1007,7 +1008,7 @@ create_allocator (int atype) if (atype == ATYPE_VECTOR) { /* arr->max_length = max_length; */ mono_mb_emit_ldloc (mb, p_var); - mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, max_length)); + mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, max_length)); mono_mb_emit_ldarg (mb, 1); #ifdef MONO_BIG_ARRAYS mono_mb_emit_byte (mb, CEE_STIND_I); @@ -1018,7 +1019,7 @@ create_allocator (int atype) /* need to set length and clear the last char */ /* s->length = len; */ mono_mb_emit_ldloc (mb, p_var); - mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, length)); + mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoString, length)); mono_mb_emit_byte (mb, MONO_CEE_ADD); mono_mb_emit_ldarg (mb, 1); mono_mb_emit_byte (mb, MONO_CEE_STIND_I4); @@ -1036,7 +1037,7 @@ create_allocator (int atype) We must make sure both vtable and max_length are globaly visible before returning to managed land. */ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); - mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, StoreStoreBarrier); + mono_mb_emit_op (mb, CEE_MONO_MEMORY_BARRIER, (gpointer)StoreStoreBarrier); /* return p */ mono_mb_emit_ldloc (mb, p_var); diff --git a/mono/metadata/sgen-bridge.c b/mono/metadata/sgen-bridge.c index 1c36c29292..4d7dd6f4bf 100644 --- a/mono/metadata/sgen-bridge.c +++ b/mono/metadata/sgen-bridge.c @@ -270,7 +270,8 @@ sgen_bridge_register_finalized_object (MonoObject *obj) void sgen_bridge_describe_pointer (MonoObject *obj) { - bridge_processor.describe_pointer (obj); + if (bridge_processor.describe_pointer) + bridge_processor.describe_pointer (obj); } static void diff --git a/mono/metadata/sgen-bridge.h b/mono/metadata/sgen-bridge.h index 8bfeb09a6d..daa071e9d6 100644 --- a/mono/metadata/sgen-bridge.h +++ b/mono/metadata/sgen-bridge.h @@ -56,7 +56,7 @@ typedef struct { typedef struct { int bridge_version; - MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *class); + MonoGCBridgeObjectKind (*bridge_class_kind) (MonoClass *klass); mono_bool (*is_bridge_object) (MonoObject *object); void (*cross_references) (int num_sccs, MonoGCBridgeSCC **sccs, int num_xrefs, MonoGCBridgeXRef *xrefs); } MonoGCBridgeCallbacks; diff --git a/mono/metadata/sgen-cardtable.c b/mono/metadata/sgen-cardtable.c index 51f72fe87a..aab3bcb615 100644 --- a/mono/metadata/sgen-cardtable.c +++ b/mono/metadata/sgen-cardtable.c @@ -45,6 +45,8 @@ #endif #include +#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size)) + guint8 *sgen_cardtable; static gboolean need_mod_union; @@ -238,7 +240,7 @@ sgen_card_table_get_card_data (guint8 *data_dest, mword address, mword cards) #endif } - return mask; + return mask != 0; } void* @@ -585,7 +587,7 @@ sgen_cardtable_scan_object (char *obj, mword block_obj_size, guint8 *cards, gboo mword obj_size = sgen_par_object_get_size (vt, (MonoObject*)obj); char *obj_end = obj + obj_size; size_t card_count; - int extra_idx = 0; + size_t extra_idx = 0; MonoArray *arr = (MonoArray*)obj; mword desc = (mword)klass->element_class->gc_descr; @@ -624,8 +626,8 @@ LOOP_HEAD: card_data = find_next_card (card_data, card_data_end); for (; card_data < card_data_end; card_data = find_next_card (card_data + 1, card_data_end)) { - int index; - int idx = (card_data - card_base) + extra_idx; + size_t index; + size_t idx = (card_data - card_base) + extra_idx; char *start = (char*)(obj_start + idx * CARD_SIZE_IN_BYTES); char *card_end = start + CARD_SIZE_IN_BYTES; char *first_elem, *elem; diff --git a/mono/metadata/sgen-conf.h b/mono/metadata/sgen-conf.h index d22d92130e..f44a4d4ace 100644 --- a/mono/metadata/sgen-conf.h +++ b/mono/metadata/sgen-conf.h @@ -22,6 +22,8 @@ #ifndef __MONO_SGENCONF_H__ #define __MONO_SGENCONF_H__ +#include + /*Basic defines and static tunables */ #if SIZEOF_VOID_P == 4 diff --git a/mono/metadata/sgen-debug.c b/mono/metadata/sgen-debug.c index e084b5ffee..1387676c75 100644 --- a/mono/metadata/sgen-debug.c +++ b/mono/metadata/sgen-debug.c @@ -160,7 +160,7 @@ static gboolean missing_remsets; if (*(ptr) && sgen_ptr_in_nursery ((char*)*(ptr))) { \ if (!sgen_get_remset ()->find_address ((char*)(ptr)) && !sgen_cement_lookup (*(ptr))) { \ SGEN_LOG (0, "Oldspace->newspace reference %p at offset %td in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), ((MonoObject*)(obj))->vtable->klass->name_space, ((MonoObject*)(obj))->vtable->klass->name); \ - binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (char*)(ptr) - (char*)(obj), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \ + binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \ if (!object_is_pinned (*(ptr))) \ missing_remsets = TRUE; \ } \ @@ -220,7 +220,7 @@ is_major_or_los_object_marked (char *obj) if (*(ptr) && !sgen_ptr_in_nursery ((char*)*(ptr)) && !is_major_or_los_object_marked ((char*)*(ptr))) { \ if (!sgen_get_remset ()->find_address_with_cards (start, cards, (char*)(ptr))) { \ SGEN_LOG (0, "major->major reference %p at offset %td in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), ((MonoObject*)(obj))->vtable->klass->name_space, ((MonoObject*)(obj))->vtable->klass->name); \ - binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (char*)(ptr) - (char*)(obj), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \ + binary_protocol_missing_remset ((obj), (gpointer)LOAD_VTABLE ((obj)), (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \ missing_remsets = TRUE; \ } \ } \ @@ -640,7 +640,7 @@ static MonoObject *check_key = NULL; static RootRecord *check_root = NULL; static void -check_root_obj_specific_ref_from_marker (void **obj) +check_root_obj_specific_ref_from_marker (void **obj, void *gc_data) { check_root_obj_specific_ref (check_root, check_key, *obj); } @@ -669,7 +669,7 @@ scan_roots_for_specific_ref (MonoObject *key, int root_type) return; case ROOT_DESC_COMPLEX: { gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc); - int bwords = (*bitmap_data) - 1; + int bwords = (int) ((*bitmap_data) - 1); void **start_run = start_root; bitmap_data++; while (bwords-- > 0) { @@ -687,7 +687,7 @@ scan_roots_for_specific_ref (MonoObject *key, int root_type) } case ROOT_DESC_USER: { MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc); - marker (start_root, check_root_obj_specific_ref_from_marker); + marker (start_root, check_root_obj_specific_ref_from_marker, NULL); break; } case ROOT_DESC_RUN_LEN: @@ -735,6 +735,13 @@ check_obj_not_in_domain (void **o) g_assert (((MonoObject*)(*o))->vtable->domain != check_domain); } + +static void +check_obj_not_in_domain_callback (void **o, void *gc_data) +{ + g_assert (((MonoObject*)(*o))->vtable->domain != check_domain); +} + void sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type) { @@ -761,7 +768,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type) break; case ROOT_DESC_COMPLEX: { gsize *bitmap_data = sgen_get_complex_descriptor_bitmap (desc); - int bwords = (*bitmap_data) - 1; + int bwords = (int)((*bitmap_data) - 1); void **start_run = start_root; bitmap_data++; while (bwords-- > 0) { @@ -779,7 +786,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type) } case ROOT_DESC_USER: { MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc); - marker (start_root, check_obj_not_in_domain); + marker (start_root, check_obj_not_in_domain_callback, NULL); break; } case ROOT_DESC_RUN_LEN: @@ -797,7 +804,7 @@ is_xdomain_ref_allowed (gpointer *ptr, char *obj, MonoDomain *domain) { MonoObject *o = (MonoObject*)(obj); MonoObject *ref = (MonoObject*)*(ptr); - int offset = (char*)(ptr) - (char*)o; + size_t offset = (char*)(ptr) - (char*)o; if (o->vtable->klass == mono_defaults.thread_class && offset == G_STRUCT_OFFSET (MonoThread, internal_thread)) return TRUE; @@ -846,7 +853,7 @@ check_reference_for_xdomain (gpointer *ptr, char *obj, MonoDomain *domain) { MonoObject *o = (MonoObject*)(obj); MonoObject *ref = (MonoObject*)*(ptr); - int offset = (char*)(ptr) - (char*)o; + size_t offset = (char*)(ptr) - (char*)o; MonoClass *class; MonoClassField *field; char *str; @@ -927,6 +934,7 @@ compare_xrefs (const void *a_ptr, const void *b_ptr) return 0; } +/* static void dump_processor_state (SgenBridgeProcessor *p) { @@ -951,6 +959,7 @@ dump_processor_state (SgenBridgeProcessor *p) printf ("-------\n"); } +*/ gboolean sgen_compare_bridge_processor_results (SgenBridgeProcessor *a, SgenBridgeProcessor *b) diff --git a/mono/metadata/sgen-descriptor.c b/mono/metadata/sgen-descriptor.c index 1e3bc152e7..c578a91cfb 100644 --- a/mono/metadata/sgen-descriptor.c +++ b/mono/metadata/sgen-descriptor.c @@ -87,7 +87,7 @@ alloc_complex_descriptor (gsize *bitmap, int numbits) return i; } } - i += complex_descriptors [i]; + i += (int)complex_descriptors [i]; } if (complex_descriptors_next + nwords > complex_descriptors_size) { int new_size = complex_descriptors_size * 2 + nwords; @@ -266,7 +266,7 @@ mono_gc_get_bitmap_for_descr (void *descr, int *numbits) case DESC_TYPE_COMPLEX: { gsize *bitmap_data = sgen_get_complex_descriptor (d); - int bwords = (*bitmap_data) - 1; + int bwords = (int)(*bitmap_data) - 1;//Max scalar object size is 1Mb, which means up to 32k descriptor words int i; bitmap = g_new0 (gsize, bwords); diff --git a/mono/metadata/sgen-descriptor.h b/mono/metadata/sgen-descriptor.h index f07ad4a6ba..366c766777 100644 --- a/mono/metadata/sgen-descriptor.h +++ b/mono/metadata/sgen-descriptor.h @@ -235,7 +235,7 @@ sgen_gc_descr_has_references (mword desc) /* there are pointers */ \ void **_objptr = (void**)(obj); \ gsize *bitmap_data = sgen_get_complex_descriptor ((desc)); \ - int bwords = (*bitmap_data) - 1; \ + gsize bwords = (*bitmap_data) - 1; \ void **start_run = _objptr; \ bitmap_data++; \ if (0) { \ @@ -261,8 +261,8 @@ sgen_gc_descr_has_references (mword desc) #define OBJ_COMPLEX_ARR_FOREACH_PTR(vt,obj) do { \ /* there are pointers */ \ gsize *mbitmap_data = sgen_get_complex_descriptor ((vt)->desc); \ - int mbwords = (*mbitmap_data++) - 1; \ - int el_size = mono_array_element_size (vt->klass); \ + gsize mbwords = (*mbitmap_data++) - 1; \ + gsize el_size = mono_array_element_size (vt->klass); \ char *e_start = (char*)(obj) + G_STRUCT_OFFSET (MonoArray, vector); \ char *e_end = e_start + el_size * mono_array_length_fast ((MonoArray*)(obj)); \ if (0) \ @@ -270,7 +270,7 @@ sgen_gc_descr_has_references (mword desc) while (e_start < e_end) { \ void **_objptr = (void**)e_start; \ gsize *bitmap_data = mbitmap_data; \ - unsigned int bwords = mbwords; \ + gsize bwords = mbwords; \ while (bwords-- > 0) { \ gsize _bmap = *bitmap_data++; \ void **start_run = _objptr; \ diff --git a/mono/metadata/sgen-fin-weak-hash.c b/mono/metadata/sgen-fin-weak-hash.c index bb350a9e91..3793c9435b 100644 --- a/mono/metadata/sgen-fin-weak-hash.c +++ b/mono/metadata/sgen-fin-weak-hash.c @@ -41,7 +41,7 @@ int num_ready_finalizers = 0; static int no_finalize = 0; #define DISLINK_OBJECT(l) (REVEAL_POINTER (*(void**)(l))) -#define DISLINK_TRACK(l) ((~(gulong)(*(void**)(l))) & 1) +#define DISLINK_TRACK(l) ((~(size_t)(*(void**)(l))) & 1) /* * The finalizable hash has the object as the key, the diff --git a/mono/metadata/sgen-gc.c.REMOVED.git-id b/mono/metadata/sgen-gc.c.REMOVED.git-id index 441cd9e0e3..2ae9301fcd 100644 --- a/mono/metadata/sgen-gc.c.REMOVED.git-id +++ b/mono/metadata/sgen-gc.c.REMOVED.git-id @@ -1 +1 @@ -6572b737f1e3b8fd00e0d4b318ba02b74909c7b4 \ No newline at end of file +dab50ef57a52c7679e84b07ffd21343b4accd55b \ No newline at end of file diff --git a/mono/metadata/sgen-gc.h b/mono/metadata/sgen-gc.h index 7008cec2f7..3d751d6d0b 100644 --- a/mono/metadata/sgen-gc.h +++ b/mono/metadata/sgen-gc.h @@ -49,6 +49,7 @@ typedef struct _SgenThreadInfo SgenThreadInfo; #include #include #include +#include /* The method used to clear the nursery */ /* Clearing at nursery collections is the safest, but has bad interactions with caches. @@ -143,7 +144,7 @@ struct _GCMemSection { char **scan_starts; /* in major collections indexes in the pin_queue for objects that pin this section */ void **pin_queue_start; - int pin_queue_num_entries; + size_t pin_queue_num_entries; size_t num_scan_start; }; @@ -239,13 +240,19 @@ extern int num_ready_finalizers; #define SGEN_CAN_ALIGN_UP(s) ((s) <= SIZE_MAX - (SGEN_ALLOC_ALIGN - 1)) #define SGEN_ALIGN_UP(s) (((s)+(SGEN_ALLOC_ALIGN-1)) & ~(SGEN_ALLOC_ALIGN-1)) +#if SIZEOF_VOID_P == 4 +#define ONE_P 1 +#else +#define ONE_P 1ll +#endif + /* * The link pointer is hidden by negating each bit. We use the lowest * bit of the link (before negation) to store whether it needs * resurrection tracking. */ -#define HIDE_POINTER(p,t) ((gpointer)(~((gulong)(p)|((t)?1:0)))) -#define REVEAL_POINTER(p) ((gpointer)((~(gulong)(p))&~3L)) +#define HIDE_POINTER(p,t) ((gpointer)(~((size_t)(p)|((t)?1:0)))) +#define REVEAL_POINTER(p) ((gpointer)((~(size_t)(p))&~3L)) #ifdef SGEN_ALIGN_NURSERY #define SGEN_PTR_IN_NURSERY(p,bits,start,end) (((mword)(p) & ~((1 << (bits)) - 1)) == (mword)(start)) @@ -340,26 +347,52 @@ typedef struct { */ #define SGEN_LOAD_VTABLE(addr) ((*(mword*)(addr)) & ~SGEN_VTABLE_BITS_MASK) +static inline MONO_ALWAYS_INLINE void +GRAY_OBJECT_ENQUEUE (SgenGrayQueue *queue, char* obj) +{ #if defined(SGEN_GRAY_OBJECT_ENQUEUE) || SGEN_MAX_DEBUG_LEVEL >= 9 -#define GRAY_OBJECT_ENQUEUE sgen_gray_object_enqueue -#define GRAY_OBJECT_DEQUEUE(queue,o) ((o) = sgen_gray_object_dequeue ((queue))) + sgen_gray_object_enqueue (queue, obj); #else -#define GRAY_OBJECT_ENQUEUE(queue,o) do { \ - if (G_UNLIKELY (!(queue)->first || (queue)->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE)) \ - sgen_gray_object_enqueue ((queue), (o)); \ - else \ - (queue)->first->objects [(queue)->first->end++] = (o); \ - PREFETCH ((o)); \ - } while (0) -#define GRAY_OBJECT_DEQUEUE(queue,o) do { \ - if (!(queue)->first) \ - (o) = NULL; \ - else if (G_UNLIKELY ((queue)->first->end == 1)) \ - (o) = sgen_gray_object_dequeue ((queue)); \ - else \ - (o) = (queue)->first->objects [--(queue)->first->end]; \ - } while (0) + if (G_UNLIKELY (!queue->first || queue->cursor == GRAY_LAST_CURSOR_POSITION (queue->first))) { + sgen_gray_object_enqueue (queue, obj); + } else { + HEAVY_STAT (gc_stats.gray_queue_enqueue_fast_path ++); + + *++queue->cursor = obj; +#ifdef SGEN_HEAVY_BINARY_PROTOCOL + binary_protocol_gray_enqueue (queue, queue->cursor, obj); #endif + } + + PREFETCH (obj); +#endif +} + +static inline MONO_ALWAYS_INLINE void +GRAY_OBJECT_DEQUEUE (SgenGrayQueue *queue, char** obj) +{ +#if defined(SGEN_GRAY_OBJECT_ENQUEUE) || SGEN_MAX_DEBUG_LEVEL >= 9 + *obj = sgen_gray_object_enqueue (queue); +#else + if (!queue->first) { + HEAVY_STAT (gc_stats.gray_queue_dequeue_fast_path ++); + + *obj = NULL; +#ifdef SGEN_HEAVY_BINARY_PROTOCOL + binary_protocol_gray_dequeue (queue, queue->cursor, *obj); +#endif + } else if (G_UNLIKELY (queue->cursor == GRAY_FIRST_CURSOR_POSITION (queue->first))) { + *obj = sgen_gray_object_dequeue (queue); + } else { + HEAVY_STAT (gc_stats.gray_queue_dequeue_fast_path ++); + + *obj = *queue->cursor--; +#ifdef SGEN_HEAVY_BINARY_PROTOCOL + binary_protocol_gray_dequeue (queue, queue->cursor + 1, *obj); +#endif + } +#endif +} /* List of what each bit on of the vtable gc bits means. @@ -367,6 +400,7 @@ List of what each bit on of the vtable gc bits means. enum { SGEN_GC_BIT_BRIDGE_OBJECT = 1, SGEN_GC_BIT_BRIDGE_OPAQUE_OBJECT = 2, + SGEN_GC_BIT_FINALIZER_AWARE = 4, }; /* the runtime can register areas of memory as roots: we keep two lists of roots, @@ -490,7 +524,7 @@ void sgen_free_internal (void *addr, int type) MONO_INTERNAL; void* sgen_alloc_internal_dynamic (size_t size, int type, gboolean assert_on_failure) MONO_INTERNAL; void sgen_free_internal_dynamic (void *addr, size_t size, int type) MONO_INTERNAL; -void** sgen_find_optimized_pin_queue_area (void *start, void *end, int *num) MONO_INTERNAL; +void** sgen_find_optimized_pin_queue_area (void *start, void *end, size_t *num) MONO_INTERNAL; void sgen_find_section_pin_queue_start_end (GCMemSection *section) MONO_INTERNAL; void sgen_pin_objects_in_section (GCMemSection *section, ScanCopyContext ctx) MONO_INTERNAL; @@ -498,7 +532,7 @@ void sgen_pin_stats_register_object (char *obj, size_t size); void sgen_pin_stats_register_global_remset (char *obj); void sgen_pin_stats_print_class_stats (void); -void sgen_sort_addresses (void **array, int size) MONO_INTERNAL; +void sgen_sort_addresses (void **array, size_t size) MONO_INTERNAL; void sgen_add_to_global_remset (gpointer ptr, gpointer obj) MONO_INTERNAL; int sgen_get_current_collection_generation (void) MONO_INTERNAL; @@ -559,14 +593,14 @@ Test 1 (compiling corlib): #define SGEN_TO_SPACE_GRANULE_IN_BYTES (1 << SGEN_TO_SPACE_GRANULE_BITS) extern char *sgen_space_bitmap MONO_INTERNAL; -extern int sgen_space_bitmap_size MONO_INTERNAL; +extern size_t sgen_space_bitmap_size MONO_INTERNAL; static inline gboolean sgen_nursery_is_to_space (char *object) { - int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; - int byte = idx / 8; - int bit = idx & 0x7; + size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; + size_t byte = idx / 8; + size_t bit = idx & 0x7; SGEN_ASSERT (4, sgen_ptr_in_nursery (object), "object %p is not in nursery [%p - %p]", object, sgen_get_nursery_start (), sgen_get_nursery_end ()); SGEN_ASSERT (4, byte < sgen_space_bitmap_size, "byte index %d out of range", byte, sgen_space_bitmap_size); @@ -604,7 +638,7 @@ typedef struct { SgenObjectOperations serial_ops; SgenObjectOperations parallel_ops; - void (*prepare_to_space) (char *to_space_bitmap, int space_bitmap_size); + void (*prepare_to_space) (char *to_space_bitmap, size_t space_bitmap_size); void (*clear_fragments) (void); SgenFragment* (*build_fragments_get_exclude_head) (void); void (*build_fragments_release_exclude_head) (void); @@ -661,8 +695,8 @@ struct _SgenMajorCollector { SgenObjectOperations major_ops; SgenObjectOperations major_concurrent_ops; - void* (*alloc_object) (MonoVTable *vtable, int size, gboolean has_references); - void* (*par_alloc_object) (MonoVTable *vtable, int size, gboolean has_references); + void* (*alloc_object) (MonoVTable *vtable, size_t size, gboolean has_references); + void* (*par_alloc_object) (MonoVTable *vtable, size_t size, gboolean has_references); void (*free_pinned_object) (char *obj, size_t size); void (*iterate_objects) (IterateObjectsFlags flags, IterateObjectCallbackFunc callback, void *data); void (*free_non_pinned_object) (char *obj, size_t size); @@ -685,7 +719,7 @@ struct _SgenMajorCollector { gboolean (*ptr_is_in_non_pinned_space) (char *ptr, char **start); gboolean (*obj_is_from_pinned_alloc) (char *obj); void (*report_pinned_memory_usage) (void); - int (*get_num_major_sections) (void); + size_t (*get_num_major_sections) (void); gboolean (*handle_gc_param) (const char *opt); void (*print_gc_param_usage) (void); gboolean (*is_worker_thread) (MonoNativeThreadId thread); @@ -710,7 +744,7 @@ void sgen_marksweep_conc_init (SgenMajorCollector *collector) MONO_INTERNAL; SgenMajorCollector* sgen_get_major_collector (void) MONO_INTERNAL; -typedef struct { +typedef struct _SgenRemeberedSet { void (*wbarrier_set_field) (MonoObject *obj, gpointer field_ptr, MonoObject* value); void (*wbarrier_set_arrayref) (MonoArray *arr, gpointer slot_ptr, MonoObject* value); void (*wbarrier_arrayref_copy) (gpointer dest_ptr, gpointer src_ptr, int count); @@ -730,7 +764,7 @@ typedef struct { SgenRemeberedSet *sgen_get_remset (void) MONO_INTERNAL; -static guint /*__attribute__((noinline)) not sure if this hint is a good idea*/ +static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/ slow_object_get_size (MonoVTable *vtable, MonoObject* o) { MonoClass *klass = vtable->klass; @@ -761,7 +795,7 @@ slow_object_get_size (MonoVTable *vtable, MonoObject* o) * vtable field, is not intact. This is necessary for the parallel * collector. */ -static inline guint +static inline mword sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o) { mword descr = (mword)vtable->gc_descr; @@ -788,7 +822,7 @@ sgen_par_object_get_size (MonoVTable *vtable, MonoObject* o) return slow_object_get_size (vtable, o); } -static inline guint +static inline mword sgen_safe_object_get_size (MonoObject *obj) { char *forwarded; @@ -811,7 +845,7 @@ void sgen_bridge_processing_stw_step (void) MONO_INTERNAL; void sgen_bridge_processing_finish (int generation) MONO_INTERNAL; void sgen_register_test_bridge_callbacks (const char *bridge_class_name) MONO_INTERNAL; gboolean sgen_is_bridge_object (MonoObject *obj) MONO_INTERNAL; -MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *class) MONO_INTERNAL; +MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass) MONO_INTERNAL; void sgen_mark_bridge_object (MonoObject *obj) MONO_INTERNAL; void sgen_bridge_register_finalized_object (MonoObject *object) MONO_INTERNAL; void sgen_bridge_describe_pointer (MonoObject *object) MONO_INTERNAL; @@ -923,8 +957,6 @@ struct _LOSObject { char data [MONO_ZERO_LEN_ARRAY]; }; -#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size)) - extern LOSObject *los_object_list; extern mword los_memory_usage; @@ -952,7 +984,7 @@ gboolean sgen_los_object_is_pinned (char *obj) MONO_INTERNAL; void sgen_clear_nursery_fragments (void) MONO_INTERNAL; void sgen_nursery_allocator_prepare_for_pinning (void) MONO_INTERNAL; void sgen_nursery_allocator_set_nursery_bounds (char *nursery_start, char *nursery_end) MONO_INTERNAL; -mword sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int num_entries, SgenGrayQueue *unpin_queue) MONO_INTERNAL; +mword sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, size_t num_entries, SgenGrayQueue *unpin_queue) MONO_INTERNAL; void sgen_init_nursery_allocator (void) MONO_INTERNAL; void sgen_nursery_allocator_init_heavy_stats (void) MONO_INTERNAL; void sgen_alloc_init_heavy_stats (void) MONO_INTERNAL; @@ -1005,24 +1037,43 @@ extern __thread char *stack_end; #endif #ifdef HAVE_KW_THREAD -#define EMIT_TLS_ACCESS(mb,member,key) do { \ + +#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { \ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \ mono_mb_emit_byte ((mb), CEE_MONO_TLS); \ - mono_mb_emit_i4 ((mb), (key)); \ + mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_NEXT_ADDR); \ } while (0) + +#define EMIT_TLS_ACCESS_TEMP_END(mb) do { \ + mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \ + mono_mb_emit_byte ((mb), CEE_MONO_TLS); \ + mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_TEMP_END); \ + } while (0) + #else #if defined(__APPLE__) || defined (HOST_WIN32) -#define EMIT_TLS_ACCESS(mb,member,key) do { \ +#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { \ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \ mono_mb_emit_byte ((mb), CEE_MONO_TLS); \ mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO); \ - mono_mb_emit_icon ((mb), G_STRUCT_OFFSET (SgenThreadInfo, member)); \ + mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_next_addr)); \ mono_mb_emit_byte ((mb), CEE_ADD); \ mono_mb_emit_byte ((mb), CEE_LDIND_I); \ } while (0) + +#define EMIT_TLS_ACCESS_TEMP_END(mb) do { \ + mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \ + mono_mb_emit_byte ((mb), CEE_MONO_TLS); \ + mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO); \ + mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_temp_end)); \ + mono_mb_emit_byte ((mb), CEE_ADD); \ + mono_mb_emit_byte ((mb), CEE_LDIND_I); \ + } while (0) + #else -#define EMIT_TLS_ACCESS(mb,member,key) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0) +#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0) +#define EMIT_TLS_ACCESS_TEMP_END(mb) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0) #endif #endif @@ -1030,11 +1081,10 @@ extern __thread char *stack_end; /* Other globals */ extern GCMemSection *nursery_section; -extern int stat_major_gcs; extern guint32 collect_before_allocs; extern guint32 verify_before_allocs; extern gboolean has_per_allocation_action; -extern int degraded_mode; +extern size_t degraded_mode; extern int default_nursery_size; extern guint32 tlab_size; extern NurseryClearPolicy nursery_clear_policy; @@ -1049,7 +1099,7 @@ extern int do_pin_stats; static inline void sgen_set_nursery_scan_start (char *p) { - int idx = (p - (char*)nursery_section->data) / SGEN_SCAN_START_SIZE; + size_t idx = (p - (char*)nursery_section->data) / SGEN_SCAN_START_SIZE; char *old = nursery_section->scan_starts [idx]; if (!old || old > p) nursery_section->scan_starts [idx] = p; @@ -1097,10 +1147,8 @@ sgen_dummy_use (gpointer v) { #if defined(__GNUC__) __asm__ volatile ("" : "=r"(v) : "r"(v)); #elif defined(_MSC_VER) - __asm { - mov eax, v; - and eax, eax; - }; + static volatile gpointer ptr; + ptr = v; #else #error "Implement sgen_dummy_use for your compiler" #endif diff --git a/mono/metadata/sgen-gray.c b/mono/metadata/sgen-gray.c index e2a7d60122..2393cbabb1 100644 --- a/mono/metadata/sgen-gray.c +++ b/mono/metadata/sgen-gray.c @@ -23,6 +23,7 @@ #include "metadata/sgen-gc.h" #include "utils/mono-counters.h" +#include "sgen-protocol.h" #define GRAY_QUEUE_LENGTH_LIMIT 64 @@ -45,6 +46,8 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue) { GrayQueueSection *section; + HEAVY_STAT (gc_stats.gray_queue_section_alloc ++); + if (queue->alloc_prepare_func) queue->alloc_prepare_func (queue); @@ -59,18 +62,21 @@ sgen_gray_object_alloc_queue_section (SgenGrayQueue *queue) STATE_SET (section, GRAY_QUEUE_SECTION_STATE_FLOATING); } - section->end = 0; + section->size = SGEN_GRAY_QUEUE_SECTION_SIZE; STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_ENQUEUED); /* Link it with the others */ section->next = queue->first; queue->first = section; + queue->cursor = (char**)section->objects - 1; } void sgen_gray_object_free_queue_section (GrayQueueSection *section) { + HEAVY_STAT (gc_stats.gray_queue_section_free ++); + STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_FREED); sgen_free_internal (section, INTERNAL_MEM_GRAY_QUEUE); } @@ -84,6 +90,8 @@ sgen_gray_object_free_queue_section (GrayQueueSection *section) void sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj) { + HEAVY_STAT (gc_stats.gray_queue_enqueue_slow_path ++); + SGEN_ASSERT (9, obj, "enqueueing a null object"); //sgen_check_objref (obj); @@ -92,11 +100,21 @@ sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj) queue->enqueue_check_func (obj); #endif - if (G_UNLIKELY (!queue->first || queue->first->end == SGEN_GRAY_QUEUE_SECTION_SIZE)) + if (G_UNLIKELY (!queue->first || queue->cursor == GRAY_LAST_CURSOR_POSITION (queue->first))) { + if (queue->first) { + /* Set the current section size back to default, might have been changed by sgen_gray_object_dequeue_section */ + queue->first->size = SGEN_GRAY_QUEUE_SECTION_SIZE; + } + sgen_gray_object_alloc_queue_section (queue); + } STATE_ASSERT (queue->first, GRAY_QUEUE_SECTION_STATE_ENQUEUED); - SGEN_ASSERT (9, queue->first->end < SGEN_GRAY_QUEUE_SECTION_SIZE, "gray queue %p overflow, first %p, end %d", queue, queue->first, queue->first->end); - queue->first->objects [queue->first->end++] = obj; + SGEN_ASSERT (9, queue->cursor <= GRAY_LAST_CURSOR_POSITION (queue->first), "gray queue %p overflow, first %p, cursor %p", queue, queue->first, queue->cursor); + *++queue->cursor = obj; + +#ifdef SGEN_HEAVY_BINARY_PROTOCOL + binary_protocol_gray_enqueue (queue, queue->cursor, obj); +#endif } char* @@ -104,15 +122,21 @@ sgen_gray_object_dequeue (SgenGrayQueue *queue) { char *obj; + HEAVY_STAT (gc_stats.gray_queue_dequeue_slow_path ++); + if (sgen_gray_object_queue_is_empty (queue)) return NULL; STATE_ASSERT (queue->first, GRAY_QUEUE_SECTION_STATE_ENQUEUED); - SGEN_ASSERT (9, queue->first->end, "gray queue %p underflow, first %p, end %d", queue, queue->first, queue->first->end); + SGEN_ASSERT (9, queue->cursor >= (char**)queue->first->objects, "gray queue %p underflow, first %p, cursor %d", queue, queue->first, queue->cursor); - obj = queue->first->objects [--queue->first->end]; + obj = *queue->cursor--; - if (G_UNLIKELY (queue->first->end == 0)) { +#ifdef SGEN_HEAVY_BINARY_PROTOCOL + binary_protocol_gray_dequeue (queue, queue->cursor + 1, obj); +#endif + + if (G_UNLIKELY (queue->cursor == (char**)queue->first->objects - 1)) { GrayQueueSection *section = queue->first; queue->first = section->next; section->next = queue->free_list; @@ -120,6 +144,7 @@ sgen_gray_object_dequeue (SgenGrayQueue *queue) STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_ENQUEUED, GRAY_QUEUE_SECTION_STATE_FREE_LIST); queue->free_list = section; + queue->cursor = queue->first ? (char**)queue->first->objects + queue->first->size - 1 : NULL; } return obj; @@ -137,6 +162,9 @@ sgen_gray_object_dequeue_section (SgenGrayQueue *queue) queue->first = section->next; section->next = NULL; + section->size = queue->cursor - (char**)section->objects + 1; + + queue->cursor = queue->first ? (char**)queue->first->objects + queue->first->size - 1 : NULL; STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_ENQUEUED, GRAY_QUEUE_SECTION_STATE_FLOATING); @@ -148,12 +176,16 @@ sgen_gray_object_enqueue_section (SgenGrayQueue *queue, GrayQueueSection *sectio { STATE_TRANSITION (section, GRAY_QUEUE_SECTION_STATE_FLOATING, GRAY_QUEUE_SECTION_STATE_ENQUEUED); + if (queue->first) + queue->first->size = queue->cursor - (char**)queue->first->objects + 1; + section->next = queue->first; queue->first = section; + queue->cursor = (char**)queue->first->objects + queue->first->size - 1; #ifdef SGEN_CHECK_GRAY_OBJECT_ENQUEUE if (queue->enqueue_check_func) { int i; - for (i = 0; i < section->end; ++i) + for (i = 0; i < section->size; ++i) queue->enqueue_check_func (section->objects [i]); } #endif @@ -305,7 +337,7 @@ sgen_section_gray_queue_enqueue (SgenSectionGrayQueue *queue, GrayQueueSection * #ifdef SGEN_CHECK_GRAY_OBJECT_ENQUEUE if (queue->enqueue_check_func) { int i; - for (i = 0; i < section->end; ++i) + for (i = 0; i < section->size; ++i) queue->enqueue_check_func (section->objects [i]); } #endif diff --git a/mono/metadata/sgen-gray.h b/mono/metadata/sgen-gray.h index df22ec13ea..2dfea35a14 100644 --- a/mono/metadata/sgen-gray.h +++ b/mono/metadata/sgen-gray.h @@ -20,6 +20,34 @@ #ifndef __MONO_SGEN_GRAY_H__ #define __MONO_SGEN_GRAY_H__ +/* + * This gray queue has to be as optimized as possible, because it is in the core of + * the mark/copy phase of the garbage collector. The memory access has then to be as + * cache friendly as possible. That's why we use a cursor based implementation. + * + * This simply consist in maintaining a pointer to the current element in the + * queue. In addition to using this cursor, we use a simple linked list of arrays, + * called sections, so that we have the cache friendliness of arrays without having + * the cost of memory reallocation of a dynaic array, not the cost of memory + * indirection of a linked list. + * + * This implementation also allows the dequeuing of a whole section at a time. This is + * for example used in the parallel GC because it would be too costly to take one element + * at a time. This imply the main constraint that, because we don't carry the cursor + * with the section, we still have to store the index of the last element. This is done + * through the 'size' field on the section, which default value is it's maximum value + * SGEN_GRAY_QUEUE_SECTION_SIZE. This field is updated in multiple cases : + * - section allocation : default value + * - object push : default value if we fill the current queue first + * - section dequeue : position of the cursor in the dequeued section + * - section enqueue : position of the cursor in the previously first section in the queue + * + * The previous implementation was an index based access where we would store the index + * of the last element in the section. This was less efficient because we would have + * to make 1 memory access for the index value, 1 for the base address of the objects + * array and another 1 for the actual value in the array. + */ + #define SGEN_GRAY_QUEUE_SECTION_SIZE (128 - 3) #ifdef SGEN_CHECK_GRAY_OBJECT_SECTIONS @@ -45,7 +73,7 @@ struct _GrayQueueSection { int dummy; GrayQueueSectionState state; #endif - int end; + int size; GrayQueueSection *next; char *objects [SGEN_GRAY_QUEUE_SECTION_SIZE]; }; @@ -56,6 +84,7 @@ typedef void (*GrayQueueAllocPrepareFunc) (SgenGrayQueue*); typedef void (*GrayQueueEnqueueCheckFunc) (char*); struct _SgenGrayQueue { + char **cursor; GrayQueueSection *first; GrayQueueSection *free_list; GrayQueueAllocPrepareFunc alloc_prepare_func; @@ -76,6 +105,9 @@ struct _SgenSectionGrayQueue { #endif }; +#define GRAY_LAST_CURSOR_POSITION(s) ((char**)(s)->objects + SGEN_GRAY_QUEUE_SECTION_SIZE - 1) +#define GRAY_FIRST_CURSOR_POSITION(s) ((char**)(s)->objects) + void sgen_gray_object_enqueue (SgenGrayQueue *queue, char *obj) MONO_INTERNAL; char* sgen_gray_object_dequeue (SgenGrayQueue *queue) MONO_INTERNAL; GrayQueueSection* sgen_gray_object_dequeue_section (SgenGrayQueue *queue) MONO_INTERNAL; diff --git a/mono/metadata/sgen-los.c b/mono/metadata/sgen-los.c index c04da2545f..1e38006cac 100644 --- a/mono/metadata/sgen-los.c +++ b/mono/metadata/sgen-los.c @@ -67,7 +67,7 @@ struct _LOSFreeChunks { typedef struct _LOSSection LOSSection; struct _LOSSection { LOSSection *next; - int num_free_chunks; + size_t num_free_chunks; unsigned char *free_chunk_map; }; @@ -143,7 +143,7 @@ los_consistency_check (void) static void add_free_chunk (LOSFreeChunks *free_chunks, size_t size) { - int num_chunks = size >> LOS_CHUNK_BITS; + size_t num_chunks = size >> LOS_CHUNK_BITS; free_chunks->size = size; @@ -158,7 +158,8 @@ get_from_size_list (LOSFreeChunks **list, size_t size) { LOSFreeChunks *free_chunks = NULL; LOSSection *section; - int num_chunks, i, start_index; + size_t i, num_chunks, start_index; + g_assert ((size & (LOS_CHUNK_SIZE - 1)) == 0); @@ -198,7 +199,7 @@ get_los_section_memory (size_t size) { LOSSection *section; LOSFreeChunks *free_chunks; - int num_chunks; + size_t num_chunks; size += LOS_CHUNK_SIZE - 1; size &= ~(LOS_CHUNK_SIZE - 1); @@ -212,7 +213,7 @@ get_los_section_memory (size_t size) if (num_chunks >= LOS_NUM_FAST_SIZES) { free_chunks = get_from_size_list (&los_fast_free_lists [0], size); } else { - int i; + size_t i; for (i = num_chunks; i < LOS_NUM_FAST_SIZES; ++i) { free_chunks = get_from_size_list (&los_fast_free_lists [i], size); if (free_chunks) @@ -257,7 +258,7 @@ static void free_los_section_memory (LOSObject *obj, size_t size) { LOSSection *section = LOS_SECTION_FOR_OBJ (obj); - int num_chunks, i, start_index; + size_t num_chunks, i, start_index; size += LOS_CHUNK_SIZE - 1; size &= ~(LOS_CHUNK_SIZE - 1); diff --git a/mono/metadata/sgen-marksweep.c b/mono/metadata/sgen-marksweep.c index d409df5872..d309338580 100755 --- a/mono/metadata/sgen-marksweep.c +++ b/mono/metadata/sgen-marksweep.c @@ -83,7 +83,7 @@ typedef struct _MSBlockInfo MSBlockInfo; struct _MSBlockInfo { int obj_size; int obj_size_index; - int pin_queue_num_entries; + size_t pin_queue_num_entries; unsigned int pinned : 1; unsigned int has_references : 1; unsigned int has_pinned : 1; /* means cannot evacuate */ @@ -130,10 +130,12 @@ typedef struct { #define MS_BLOCK_FOR_OBJ(o) (((MSBlockHeader*)MS_BLOCK_DATA_FOR_OBJ ((o)))->info) #endif -#define MS_BLOCK_OBJ_INDEX(o,b) (((char*)(o) - ((b)->block + MS_BLOCK_SKIP)) / (b)->obj_size) +/* object index will always be small */ +#define MS_BLOCK_OBJ_INDEX(o,b) ((int)(((char*)(o) - ((b)->block + MS_BLOCK_SKIP)) / (b)->obj_size)) +//casting to int is fine since blocks are 32k #define MS_CALC_MARK_BIT(w,b,o) do { \ - int i = ((char*)(o) - MS_BLOCK_DATA_FOR_OBJ ((o))) >> SGEN_ALLOC_ALIGN_BITS; \ + int i = ((int)((char*)(o) - MS_BLOCK_DATA_FOR_OBJ ((o)))) >> SGEN_ALLOC_ALIGN_BITS; \ if (sizeof (mword) == 4) { \ (w) = i >> 5; \ (b) = i & 31; \ @@ -143,11 +145,11 @@ typedef struct { } \ } while (0) -#define MS_MARK_BIT(bl,w,b) ((bl)->mark_words [(w)] & (1L << (b))) -#define MS_SET_MARK_BIT(bl,w,b) ((bl)->mark_words [(w)] |= (1L << (b))) +#define MS_MARK_BIT(bl,w,b) ((bl)->mark_words [(w)] & (ONE_P << (b))) +#define MS_SET_MARK_BIT(bl,w,b) ((bl)->mark_words [(w)] |= (ONE_P << (b))) #define MS_PAR_SET_MARK_BIT(was_marked,bl,w,b) do { \ mword __old = (bl)->mark_words [(w)]; \ - mword __bitmask = 1L << (b); \ + mword __bitmask = ONE_P << (b); \ if (__old & __bitmask) { \ was_marked = TRUE; \ break; \ @@ -187,9 +189,9 @@ static LOCK_DECLARE (ms_block_list_mutex); #endif static gboolean *evacuate_block_obj_sizes; -static float evacuation_threshold = 0.666; +static float evacuation_threshold = 0.666f; #ifdef SGEN_HAVE_CONCURRENT_MARK -static float concurrent_evacuation_threshold = 0.666; +static float concurrent_evacuation_threshold = 0.666f; static gboolean want_evacuation = FALSE; #endif @@ -209,13 +211,13 @@ static MSBlockInfo *empty_blocks = NULL; #else /* non-allocated block free-list */ static void *empty_blocks = NULL; -static int num_empty_blocks = 0; +static size_t num_empty_blocks = 0; #endif #define FOREACH_BLOCK(bl) for ((bl) = all_blocks; (bl); (bl) = (bl)->next) { #define END_FOREACH_BLOCK } -static int num_major_sections = 0; +static size_t num_major_sections = 0; /* one free block list for each block object size */ static MSBlockInfo **free_block_lists [MS_BLOCK_TYPE_MAX]; @@ -250,7 +252,7 @@ static void sweep_block (MSBlockInfo *block, gboolean during_major_collection); static int -ms_find_block_obj_size_index (int size) +ms_find_block_obj_size_index (size_t size) { int i; SGEN_ASSERT (9, size <= SGEN_MAX_SMALL_OBJ_SIZE, "size %d is bigger than max small object size %d", size, SGEN_MAX_SMALL_OBJ_SIZE); @@ -397,7 +399,7 @@ ms_get_empty_block (void) p += MS_BLOCK_SIZE; } - SGEN_ATOMIC_ADD (num_empty_blocks, alloc_num); + SGEN_ATOMIC_ADD_P (num_empty_blocks, alloc_num); stat_major_blocks_alloced += alloc_num; #if SIZEOF_VOID_P != 8 @@ -414,7 +416,7 @@ ms_get_empty_block (void) next = *(void**)block; } while (SGEN_CAS_PTR (&empty_blocks, next, empty) != empty); - SGEN_ATOMIC_ADD (num_empty_blocks, -1); + SGEN_ATOMIC_ADD_P (num_empty_blocks, -1); *(void**)block = NULL; @@ -436,7 +438,7 @@ ms_free_block (void *block) *(void**)block = empty; } while (SGEN_CAS_PTR (&empty_blocks, block, empty) != empty); - SGEN_ATOMIC_ADD (num_empty_blocks, 1); + SGEN_ATOMIC_ADD_P (num_empty_blocks, 1); } #endif @@ -476,7 +478,7 @@ check_empty_blocks (void) { #ifndef FIXED_HEAP void *p; - int i = 0; + size_t i = 0; for (p = empty_blocks; p; p = *(void**)p) ++i; g_assert (i == num_empty_blocks); @@ -728,14 +730,14 @@ alloc_obj_par (MonoVTable *vtable, int size, gboolean pinned, gboolean has_refer } static void* -major_par_alloc_object (MonoVTable *vtable, int size, gboolean has_references) +major_par_alloc_object (MonoVTable *vtable, size_t size, gboolean has_references) { return alloc_obj_par (vtable, size, FALSE, has_references); } #endif static void* -alloc_obj (MonoVTable *vtable, int size, gboolean pinned, gboolean has_references) +alloc_obj (MonoVTable *vtable, size_t size, gboolean pinned, gboolean has_references) { int size_index = MS_BLOCK_OBJ_SIZE_INDEX (size); MSBlockInfo **free_blocks = FREE_BLOCKS (pinned, has_references); @@ -759,7 +761,7 @@ alloc_obj (MonoVTable *vtable, int size, gboolean pinned, gboolean has_reference } static void* -major_alloc_object (MonoVTable *vtable, int size, gboolean has_references) +major_alloc_object (MonoVTable *vtable, size_t size, gboolean has_references) { return alloc_obj (vtable, size, FALSE, has_references); } @@ -831,7 +833,7 @@ static void* major_alloc_degraded (MonoVTable *vtable, size_t size) { void *obj; - int old_num_sections; + size_t old_num_sections; old_num_sections = num_major_sections; @@ -1710,6 +1712,7 @@ ms_sweep (void) */ *iter = block->next; + binary_protocol_empty (MS_BLOCK_OBJ (block, 0), (char*)MS_BLOCK_OBJ (block, count) - (char*)MS_BLOCK_OBJ (block, 0)); #ifdef FIXED_HEAP ms_free_block (block); #else @@ -1812,7 +1815,7 @@ ms_calculate_block_obj_sizes (double factor, int *arr) int last_size = 0; do { - int target_count = ceil (MS_BLOCK_FREE / target_size); + int target_count = (int)ceil (MS_BLOCK_FREE / target_size); int size = MIN ((MS_BLOCK_FREE / target_count) & ~(SGEN_ALLOC_ALIGN - 1), SGEN_MAX_SMALL_OBJ_SIZE); if (size != last_size) { @@ -1829,7 +1832,7 @@ ms_calculate_block_obj_sizes (double factor, int *arr) } /* only valid during minor collections */ -static int old_num_major_sections; +static mword old_num_major_sections; static void major_start_nursery_collection (void) @@ -1904,7 +1907,7 @@ static void major_have_computer_minor_collection_allowance (void) { #ifndef FIXED_HEAP - int section_reserve = sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE; + size_t section_reserve = sgen_get_minor_collection_allowance () / MS_BLOCK_SIZE; g_assert (have_swept); @@ -2105,7 +2108,7 @@ major_get_used_size (void) return size; } -static int +static size_t get_num_major_sections (void) { return num_major_sections; @@ -2132,7 +2135,7 @@ major_handle_gc_param (const char *opt) fprintf (stderr, "evacuation-threshold must be an integer in the range 0-100.\n"); exit (1); } - evacuation_threshold = (float)percentage / 100.0; + evacuation_threshold = (float)percentage / 100.0f; return TRUE; } else if (!strcmp (opt, "lazy-sweep")) { lazy_sweep = TRUE; @@ -2283,7 +2286,7 @@ major_scan_card_table (gboolean mod_union, SgenGrayQueue *queue) base = sgen_card_table_align_pointer (obj); while (obj < end) { - int card_offset; + size_t card_offset; if (!block->swept) sweep_block (block, FALSE); @@ -2337,8 +2340,8 @@ major_scan_card_table (gboolean mod_union, SgenGrayQueue *queue) card_data_end = card_data + CARDS_PER_BLOCK; for (card_data = initial_skip_card (card_data); card_data < card_data_end; ++card_data) { //card_data = skip_card (card_data + 1, card_data_end)) { - int index; - int idx = card_data - card_base; + size_t index; + size_t idx = card_data - card_base; char *start = (char*)(block_start + idx * CARD_SIZE_IN_BYTES); char *end = start + CARD_SIZE_IN_BYTES; char *first_obj, *obj; diff --git a/mono/metadata/sgen-memory-governor.c b/mono/metadata/sgen-memory-governor.c index 2081de4fc7..448ebef3f0 100644 --- a/mono/metadata/sgen-memory-governor.c +++ b/mono/metadata/sgen-memory-governor.c @@ -57,14 +57,14 @@ static gboolean debug_print_allowance = FALSE; /* use this to tune when to do a major/minor collection */ static mword memory_pressure = 0; static mword minor_collection_allowance; -static int minor_collection_sections_alloced = 0; +static mword minor_collection_sections_alloced = 0; -static int last_major_num_sections = 0; -static int last_los_memory_usage = 0; +static mword last_major_num_sections = 0; +static mword last_los_memory_usage = 0; static gboolean need_calculate_minor_collection_allowance; -static int last_collection_old_num_major_sections; +static mword last_collection_old_num_major_sections; static mword last_collection_los_memory_usage = 0; static mword last_collection_old_los_memory_usage; static mword last_collection_los_memory_alloced; @@ -85,7 +85,7 @@ double_to_mword_with_saturation (double value) static void sgen_memgov_try_calculate_minor_collection_allowance (gboolean overwrite) { - int num_major_sections, num_major_sections_saved; + size_t num_major_sections, num_major_sections_saved; mword los_memory_saved, new_major, new_heap_size, save_target, allowance_target; if (overwrite) @@ -210,7 +210,7 @@ static void log_timming (GGTimingInfo *info) { //unsigned long stw_time, unsigned long bridge_time, gboolean is_overflow - int num_major_sections = major_collector.get_num_major_sections (); + mword num_major_sections = major_collector.get_num_major_sections (); char full_timing_buff [1024]; full_timing_buff [0] = '\0'; @@ -248,7 +248,7 @@ sgen_memgov_collection_end (int generation, GGTimingInfo* info, int info_count) } void -sgen_register_major_sections_alloced (int num_sections) +sgen_register_major_sections_alloced (size_t num_sections) { minor_collection_sections_alloced += num_sections; } @@ -342,7 +342,7 @@ sgen_free_os_memory (void *addr, size_t size, SgenAllocFlags flags) g_assert (!(flags & ~SGEN_ALLOC_HEAP)); mono_vfree (addr, size); - SGEN_ATOMIC_ADD_P (total_alloc, -size); + SGEN_ATOMIC_ADD_P (total_alloc, -(gssize)size); if (flags & SGEN_ALLOC_HEAP) MONO_GC_HEAP_FREE ((mword)addr, size); } @@ -369,7 +369,7 @@ sgen_memgov_available_free_space (void) void sgen_memgov_release_space (mword size, int space) { - SGEN_ATOMIC_ADD_P (allocated_heap, -size); + SGEN_ATOMIC_ADD_P (allocated_heap, -(gssize)size); } gboolean diff --git a/mono/metadata/sgen-memory-governor.h b/mono/metadata/sgen-memory-governor.h index 497ecb0576..fffe906f5b 100644 --- a/mono/metadata/sgen-memory-governor.h +++ b/mono/metadata/sgen-memory-governor.h @@ -39,7 +39,7 @@ void sgen_memgov_major_collection_end (void) MONO_INTERNAL; void sgen_memgov_collection_start (int generation) MONO_INTERNAL; void sgen_memgov_collection_end (int generation, GGTimingInfo* info, int info_count) MONO_INTERNAL; -void sgen_register_major_sections_alloced (int num_sections) MONO_INTERNAL; +void sgen_register_major_sections_alloced (size_t num_sections) MONO_INTERNAL; mword sgen_get_minor_collection_allowance (void) MONO_INTERNAL; gboolean sgen_need_major_collection (mword space_needed) MONO_INTERNAL; diff --git a/mono/metadata/sgen-new-bridge.c b/mono/metadata/sgen-new-bridge.c index c322e649b7..ad486c0c47 100644 --- a/mono/metadata/sgen-new-bridge.c +++ b/mono/metadata/sgen-new-bridge.c @@ -262,11 +262,13 @@ dyn_array_int_size (DynIntArray *da) return da->array.size; } +#ifdef NEW_XREFS static void dyn_array_int_empty (DynIntArray *da) { dyn_array_empty (&da->array); } +#endif static void dyn_array_int_add (DynIntArray *da, int x) @@ -281,17 +283,13 @@ dyn_array_int_get (DynIntArray *da, int x) return ((int*)da->array.data)[x]; } +#ifdef NEW_XREFS static void dyn_array_int_set (DynIntArray *da, int idx, int val) { ((int*)da->array.data)[idx] = val; } - -static void -dyn_array_int_ensure_capacity (DynIntArray *da, int capacity) -{ - dyn_array_ensure_capacity (&da->array, capacity, sizeof (int)); -} +#endif static void dyn_array_int_ensure_independent (DynIntArray *da) @@ -428,6 +426,7 @@ dyn_array_scc_get_ptr (DynSCCArray *da, int x) static DynIntArray merge_array; +#ifdef NEW_XREFS static gboolean dyn_array_int_contains (DynIntArray *da, int x) { @@ -437,6 +436,7 @@ dyn_array_int_contains (DynIntArray *da, int x) return TRUE; return FALSE; } +#endif static void enable_accounting (void) @@ -881,7 +881,7 @@ dump_graph (void) MonoObject *obj; HashEntry *entry; - int prefix_len = strlen (dump_prefix); + size_t prefix_len = strlen (dump_prefix); char *filename = alloca(prefix_len + 64); FILE *file; int edge_id = 0; diff --git a/mono/metadata/sgen-nursery-allocator.c b/mono/metadata/sgen-nursery-allocator.c index 189a60b529..4ac1aa0c21 100644 --- a/mono/metadata/sgen-nursery-allocator.c +++ b/mono/metadata/sgen-nursery-allocator.c @@ -108,7 +108,7 @@ int sgen_nursery_bits = 22; #endif char *sgen_space_bitmap MONO_INTERNAL; -int sgen_space_bitmap_size MONO_INTERNAL; +size_t sgen_space_bitmap_size MONO_INTERNAL; #ifdef HEAVY_STATISTICS @@ -414,7 +414,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s /*frag->next read must happen before the first CAS*/ mono_memory_write_barrier (); - /*Fail if the next done is removed concurrently and its CAS wins */ + /*Fail if the next node is removed concurrently and its CAS wins */ if (InterlockedCompareExchangePointer ((volatile gpointer*)&frag->next, mask (next, 1), next) != next) { continue; } @@ -424,7 +424,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s mono_memory_write_barrier (); /* Fail if the previous node was deleted and its CAS wins */ - if (InterlockedCompareExchangePointer ((volatile gpointer*)prev_ptr, next, frag) != frag) { + if (InterlockedCompareExchangePointer ((volatile gpointer*)prev_ptr, unmask (next), frag) != frag) { prev_ptr = find_previous_pointer_fragment (allocator, frag); continue; } @@ -471,7 +471,7 @@ restart: for (frag = unmask (allocator->alloc_head); unmask (frag); frag = unmask (frag->next)) { HEAVY_STAT (InterlockedIncrement (&stat_alloc_iterations)); - if (size <= (frag->fragment_end - frag->fragment_next)) { + if (size <= (size_t)(frag->fragment_end - frag->fragment_next)) { void *p = par_alloc_from_fragment (allocator, frag, size); if (!p) { HEAVY_STAT (InterlockedIncrement (&stat_alloc_retries)); @@ -579,7 +579,7 @@ restart: #endif for (frag = unmask (allocator->alloc_head); frag; frag = unmask (frag->next)) { - int frag_size = frag->fragment_end - frag->fragment_next; + size_t frag_size = frag->fragment_end - frag->fragment_next; HEAVY_STAT (InterlockedIncrement (&stat_alloc_range_iterations)); @@ -608,7 +608,7 @@ restart: if (min_frag) { void *p; - int frag_size; + size_t frag_size; frag_size = min_frag->fragment_end - min_frag->fragment_next; if (frag_size < minimum_size) @@ -685,7 +685,7 @@ sgen_clear_range (char *start, char *end) /* Mark this as not a real object */ o->obj.synchronisation = GINT_TO_POINTER (-1); o->bounds = NULL; - o->max_length = size - sizeof (MonoArray); + o->max_length = (mono_array_size_t)(size - sizeof (MonoArray)); sgen_set_nursery_scan_start (start); g_assert (start + sgen_safe_object_get_size ((MonoObject*)o) == end); } @@ -745,11 +745,11 @@ fragment_list_reverse (SgenFragmentAllocator *allocator) } mword -sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int num_entries, SgenGrayQueue *unpin_queue) +sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, size_t num_entries, SgenGrayQueue *unpin_queue) { char *frag_start, *frag_end; size_t frag_size; - int i = 0; + size_t i = 0; SgenFragment *frags_ranges; #ifdef NALLOC_DEBUG @@ -827,9 +827,9 @@ sgen_build_nursery_fragments (GCMemSection *nursery_section, void **start, int n sgen_minor_collector.build_fragments_finish (&mutator_allocator); if (!unmask (mutator_allocator.alloc_head)) { - SGEN_LOG (1, "Nursery fully pinned (%d)", num_entries); + SGEN_LOG (1, "Nursery fully pinned (%zd)", num_entries); for (i = 0; i < num_entries; ++i) { - SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %d", start [i], sgen_safe_name (start [i]), sgen_safe_object_get_size (start [i])); + SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", start [i], sgen_safe_name (start [i]), sgen_safe_object_get_size (start [i])); } } return fragment_total; @@ -860,7 +860,7 @@ sgen_can_alloc_size (size_t size) size = SGEN_ALIGN_UP (size); for (frag = unmask (mutator_allocator.alloc_head); frag; frag = unmask (frag->next)) { - if ((frag->fragment_end - frag->fragment_next) >= size) + if ((size_t)(frag->fragment_end - frag->fragment_next) >= size) return TRUE; } return FALSE; diff --git a/mono/metadata/sgen-pinning.c b/mono/metadata/sgen-pinning.c index d0a38ef426..85ee6e9f40 100644 --- a/mono/metadata/sgen-pinning.c +++ b/mono/metadata/sgen-pinning.c @@ -27,9 +27,9 @@ #include "metadata/sgen-protocol.h" static void** pin_queue; -static int pin_queue_size = 0; -static int next_pin_slot = 0; -static int last_num_pinned = 0; +static size_t pin_queue_size = 0; +static size_t next_pin_slot = 0; +static size_t last_num_pinned = 0; #define PIN_HASH_SIZE 1024 static void *pin_hash_filter [PIN_HASH_SIZE]; @@ -50,13 +50,13 @@ sgen_finish_pinning (void) static void realloc_pin_queue (void) { - int new_size = pin_queue_size? pin_queue_size + pin_queue_size/2: 1024; + size_t new_size = pin_queue_size? pin_queue_size + pin_queue_size/2: 1024; void **new_pin = sgen_alloc_internal_dynamic (sizeof (void*) * new_size, INTERNAL_MEM_PIN_QUEUE, TRUE); memcpy (new_pin, pin_queue, sizeof (void*) * next_pin_slot); sgen_free_internal_dynamic (pin_queue, sizeof (void*) * pin_queue_size, INTERNAL_MEM_PIN_QUEUE); pin_queue = new_pin; pin_queue_size = new_size; - SGEN_LOG (4, "Reallocated pin queue to size: %d", new_size); + SGEN_LOG (4, "Reallocated pin queue to size: %zd", new_size); } void @@ -75,12 +75,12 @@ sgen_pin_stage_ptr (void *ptr) pin_queue [next_pin_slot++] = ptr; } -static int +static size_t optimized_pin_queue_search (void *addr) { - int first = 0, last = next_pin_slot; + size_t first = 0, last = next_pin_slot; while (first < last) { - int middle = first + ((last - first) >> 1); + size_t middle = first + ((last - first) >> 1); if (addr <= pin_queue [middle]) last = middle; else @@ -91,9 +91,9 @@ optimized_pin_queue_search (void *addr) } void** -sgen_find_optimized_pin_queue_area (void *start, void *end, int *num) +sgen_find_optimized_pin_queue_area (void *start, void *end, size_t *num) { - int first, last; + size_t first, last; first = optimized_pin_queue_search (start); last = optimized_pin_queue_search (end); *num = last - first; @@ -107,7 +107,7 @@ sgen_find_section_pin_queue_start_end (GCMemSection *section) { SGEN_LOG (6, "Pinning from section %p (%p-%p)", section, section->data, section->end_data); section->pin_queue_start = sgen_find_optimized_pin_queue_area (section->data, section->end_data, §ion->pin_queue_num_entries); - SGEN_LOG (6, "Found %d pinning addresses in section %p", section->pin_queue_num_entries, section); + SGEN_LOG (6, "Found %zd pinning addresses in section %p", section->pin_queue_num_entries, section); } /*This will setup the given section for the while pin queue. */ @@ -125,7 +125,7 @@ sgen_pinning_trim_queue_to_section (GCMemSection *section) } void -sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot) +sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot) { void **start = section->pin_queue_start + section->pin_queue_num_entries; void **end = pin_queue + max_pin_slot; @@ -144,12 +144,12 @@ sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot) /* reduce the info in the pin queue, removing duplicate pointers and sorting them */ void -sgen_optimize_pin_queue (int start_slot) +sgen_optimize_pin_queue (size_t start_slot) { void **start, **cur, **end; /* sort and uniq pin_queue: we just sort and we let the rest discard multiple values */ /* it may be better to keep ranges of pinned memory instead of individually pinning objects */ - SGEN_LOG (5, "Sorting pin queue, size: %d", next_pin_slot); + SGEN_LOG (5, "Sorting pin queue, size: %zd", next_pin_slot); if ((next_pin_slot - start_slot) > 1) sgen_sort_addresses (pin_queue + start_slot, next_pin_slot - start_slot); start = cur = pin_queue + start_slot; @@ -161,10 +161,10 @@ sgen_optimize_pin_queue (int start_slot) start++; }; next_pin_slot = start - pin_queue; - SGEN_LOG (5, "Pin queue reduced to size: %d", next_pin_slot); + SGEN_LOG (5, "Pin queue reduced to size: %zd", next_pin_slot); } -int +size_t sgen_get_pinned_count (void) { return next_pin_slot; @@ -176,7 +176,7 @@ sgen_dump_pin_queue (void) int i; for (i = 0; i < last_num_pinned; ++i) { - SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %d", pin_queue [i], sgen_safe_name (pin_queue [i]), sgen_safe_object_get_size (pin_queue [i])); + SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", pin_queue [i], sgen_safe_name (pin_queue [i]), sgen_safe_object_get_size (pin_queue [i])); } } @@ -311,7 +311,7 @@ sgen_cement_lookup_or_register (char *obj) vt->klass->name_space, vt->klass->name); } binary_protocol_cement (obj, (gpointer)SGEN_LOAD_VTABLE (obj), - sgen_safe_object_get_size ((MonoObject*)obj)); + (int)sgen_safe_object_get_size ((MonoObject*)obj)); } return FALSE; diff --git a/mono/metadata/sgen-pinning.h b/mono/metadata/sgen-pinning.h index f141cd6839..ef41df24d2 100644 --- a/mono/metadata/sgen-pinning.h +++ b/mono/metadata/sgen-pinning.h @@ -28,11 +28,11 @@ enum { }; void sgen_pin_stage_ptr (void *ptr) MONO_INTERNAL; -void sgen_optimize_pin_queue (int start_slot) MONO_INTERNAL; +void sgen_optimize_pin_queue (size_t start_slot) MONO_INTERNAL; void sgen_init_pinning (void) MONO_INTERNAL; void sgen_finish_pinning (void) MONO_INTERNAL; -void sgen_pin_queue_clear_discarded_entries (GCMemSection *section, int max_pin_slot) MONO_INTERNAL; -int sgen_get_pinned_count (void) MONO_INTERNAL; +void sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot) MONO_INTERNAL; +size_t sgen_get_pinned_count (void) MONO_INTERNAL; void sgen_pinning_setup_section (GCMemSection *section) MONO_INTERNAL; void sgen_pinning_trim_queue_to_section (GCMemSection *section) MONO_INTERNAL; diff --git a/mono/metadata/sgen-protocol.c b/mono/metadata/sgen-protocol.c index ce0ac028cf..0ed3ebbd0f 100644 --- a/mono/metadata/sgen-protocol.c +++ b/mono/metadata/sgen-protocol.c @@ -456,6 +456,20 @@ binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int index) SGenProtocolDislinkProcessStaged entry = { link, obj, index }; protocol_entry (SGEN_PROTOCOL_DISLINK_PROCESS_STAGED, &entry, sizeof (SGenProtocolDislinkProcessStaged)); } + +void +binary_protocol_gray_enqueue (gpointer queue, gpointer cursor, gpointer value) +{ + SGenProtocolGrayQueue entry = { queue, cursor, value }; + protocol_entry (SGEN_PROTOCOL_GRAY_ENQUEUE, &entry, sizeof (SGenProtocolGrayQueue)); +} + +void +binary_protocol_gray_dequeue (gpointer queue, gpointer cursor, gpointer value) +{ + SGenProtocolGrayQueue entry = { queue, cursor, value }; + protocol_entry (SGEN_PROTOCOL_GRAY_DEQUEUE, &entry, sizeof (SGenProtocolGrayQueue)); +} #endif #endif /* HAVE_SGEN_GC */ diff --git a/mono/metadata/sgen-protocol.h b/mono/metadata/sgen-protocol.h index 1e7222c8b3..1483880e3e 100644 --- a/mono/metadata/sgen-protocol.h +++ b/mono/metadata/sgen-protocol.h @@ -20,6 +20,9 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef __MONO_SGENPROTOCOL_H__ +#define __MONO_SGENPROTOCOL_H__ + #include "sgen-gc.h" enum { @@ -57,7 +60,9 @@ enum { SGEN_PROTOCOL_DISLINK_UPDATE_STAGED, SGEN_PROTOCOL_DISLINK_PROCESS_STAGED, SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN, - SGEN_PROTOCOL_DOMAIN_UNLOAD_END + SGEN_PROTOCOL_DOMAIN_UNLOAD_END, + SGEN_PROTOCOL_GRAY_ENQUEUE, + SGEN_PROTOCOL_GRAY_DEQUEUE, }; typedef struct { @@ -221,6 +226,12 @@ typedef struct { gpointer domain; } SGenProtocolDomainUnload; +typedef struct { + gpointer queue; + gpointer cursor; + gpointer value; +} SGenProtocolGrayQueue; + /* missing: finalizers, roots, non-store wbarriers */ void binary_protocol_init (const char *filename) MONO_INTERNAL; @@ -274,6 +285,8 @@ void binary_protocol_card_scan (gpointer start, int size) MONO_INTERNAL; void binary_protocol_dislink_update (gpointer link, gpointer obj, int track, int staged) MONO_INTERNAL; void binary_protocol_dislink_update_staged (gpointer link, gpointer obj, int track, int index) MONO_INTERNAL; void binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int index) MONO_INTERNAL; +void binary_protocol_gray_enqueue (gpointer queue, gpointer cursor, gpointer value) MONO_INTERNAL; +void binary_protocol_gray_dequeue (gpointer queue, gpointer cursor, gpointer value) MONO_INTERNAL; #else @@ -296,5 +309,9 @@ void binary_protocol_dislink_process_staged (gpointer link, gpointer obj, int in #define binary_protocol_dislink_update(link,obj,track,staged) #define binary_protocol_dislink_update_staged(link,obj,track,index) #define binary_protocol_dislink_process_staged(link,obj,index) +#define binary_protocol_gray_enqueue(queue,cursor,value) +#define binary_protocol_gray_dequeue(queue,cursor,value) + +#endif #endif diff --git a/mono/metadata/sgen-simple-nursery.c b/mono/metadata/sgen-simple-nursery.c index 3a0c57e022..f2f7066c30 100644 --- a/mono/metadata/sgen-simple-nursery.c +++ b/mono/metadata/sgen-simple-nursery.c @@ -58,7 +58,7 @@ build_fragments_finish (SgenFragmentAllocator *allocator) } static void -prepare_to_space (char *to_space_bitmap, int space_bitmap_size) +prepare_to_space (char *to_space_bitmap, size_t space_bitmap_size) { } diff --git a/mono/metadata/sgen-split-nursery.c b/mono/metadata/sgen-split-nursery.c index fc741cfc05..1f62d14b70 100644 --- a/mono/metadata/sgen-split-nursery.c +++ b/mono/metadata/sgen-split-nursery.c @@ -139,7 +139,7 @@ static float alloc_ratio = 60.f/100.f; static char *region_age; -static int region_age_size; +static size_t region_age_size; static AgeAllocationBuffer age_alloc_buffers [MAX_AGE]; /* The collector allocs from here. */ @@ -150,14 +150,14 @@ static LOCK_DECLARE (par_alloc_buffer_refill_mutex); static inline int get_object_age (char *object) { - int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; + size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; return region_age [idx]; } static inline void set_object_age (char *object, int age) { - int idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; + size_t idx = (object - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; region_age [idx] = age; } @@ -165,7 +165,7 @@ static void set_age_in_range (char *start, char *end, int age) { char *region_start; - int region_idx, length; + size_t region_idx, length; region_idx = (start - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; region_start = ®ion_age [region_idx]; length = (end - start) >> SGEN_TO_SPACE_GRANULE_BITS; @@ -175,8 +175,8 @@ set_age_in_range (char *start, char *end, int age) static inline void mark_bit (char *space_bitmap, char *pos) { - int idx = (pos - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; - int byte = idx / 8; + size_t idx = (pos - sgen_nursery_start) >> SGEN_TO_SPACE_GRANULE_BITS; + size_t byte = idx / 8; int bit = idx & 0x7; g_assert (byte < sgen_space_bitmap_size); @@ -420,7 +420,7 @@ build_fragments_finish (SgenFragmentAllocator *allocator) } static void -prepare_to_space (char *to_space_bitmap, int space_bitmap_size) +prepare_to_space (char *to_space_bitmap, size_t space_bitmap_size) { SgenFragment **previous, *frag; diff --git a/mono/metadata/sgen-tarjan-bridge.c b/mono/metadata/sgen-tarjan-bridge.c index 1abcda6b2e..59013f7012 100644 --- a/mono/metadata/sgen-tarjan-bridge.c +++ b/mono/metadata/sgen-tarjan-bridge.c @@ -67,14 +67,6 @@ typedef struct { /* private */ -static void -dyn_array_init (DynArray *da) -{ - da->size = 0; - da->capacity = 0; - da->data = NULL; -} - static void dyn_array_uninit (DynArray *da, int elem_size) { @@ -121,12 +113,6 @@ dyn_array_add (DynArray *da, int elem_size) /* ptr */ -static void -dyn_array_ptr_init (DynPtrArray *da) -{ - dyn_array_init (&da->array); -} - static void dyn_array_ptr_uninit (DynPtrArray *da) { @@ -461,6 +447,7 @@ bridge_object_forward (MonoObject *obj) return fwd ? fwd : obj; } +#ifdef DUMP_GRAPH static const char* safe_name_bridge (MonoObject *obj) { @@ -476,7 +463,7 @@ find_or_create_data (MonoObject *obj) entry = create_data (obj); return entry; } - +#endif //---------- typedef struct { @@ -502,7 +489,7 @@ static HashEntry merge_cache [COLOR_CACHE_SIZE][ELEMENTS_PER_BUCKET]; static int mix_hash (size_t hash) { - return ((hash * 215497) >> 16) ^ (hash * 1823231) + hash; + return (int)(((hash * 215497) >> 16) ^ ((hash * 1823231) + hash)); } static void @@ -908,6 +895,7 @@ cleanup (void) num_colors_with_bridges = 0; } +#ifdef DUMP_GRAPH static void dump_color_table (const char *why, gboolean do_index) { @@ -938,6 +926,7 @@ dump_color_table (const char *why, gboolean do_index) } } +#endif static gint64 step_timer (gint64 *timer) @@ -1036,16 +1025,6 @@ reset_xrefs (ColorData *color) } } -static mono_bool -is_bridge_object_alive (MonoObject *obj, void *data) -{ - SgenHashTable *table = data; - unsigned char *value = sgen_hash_table_lookup (table, obj); - if (!value) - return TRUE; - return *value; -} - static void processing_build_callback_data (int generation) { diff --git a/mono/metadata/sgen-workers.c b/mono/metadata/sgen-workers.c index 77c7fadcac..b3eebb02d9 100644 --- a/mono/metadata/sgen-workers.c +++ b/mono/metadata/sgen-workers.c @@ -246,7 +246,17 @@ workers_steal (WorkerData *data, WorkerData *victim_data, gboolean lock) memcpy (queue->first->objects, victim_data->stealable_stack + victim_data->stealable_stack_fill - num + n, sizeof (char*) * m); - queue->first->end = m; + queue->first->size = m; + + /* + * DO NOT move outside this loop + * Doing so trigger "assert not reached" in sgen-scan-object.h : we use the queue->cursor + * to compute the size of the first section during section allocation (via alloc_prepare_func + * -> workers_gray_queue_share_redirect -> sgen_gray_object_dequeue_section) which will be then + * set to 0, because queue->cursor is still pointing to queue->first->objects [-1], thus + * losing objects in the gray queue. + */ + queue->cursor = (char**)queue->first->objects + queue->first->size - 1; } victim_data->stealable_stack_fill -= num; @@ -279,10 +289,9 @@ workers_get_work (WorkerData *data) return TRUE; /* From another worker. */ - for (i = 0; i < workers_num; ++i) { - WorkerData *victim_data = &workers_data [i]; - if (data == victim_data) - continue; + for (i = data->index + 1; i < workers_num + data->index; ++i) { + WorkerData *victim_data = &workers_data [i % workers_num]; + g_assert (data != victim_data); if (workers_steal (data, victim_data, TRUE)) return TRUE; } @@ -326,16 +335,16 @@ workers_gray_queue_share_redirect (SgenGrayQueue *queue) while (data->stealable_stack_fill < STEALABLE_STACK_SIZE && (section = sgen_gray_object_dequeue_section (queue))) { - int num = MIN (section->end, STEALABLE_STACK_SIZE - data->stealable_stack_fill); + int num = MIN (section->size, STEALABLE_STACK_SIZE - data->stealable_stack_fill); memcpy (data->stealable_stack + data->stealable_stack_fill, - section->objects + section->end - num, + section->objects + section->size - num, sizeof (char*) * num); - section->end -= num; + section->size -= num; data->stealable_stack_fill += num; - if (section->end) + if (section->size) sgen_gray_object_enqueue_section (queue, section); else sgen_gray_object_free_queue_section (section); @@ -459,6 +468,8 @@ sgen_workers_init (int num_workers) workers_gc_thread_major_collector_data = sgen_get_major_collector ()->alloc_worker_data (); for (i = 0; i < workers_num; ++i) { + workers_data [i].index = i; + /* private gray queue is inited by the thread itself */ mono_mutex_init (&workers_data [i].stealable_stack_mutex); workers_data [i].stealable_stack_fill = 0; diff --git a/mono/metadata/sgen-workers.h b/mono/metadata/sgen-workers.h index f5bbf55454..9070623673 100644 --- a/mono/metadata/sgen-workers.h +++ b/mono/metadata/sgen-workers.h @@ -26,6 +26,7 @@ typedef struct _WorkerData WorkerData; struct _WorkerData { + int index; MonoNativeThreadId thread; void *major_collector_data; diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c index b160096e92..cbce0f7726 100644 --- a/mono/metadata/socket-io.c +++ b/mono/metadata/socket-io.c @@ -1216,7 +1216,7 @@ static struct sockaddr *create_sockaddr_from_object(MonoObject *saddr_obj, /* Need a byte for the '\0' terminator/prefix, and the first * two bytes hold the SocketAddress family */ - if (len - 2 >= MONO_SIZEOF_SUNPATH) { + if (len - 2 >= sizeof(sock_un->sun_path)) { mono_raise_exception (mono_get_exception_index_out_of_range ()); } diff --git a/mono/metadata/socket-io.h b/mono/metadata/socket-io.h index 825d4330ff..2694483944 100644 --- a/mono/metadata/socket-io.h +++ b/mono/metadata/socket-io.h @@ -191,7 +191,7 @@ typedef struct gint gid; } MonoPeerCredData; -extern gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal(MonoObject *this, gint32 family, gint32 type, gint32 proto, gint32 *error) MONO_INTERNAL; +extern gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal(MonoObject *this_obj, gint32 family, gint32 type, gint32 proto, gint32 *error) MONO_INTERNAL; extern void ves_icall_System_Net_Sockets_Socket_Close_internal(SOCKET sock, gint32 *error) MONO_INTERNAL; extern gint32 ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal(void) MONO_INTERNAL; extern gint32 ves_icall_System_Net_Sockets_Socket_Available_internal(SOCKET sock, gint32 *error) MONO_INTERNAL; diff --git a/mono/metadata/string-icalls.h b/mono/metadata/string-icalls.h index a0889ebbf5..a0b831a1e2 100644 --- a/mono/metadata/string-icalls.h +++ b/mono/metadata/string-icalls.h @@ -10,6 +10,7 @@ * (C) 2001 Ximian, Inc. */ +#include #include #include #include "mono/utils/mono-compiler.h" diff --git a/mono/metadata/threadpool-internals.h b/mono/metadata/threadpool-internals.h index 9d73ccdeb3..165445c6a8 100644 --- a/mono/metadata/threadpool-internals.h +++ b/mono/metadata/threadpool-internals.h @@ -1,6 +1,10 @@ #ifndef _MONO_THREADPOOL_INTERNALS_H_ #define _MONO_THREADPOOL_INTERNALS_H_ +#include +#include +#include + void mono_thread_pool_remove_socket (int sock) MONO_INTERNAL; gboolean mono_thread_pool_is_queue_array (MonoArray *o) MONO_INTERNAL; void mono_internal_thread_unhandled_exception (MonoObject* exc) MONO_INTERNAL; diff --git a/mono/metadata/threads-types.h b/mono/metadata/threads-types.h index 431fe93ea0..6aeca4acf5 100644 --- a/mono/metadata/threads-types.h +++ b/mono/metadata/threads-types.h @@ -15,6 +15,7 @@ #include #include +#include #include "mono/utils/mono-compiler.h" #include "mono/utils/mono-membar.h" @@ -58,7 +59,7 @@ MonoInternalThread* mono_thread_create_internal (MonoDomain *domain, gpointer fu void mono_threads_install_cleanup (MonoThreadCleanupFunc func) MONO_INTERNAL; -void ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this) MONO_INTERNAL; +void ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this_obj) MONO_INTERNAL; HANDLE ves_icall_System_Threading_Thread_Thread_internal(MonoThread *this_obj, MonoObject *start) MONO_INTERNAL; void ves_icall_System_Threading_InternalThread_Thread_free_internal(MonoInternalThread *this_obj, HANDLE thread) MONO_INTERNAL; void ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms) MONO_INTERNAL; @@ -184,7 +185,7 @@ void mono_special_static_data_free_slot (guint32 offset, guint32 size) MONO_INTE uint32_t mono_thread_alloc_tls (MonoReflectionType *type) MONO_INTERNAL; void mono_thread_destroy_tls (uint32_t tls_offset) MONO_INTERNAL; void mono_thread_destroy_domain_tls (MonoDomain *domain) MONO_INTERNAL; -void mono_thread_free_local_slot_values (int slot, MonoBoolean thread_local) MONO_INTERNAL; +void mono_thread_free_local_slot_values (int slot, MonoBoolean is_thread_local) MONO_INTERNAL; void mono_thread_current_check_pending_interrupt (void) MONO_INTERNAL; void mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state) MONO_INTERNAL; diff --git a/mono/metadata/threads.c.REMOVED.git-id b/mono/metadata/threads.c.REMOVED.git-id index 3e9a00576e..f49175a202 100644 --- a/mono/metadata/threads.c.REMOVED.git-id +++ b/mono/metadata/threads.c.REMOVED.git-id @@ -1 +1 @@ -689e4e294880af8ac185598acc0bdf1b329facc9 \ No newline at end of file +0867b3dee8509793a824eb9bc44ed098c762db7e \ No newline at end of file diff --git a/mono/metadata/verify-internals.h b/mono/metadata/verify-internals.h index 8a999f81d6..d02816f656 100644 --- a/mono/metadata/verify-internals.h +++ b/mono/metadata/verify-internals.h @@ -1,7 +1,10 @@ #ifndef __MONO_METADATA_VERIFY_INTERNAL_H__ #define __MONO_METADATA_VERIFY_INTERNAL_H__ +#include #include +#include +#include G_BEGIN_DECLS @@ -21,7 +24,7 @@ gboolean mono_verifier_is_enabled_for_class (MonoClass *klass) MONO_INTERNAL; gboolean mono_verifier_is_method_full_trust (MonoMethod *method) MONO_INTERNAL; gboolean mono_verifier_is_class_full_trust (MonoClass *klass) MONO_INTERNAL; -gboolean mono_verifier_class_is_valid_generic_instantiation (MonoClass *class) MONO_INTERNAL; +gboolean mono_verifier_class_is_valid_generic_instantiation (MonoClass *klass) MONO_INTERNAL; gboolean mono_verifier_is_method_valid_generic_instantiation (MonoMethod *method) MONO_INTERNAL; gboolean mono_verifier_verify_class (MonoClass *klass) MONO_INTERNAL; diff --git a/mono/metadata/verify.c.REMOVED.git-id b/mono/metadata/verify.c.REMOVED.git-id index 2d3bc11bfd..9398c849f2 100644 --- a/mono/metadata/verify.c.REMOVED.git-id +++ b/mono/metadata/verify.c.REMOVED.git-id @@ -1 +1 @@ -3c29b116e4c5522eb4a9176455a8c10ee2d8a9c2 \ No newline at end of file +50781a4bbf4016b6955b6eb6f6a40211525dc3a3 \ No newline at end of file diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index cd935b50bb..f928eec806 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -276,9 +276,15 @@ endif # Create monow.exe, linked for the 'windows' subsystem if HOST_WIN32 +if SUPPORT_BOEHM monow_LDADD = $(mono_boehm_LDADD) monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows monow_SOURCES = $(mono_boehm_SOURCES) +else +monow_LDADD = $(mono_sgen_LDADD) +monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows +monow_SOURCES = $(mono_sgen_SOURCES) +endif endif genmdesc_SOURCES = \ @@ -426,7 +432,8 @@ common_sources = \ xdebug.c \ mini-llvm.h \ mini-llvm-cpp.h \ - alias-analysis.c + alias-analysis.c \ + mini-cross-helpers.c test_sources = \ basic-calls.cs \ diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index cd935b50bb..f928eec806 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -276,9 +276,15 @@ endif # Create monow.exe, linked for the 'windows' subsystem if HOST_WIN32 +if SUPPORT_BOEHM monow_LDADD = $(mono_boehm_LDADD) monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows monow_SOURCES = $(mono_boehm_SOURCES) +else +monow_LDADD = $(mono_sgen_LDADD) +monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows +monow_SOURCES = $(mono_sgen_SOURCES) +endif endif genmdesc_SOURCES = \ @@ -426,7 +432,8 @@ common_sources = \ xdebug.c \ mini-llvm.h \ mini-llvm-cpp.h \ - alias-analysis.c + alias-analysis.c \ + mini-cross-helpers.c test_sources = \ basic-calls.cs \ diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index 6e1933f7dc..bd848b8f31 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -c3babf4940c0a25ae27669a385bec1e9d8d047a4 \ No newline at end of file +2f30bdbf60795aee40ea0f4f24cae680080b15fa \ No newline at end of file diff --git a/mono/mini/alias-analysis.c b/mono/mini/alias-analysis.c index bc5bd8e012..c260dae2c7 100644 --- a/mono/mini/alias-analysis.c +++ b/mono/mini/alias-analysis.c @@ -156,6 +156,7 @@ lower_memory_access (MonoCompile *cfg) g_hash_table_remove_all (addr_loads); for (ins = bb->code; ins; ins = ins->next) { +handle_instruction: switch (ins->opcode) { case OP_LDADDR: g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins); @@ -197,7 +198,11 @@ lower_memory_access (MonoCompile *cfg) tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1)); if (tmp) { if (cfg->verbose_level > 2) { printf ("Found candidate load:"); mono_print_ins (ins); } - needs_dce |= lower_load (cfg, ins, tmp); + if (lower_load (cfg, ins, tmp)) { + needs_dce = TRUE; + /* Try to propagate known aliases if an OP_MOVE was inserted */ + goto handle_instruction; + } } break; @@ -214,7 +219,11 @@ lower_memory_access (MonoCompile *cfg) tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg)); if (tmp) { if (cfg->verbose_level > 2) { printf ("Found candidate store:"); mono_print_ins (ins); } - needs_dce |= lower_store (cfg, ins, tmp); + if (lower_store (cfg, ins, tmp)) { + needs_dce = TRUE; + /* Try to propagate known aliases if an OP_MOVE was inserted */ + goto handle_instruction; + } } break; @@ -229,6 +238,15 @@ lower_memory_access (MonoCompile *cfg) needs_dce |= lower_store_imm (cfg, ins, tmp); } break; + case OP_CHECK_THIS: + case OP_NOT_NULL: + tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1)); + if (tmp) { + if (cfg->verbose_level > 2) { printf ("Found null check over local: "); mono_print_ins (ins); } + NULLIFY_INS (ins); + needs_dce = TRUE; + } + break; } } } @@ -237,13 +255,14 @@ lower_memory_access (MonoCompile *cfg) } static gboolean -recompute_aliased_variables (MonoCompile *cfg) +recompute_aliased_variables (MonoCompile *cfg, int *restored_vars) { int i; MonoBasicBlock *bb; MonoInst *ins; int kills = 0; int adds = 0; + *restored_vars = 0; for (i = 0; i < cfg->num_varinfo; i++) { MonoInst *var = cfg->varinfo [i]; @@ -275,7 +294,8 @@ recompute_aliased_variables (MonoCompile *cfg) } } } - + *restored_vars = adds; + mono_jit_stats.alias_found += kills; mono_jit_stats.alias_removed += kills - adds; if (kills > adds) { @@ -299,6 +319,7 @@ TODO: void mono_local_alias_analysis (MonoCompile *cfg) { + int i, restored_vars = 1; if (!cfg->has_indirection) return; @@ -319,17 +340,18 @@ mono_local_alias_analysis (MonoCompile *cfg) /* Some variables no longer need to be flagged as indirect, find them. + Since indirect vars are converted into global vregs, each pass eliminates only one level of indirection. + Most cases only need one pass and some 2. */ - if (!recompute_aliased_variables (cfg)) - goto done; - - /* - A lot of simplification just took place, we recompute local variables and do DCE to - really profit from the previous gains - */ - mono_handle_global_vregs (cfg); - if (cfg->opt & MONO_OPT_DEADCE) - mono_local_deadce (cfg); + for (i = 0; i < 3 && restored_vars > 0 && recompute_aliased_variables (cfg, &restored_vars); ++i) { + /* + A lot of simplification just took place, we recompute local variables and do DCE to + really profit from the previous gains + */ + mono_handle_global_vregs (cfg); + if (cfg->opt & MONO_OPT_DEADCE) + mono_local_deadce (cfg); + } done: if (cfg->verbose_level > 2) diff --git a/mono/mini/aot-compiler.c.REMOVED.git-id b/mono/mini/aot-compiler.c.REMOVED.git-id index 2aa99d1a64..9b61960c77 100644 --- a/mono/mini/aot-compiler.c.REMOVED.git-id +++ b/mono/mini/aot-compiler.c.REMOVED.git-id @@ -1 +1 @@ -59569b46563ffd6d0a1b832feb1a0c35a6d557cc \ No newline at end of file +aa04ced89dd20f011d9fa71594f5bdbfd6910623 \ No newline at end of file diff --git a/mono/mini/aot-runtime.c.REMOVED.git-id b/mono/mini/aot-runtime.c.REMOVED.git-id index 1e713d13a2..4bbaf64d85 100644 --- a/mono/mini/aot-runtime.c.REMOVED.git-id +++ b/mono/mini/aot-runtime.c.REMOVED.git-id @@ -1 +1 @@ -5ff4c985a0a8925043dff955b45ee85703bf6f19 \ No newline at end of file +c140ec6e354229a054147083fe8815d2856dc711 \ No newline at end of file diff --git a/mono/mini/basic-calls.cs b/mono/mini/basic-calls.cs index 41cb62405c..bc3a617e18 100644 --- a/mono/mini/basic-calls.cs +++ b/mono/mini/basic-calls.cs @@ -129,12 +129,12 @@ class Tests return pass_bytes (0, 1, 2, 3, 4, 5, 6); } - static int pass_sbytes (sbyte a, sbyte b, sbyte c, sbyte d, sbyte e, sbyte f, sbyte g) { - return (int)(a + b + c + d + e + f + g); + static int pass_sbytes (sbyte a, sbyte b, sbyte c, sbyte d, sbyte e, sbyte f, sbyte g, sbyte h1, sbyte h2, sbyte h3, sbyte h4) { + return (int)(a + b + c + d + e + f + g + h1 + h2 + h3 + h4); } - public static int test_21_sparc_sbyte_argument_passing () { - return pass_sbytes (0, 1, 2, 3, 4, 5, 6); + public static int test_55_sparc_sbyte_argument_passing () { + return pass_sbytes (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); } static int pass_shorts (short a, short b, short c, short d, short e, short f, short g) { diff --git a/mono/mini/basic-long.cs b/mono/mini/basic-long.cs index 96db6ca37f..1d81232c3a 100644 --- a/mono/mini/basic-long.cs +++ b/mono/mini/basic-long.cs @@ -1211,5 +1211,57 @@ class Tests return (int)res; } + + public static int test_0_lrem_imm_1 () { + long b = 12L; + return (int)(b % 1L); + } + + public static int test_0_lrem_imm_1_neg () { + long b = -2L; + return (int)(b % 1L); + } + + public static int test_0_lrem_imm_2 () + { + long x = 245345634L; + return (int)(x % 2L); + } + + public static int test_1_lrem_imm_2 () + { + long x = 24534553245L; + return (int)(x % 2L); + } + + public static int test_1_lrem_imm_2_neg () + { + long x = -24534553245L; + return -(int)(x % 2L); + } + + public static int test_13_lrem_imm_32 () + { + long x = 17389L; + return (int)(x % 32L); + } + + public static int test_27_lrem_imm_32_neg () + { + long x = -2435323L; + return -(int)(x % 32L); + } + + public static int test_5_lrem_imm_large () + { + long x = 0x1000000005L; + return (int)(x % 0x40000000L); + } + + public static int test_5_lrem_imm_too_large () + { + long x = 0x1000000005L; + return (int)(x % 0x80000000L); + } } diff --git a/mono/mini/cpu-amd64.md b/mono/mini/cpu-amd64.md index 5107e999fa..bb6f32f9e6 100644 --- a/mono/mini/cpu-amd64.md +++ b/mono/mini/cpu-amd64.md @@ -293,15 +293,13 @@ amd64_icompare_reg_membase: src1:i src2:b len:8 amd64_set_xmmreg_r4: dest:f src1:f len:14 clob:m amd64_set_xmmreg_r8: dest:f src1:f len:14 clob:m amd64_save_sp_to_lmf: len:16 -tls_get: dest:i len:16 +tls_get: dest:i len:32 tls_get_reg: dest:i src1:i len:32 tls_set: src1:i len:16 tls_set_reg: src1:i src2:i len:32 atomic_add_i4: src1:b src2:i dest:i len:32 -atomic_add_new_i4: src1:b src2:i dest:i len:32 -atomic_exchange_i4: src1:b src2:i dest:a len:32 atomic_add_i8: src1:b src2:i dest:i len:32 -atomic_add_new_i8: src1:b src2:i dest:i len:32 +atomic_exchange_i4: src1:b src2:i dest:a len:32 atomic_exchange_i8: src1:b src2:i dest:a len:32 atomic_cas_i4: src1:b src2:i src3:a dest:a len:24 atomic_cas_i8: src1:b src2:i src3:a dest:a len:24 @@ -353,7 +351,6 @@ int_sub_imm: dest:i src1:i clob:1 len:8 nacl:10 int_mul_imm: dest:i src1:i clob:1 len:32 int_div_imm: dest:a src1:i clob:d len:32 int_div_un_imm: dest:a src1:i clob:d len:32 -int_rem_imm: dest:a src1:a len:32 clob:d int_rem_un_imm: dest:d src1:i clob:a len:32 int_and_imm: dest:i src1:i clob:1 len:8 int_or_imm: dest:i src1:i clob:1 len:8 diff --git a/mono/mini/cpu-arm.md b/mono/mini/cpu-arm.md index 367cb5d4c5..431936113c 100644 --- a/mono/mini/cpu-arm.md +++ b/mono/mini/cpu-arm.md @@ -347,6 +347,6 @@ gc_liveness_use: len:0 gc_spill_slot_liveness_def: len:0 gc_param_slot_liveness_def: len:0 +atomic_add_i4: dest:i src1:i src2:i len:64 atomic_exchange_i4: dest:i src1:i src2:i len:64 atomic_cas_i4: dest:i src1:i src2:i src3:i len:64 -atomic_add_new_i4: dest:i src1:i src2:i len:64 diff --git a/mono/mini/cpu-arm64.md b/mono/mini/cpu-arm64.md index d57b6eeda2..7d9e40b226 100644 --- a/mono/mini/cpu-arm64.md +++ b/mono/mini/cpu-arm64.md @@ -414,8 +414,8 @@ arm64_cbzx: src1:i len:16 arm64_cbnzw: src1:i len:16 arm64_cbnzx: src1:i len:16 -atomic_add_new_i4: dest:i src1:i src2:i len:32 -atomic_add_new_i8: dest:i src1:i src2:i len:32 +atomic_add_i4: dest:i src1:i src2:i len:32 +atomic_add_i8: dest:i src1:i src2:i len:32 atomic_exchange_i4: dest:i src1:i src2:i len:32 atomic_exchange_i8: dest:i src1:i src2:i len:32 atomic_cas_i4: dest:i src1:i src2:i src3:i len:32 diff --git a/mono/mini/cpu-ia64.md b/mono/mini/cpu-ia64.md index 5d4fec0443..0bae69301b 100644 --- a/mono/mini/cpu-ia64.md +++ b/mono/mini/cpu-ia64.md @@ -153,14 +153,12 @@ endfinally: len:96 aot_const: dest:i len:48 tls_get: dest:i len:48 atomic_add_i4: src1:b src2:i dest:i len:48 -atomic_add_new_i4: src1:b src2:i dest:i len:48 -atomic_exchange_i4: src1:b src2:i dest:i len:48 atomic_add_i8: src1:b src2:i dest:i len:48 -atomic_add_new_i8: src1:b src2:i dest:i len:48 -atomic_add_imm_new_i4: src1:b dest:i len:48 -atomic_add_imm_new_i8: src1:b dest:i len:48 +atomic_exchange_i4: src1:b src2:i dest:i len:48 atomic_exchange_i8: src1:b src2:i dest:i len:48 memory_barrier: len:48 +atomic_add_imm_i4: src1:b dest:i len:48 +atomic_add_imm_i8: src1:b dest:i len:48 adc: dest:i src1:i src2:i len:48 addcc: dest:i src1:i src2:i len:48 subcc: dest:i src1:i src2:i len:48 diff --git a/mono/mini/cpu-ppc.md b/mono/mini/cpu-ppc.md index f21320cabd..44a482aad1 100644 --- a/mono/mini/cpu-ppc.md +++ b/mono/mini/cpu-ppc.md @@ -313,4 +313,5 @@ vcall2_membase: src1:b len:16 clob:c jump_table: dest:i len:8 -atomic_cas_i4: src1:b src2:i src3:i dest:i len:30 +atomic_add_i4: src1:b src2:i dest:i len:20 +atomic_cas_i4: src1:b src2:i src3:i dest:i len:38 diff --git a/mono/mini/cpu-ppc64.md b/mono/mini/cpu-ppc64.md index 4bf27a306e..114bc3cf3b 100644 --- a/mono/mini/cpu-ppc64.md +++ b/mono/mini/cpu-ppc64.md @@ -380,8 +380,7 @@ vcall2_membase: src1:b len:16 clob:c jump_table: dest:i len:20 -atomic_add_new_i4: src1:b src2:i dest:i len:20 -atomic_add_new_i8: src1:b src2:i dest:i len:20 - -atomic_cas_i4: src1:b src2:i src3:i dest:i len:30 -atomic_cas_i8: src1:b src2:i src3:i dest:i len:30 +atomic_add_i4: src1:b src2:i dest:i len:20 +atomic_add_i8: src1:b src2:i dest:i len:20 +atomic_cas_i4: src1:b src2:i src3:i dest:i len:38 +atomic_cas_i8: src1:b src2:i src3:i dest:i len:38 diff --git a/mono/mini/cpu-s390x.md b/mono/mini/cpu-s390x.md index be6a3509d1..b3dce352ec 100644 --- a/mono/mini/cpu-s390x.md +++ b/mono/mini/cpu-s390x.md @@ -56,8 +56,6 @@ and_imm: dest:i src1:i len:24 aot_const: dest:i len:8 atomic_add_i4: src1:b src2:i dest:i len:28 atomic_add_i8: src1:b src2:i dest:i len:30 -atomic_add_new_i4: src1:b src2:i dest:i len:28 -atomic_add_new_i8: src1:b src2:i dest:i len:30 atomic_exchange_i4: src1:b src2:i dest:i len:18 atomic_exchange_i8: src1:b src2:i dest:i len:24 br: len:6 @@ -118,11 +116,11 @@ float_conv_to_i2: dest:i src1:f len:50 float_conv_to_i4: dest:i src1:f len:50 float_conv_to_i8: dest:l src1:f len:50 float_conv_to_i: dest:i src1:f len:52 -float_conv_to_r4: dest:f src1:f len:4 -float_conv_to_u1: dest:i src1:f len:66 -float_conv_to_u2: dest:i src1:f len:66 -float_conv_to_u4: dest:i src1:f len:66 -float_conv_to_u8: dest:i src1:f len:66 +float_conv_to_r4: dest:f src1:f len:8 +float_conv_to_u1: dest:i src1:f len:72 +float_conv_to_u2: dest:i src1:f len:72 +float_conv_to_u4: dest:i src1:f len:72 +float_conv_to_u8: dest:i src1:f len:72 float_conv_to_u: dest:i src1:f len:36 float_div: dest:f src1:f src2:f len:6 float_div_un: dest:f src1:f src2:f len:6 @@ -135,27 +133,25 @@ float_sub: dest:f src1:f src2:f len:6 fmove: dest:f src1:f len:4 i8const: dest:i len:20 icompare: src1:i src2:i len:4 -icompare_imm: src1:i len:14 +icompare_imm: src1:i len:18 iconst: dest:i len:40 - - jmp: len:46 label: len:0 lcall: dest:o len:22 clob:c lcall_membase: dest:o src1:b len:12 clob:c lcall_reg: dest:o src1:i len:8 clob:c lcompare: src1:i src2:i len:4 -load_membase: dest:i src1:b len:26 +load_membase: dest:i src1:b len:30 loadi1_membase: dest:i src1:b len:40 -loadi2_membase: dest:i src1:b len:26 -loadi4_membase: dest:i src1:b len:26 -loadi8_membase: dest:i src1:b len:26 +loadi2_membase: dest:i src1:b len:30 +loadi4_membase: dest:i src1:b len:30 +loadi8_membase: dest:i src1:b len:30 loadr4_membase: dest:f src1:b len:28 loadr8_membase: dest:f src1:b len:28 -loadu1_membase: dest:i src1:b len:26 -loadu2_membase: dest:i src1:b len:26 +loadu1_membase: dest:i src1:b len:30 +loadu2_membase: dest:i src1:b len:30 loadu4_mem: dest:i len:8 -loadu4_membase: dest:i src1:b len:26 +loadu4_membase: dest:i src1:b len:30 localloc: dest:i src1:i len:106 memory_barrier: len: 10 move: dest:i src1:i len:4 @@ -177,7 +173,7 @@ s390_move: len:48 dest:b src1:b s390_setf4ret: dest:f src1:f len:4 sbb: dest:i src1:i src2:i len:6 sbb_imm: dest:i src1:i len:14 -seq_point: len:36 +seq_point: len:54 sext_i4: dest:i src1:i len:4 zext_i4: dest:i src1:i len:4 shl_imm: dest:i src1:i len:10 diff --git a/mono/mini/cpu-x86.md b/mono/mini/cpu-x86.md index b239ed0e76..ca87f2fba4 100644 --- a/mono/mini/cpu-x86.md +++ b/mono/mini/cpu-x86.md @@ -149,7 +149,7 @@ call_membase: dest:a src1:b len:16 nacl:18 clob:c iconst: dest:i len:5 r4const: dest:f len:15 r8const: dest:f len:16 -store_membase_imm: dest:b len:10 +store_membase_imm: dest:b len:11 store_membase_reg: dest:b src1:i len:7 storei1_membase_imm: dest:b len:10 storei1_membase_reg: dest:b src1:y len:7 @@ -301,12 +301,11 @@ bigmul: len:2 dest:l src1:a src2:i bigmul_un: len:2 dest:l src1:a src2:i sext_i1: dest:i src1:y len:3 sext_i2: dest:i src1:y len:3 -tls_get: dest:i len:20 +tls_get: dest:i len:32 tls_get_reg: dest:i src1:i len:20 tls_set: src1:i len:20 tls_set_reg: src1:i src2:i len:20 atomic_add_i4: src1:b src2:i dest:i len:16 -atomic_add_new_i4: src1:b src2:i dest:i len:16 atomic_exchange_i4: src1:b src2:i dest:a len:24 atomic_cas_i4: src1:b src2:i src3:a dest:a len:24 memory_barrier: len:16 diff --git a/mono/mini/debug-mini.c b/mono/mini/debug-mini.c index 3167fa5a47..742b6e93d9 100644 --- a/mono/mini/debug-mini.c +++ b/mono/mini/debug-mini.c @@ -689,7 +689,7 @@ mono_debug_print_vars (gpointer ip, gboolean only_arguments) * breakpoint when the method is JITed. */ -static GPtrArray *breakpoints = NULL; +static GPtrArray *breakpoints; static int mono_debugger_insert_breakpoint_full (MonoMethodDesc *desc) diff --git a/mono/mini/debugger-agent.c.REMOVED.git-id b/mono/mini/debugger-agent.c.REMOVED.git-id index 65f3e4e3e3..1313ef98f1 100644 --- a/mono/mini/debugger-agent.c.REMOVED.git-id +++ b/mono/mini/debugger-agent.c.REMOVED.git-id @@ -1 +1 @@ -d7a903adbeda21cbbb73300054996c178fe17857 \ No newline at end of file +d902826ab2807876bb0f589ad1b55726178a92ac \ No newline at end of file diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c index e9536e9f52..07242d8613 100644 --- a/mono/mini/decompose.c +++ b/mono/mini/decompose.c @@ -13,6 +13,7 @@ #include "jit-icalls.h" #include +#include #ifndef DISABLE_JIT @@ -476,6 +477,43 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins) break; #endif +#if SIZEOF_REGISTER == 8 + case OP_LREM_IMM: +#endif + case OP_IREM_IMM: { + int power = mono_is_power_of_two (ins->inst_imm); + if (ins->inst_imm == 1) { + ins->opcode = OP_ICONST; + MONO_INST_NULLIFY_SREGS (ins); + ins->inst_c0 = 0; + } else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && (power != -1)) { + gboolean is_long = ins->opcode == OP_LREM_IMM; + int compensator_reg = alloc_ireg (cfg); + int intermediate_reg; + + /* Based on gcc code */ + + /* Add compensation for negative numerators */ + + if (power > 1) { + intermediate_reg = compensator_reg; + MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LSHR_IMM : OP_SHR_IMM, intermediate_reg, ins->sreg1, is_long ? 63 : 31); + } else { + intermediate_reg = ins->sreg1; + } + + MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LSHR_UN_IMM : OP_SHR_UN_IMM, compensator_reg, intermediate_reg, (is_long ? 64 : 32) - power); + MONO_EMIT_NEW_BIALU (cfg, is_long ? OP_LADD : OP_IADD, ins->dreg, ins->sreg1, compensator_reg); + /* Compute remainder */ + MONO_EMIT_NEW_BIALU_IMM (cfg, is_long ? OP_LAND_IMM : OP_AND_IMM, ins->dreg, ins->dreg, (1 << power) - 1); + /* Remove compensation */ + MONO_EMIT_NEW_BIALU (cfg, is_long ? OP_LSUB : OP_ISUB, ins->dreg, ins->dreg, compensator_reg); + + NULLIFY_INS (ins); + } + break; + } + default: emulate = TRUE; break; @@ -1519,7 +1557,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg) switch (ins->opcode) { case OP_LDLEN: NEW_LOAD_MEMBASE_FLAGS (cfg, dest, OP_LOADI4_MEMBASE, ins->dreg, ins->sreg1, - G_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD); + MONO_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD); MONO_ADD_INS (cfg->cbb, dest); break; case OP_BOUNDS_CHECK: @@ -1558,7 +1596,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg) break; case OP_STRLEN: MONO_EMIT_NEW_LOAD_MEMBASE_OP_FLAGS (cfg, OP_LOADI4_MEMBASE, ins->dreg, - ins->sreg1, G_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD); + ins->sreg1, MONO_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD); break; default: break; diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 5855b81ca9..3a67c37ecb 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -57,7 +57,7 @@ #include "version.h" #include "debugger-agent.h" -static FILE *mini_stats_fd = NULL; +static FILE *mini_stats_fd; static void mini_usage (void); @@ -1308,7 +1308,6 @@ static const char info[] = #ifdef HOST_WIN32 BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved) { - int dummy; if (!mono_gc_dllmain (module_handle, reason, reserved)) return FALSE; @@ -1518,9 +1517,6 @@ mono_main (int argc, char* argv[]) if (g_getenv ("MONO_NO_SMP")) mono_set_use_smp (FALSE); - if (!g_thread_supported ()) - g_thread_init (NULL); - g_log_set_always_fatal (G_LOG_LEVEL_ERROR); g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR); diff --git a/mono/mini/exceptions-amd64.c b/mono/mini/exceptions-amd64.c index bd9847c417..2a253a8cef 100644 --- a/mono/mini/exceptions-amd64.c +++ b/mono/mini/exceptions-amd64.c @@ -10,12 +10,6 @@ #include -#if _WIN32_WINNT < 0x0501 -/* Required for Vectored Exception Handling. */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif /* _WIN32_WINNT < 0x0501 */ - #include #include #include @@ -25,6 +19,7 @@ #endif #include +#include #include #include #include @@ -48,7 +43,6 @@ static MonoW32ExceptionHandler segv_handler; LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter; void *mono_win_vectored_exception_handle; -extern gboolean mono_win_chained_exception_needs_run; #define W32_SEH_HANDLE_EX(_ex) \ if (_ex##_handler) _ex##_handler(0, ep, sctx) @@ -76,8 +70,13 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep) CONTEXT* ctx; MonoContext* sctx; LONG res; + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); - mono_win_chained_exception_needs_run = FALSE; + /* If the thread is not managed by the runtime return early */ + if (!jit_tls) + return EXCEPTION_CONTINUE_SEARCH; + + jit_tls->mono_win_chained_exception_needs_run = FALSE; res = EXCEPTION_CONTINUE_EXECUTION; er = ep->ExceptionRecord; @@ -115,10 +114,11 @@ static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep) W32_SEH_HANDLE_EX(fpe); break; default: + jit_tls->mono_win_chained_exception_needs_run = TRUE; break; } - if (mono_win_chained_exception_needs_run) { + if (jit_tls->mono_win_chained_exception_needs_run) { /* Don't copy context back if we chained exception * as the handler may have modfied the EXCEPTION_POINTERS * directly. We don't pass sigcontext to chained handlers. @@ -208,21 +208,21 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) amd64_mov_reg_reg (code, AMD64_R11, AMD64_ARG_REG1, 8); /* Restore all registers except %rip and %r11 */ - amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rax), 8); - amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rcx), 8); - amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rdx), 8); - amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rbx), 8); - amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rbp), 8); - amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsi), 8); - amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rdi), 8); - //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r8), 8); - //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r9), 8); - //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r10), 8); - amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r12), 8); - amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r13), 8); - amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r14), 8); + amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rax), 8); + amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rcx), 8); + amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rdx), 8); + amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rbx), 8); + amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rbp), 8); + amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rsi), 8); + amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rdi), 8); + //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r8), 8); + //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r9), 8); + //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r10), 8); + amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r12), 8); + amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r13), 8); + amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r14), 8); #if !defined(__native_client_codegen__) - amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r15), 8); + amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r15), 8); #endif /* @@ -233,8 +233,8 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) * size. Hence the stack pointer can be restored only after * we have finished loading everything from the context. */ - amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsp), 8); - amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rip), 8); + amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rsp), 8); + amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rip), 8); amd64_mov_reg_reg (code, AMD64_RSP, AMD64_R8, 8); /* jump to the saved IP */ @@ -294,18 +294,18 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) amd64_alu_reg_imm (code, X86_SUB, AMD64_RSP, 8); /* set new EBP */ - amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbp), 8); + amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbp), 8); /* load callee saved regs */ - amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbx), 8); - amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r12), 8); - amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r13), 8); - amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r14), 8); + amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbx), 8); + amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r12), 8); + amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r13), 8); + amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r14), 8); #if !defined(__native_client_codegen__) - amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r15), 8); + amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r15), 8); #endif #ifdef TARGET_WIN32 - amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rdi), 8); - amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rsi), 8); + amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rdi), 8); + amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rsi), 8); #endif /* call the handler */ @@ -591,6 +591,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, guint8 *cfa; guint32 unwind_info_len; guint8 *unwind_info; + guint8 *epilog; frame->type = FRAME_TYPE_MANAGED; @@ -603,6 +604,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, printf ("%s %p %p\n", ji->d.method->name, ji->code_start, ip); mono_print_unwind_info (unwind_info, unwind_info_len); */ + epilog = (guint8*)ji->code_start + ji->code_size - (ji->unwind_info >> 16); regs [AMD64_RAX] = new_ctx->rax; regs [AMD64_RBX] = new_ctx->rbx; @@ -620,7 +622,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, MONO_MAX_IREGS + 1, + ip, &epilog, regs, MONO_MAX_IREGS + 1, save_locations, MONO_MAX_IREGS, &cfa); new_ctx->rax = regs [AMD64_RAX]; @@ -643,11 +645,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, /* Adjust IP */ new_ctx->rip --; - if (*lmf && ((*lmf) != jit_tls->first_lmf) && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->rsp)) { - /* remove any unused lmf */ - *lmf = (gpointer)(((guint64)(*lmf)->previous_lmf) & ~7); - } - #ifndef MONO_AMD64_NO_PUSHES /* Pop arguments off the stack */ if (ji->has_arch_eh_info) @@ -1405,36 +1402,25 @@ mono_tasklets_arch_restore (void) amd64_mov_reg_reg (code, cont_reg, MONO_AMD64_ARG_REG1, 8); amd64_mov_reg_reg (code, AMD64_RAX, MONO_AMD64_ARG_REG2, 8); /* setup the copy of the stack */ - amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int)); + amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int)); amd64_shift_reg_imm (code, X86_SHR, AMD64_RCX, 3); x86_cld (code); - amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer)); - amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer)); + amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer)); + amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer)); amd64_prefix (code, X86_REP_PREFIX); amd64_movsl (code); /* now restore the registers from the LMF */ - amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, lmf), 8); - amd64_mov_reg_membase (code, AMD64_RBX, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rbx), 8); - amd64_mov_reg_membase (code, AMD64_RBP, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rbp), 8); - amd64_mov_reg_membase (code, AMD64_R12, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r12), 8); - amd64_mov_reg_membase (code, AMD64_R13, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r13), 8); - amd64_mov_reg_membase (code, AMD64_R14, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r14), 8); -#if !defined(__native_client_codegen__) - amd64_mov_reg_membase (code, AMD64_R15, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, r15), 8); -#endif -#ifdef TARGET_WIN32 - amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rdi), 8); - amd64_mov_reg_membase (code, AMD64_RSI, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rsi), 8); -#endif - amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rsp), 8); + NOT_IMPLEMENTED; + amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 8); + amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, MONO_STRUCT_OFFSET (MonoLMF, rsp), 8); /* restore the lmf chain */ /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4); x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/ /* state is already in rax */ - amd64_jump_membase (code, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_ip)); + amd64_jump_membase (code, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_ip)); g_assert ((code - start) <= kMaxCodeSize); nacl_global_codeman_validate(&start, kMaxCodeSize, &code); diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c index 1e8d571de0..d7fd3318f3 100644 --- a/mono/mini/exceptions-arm.c +++ b/mono/mini/exceptions-arm.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -61,16 +62,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) ctx_reg = ARMREG_R0; if (!mono_arch_is_soft_float ()) { - ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, fregs)); + ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, fregs)); ARM_FLDMD (code, ARM_VFP_D0, 16, ARMREG_IP); } /* move pc to PC */ - ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc)); - ARM_STR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t))); + ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc)); + ARM_STR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t))); /* restore everything */ - ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs)); + ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs)); ARM_LDM (code, ARMREG_IP, 0xffff); /* never reached */ @@ -111,8 +112,8 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) /* restore all the regs from ctx (in r0), but not sp, the stack pointer */ ctx_reg = ARMREG_R0; - ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc)); - ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t))); + ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc)); + ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t))); ARM_LDM (code, ARMREG_LR, MONO_ARM_REGSAVE_MASK); /* call handler at eip (r1) and set the first arg with the exception (r2) */ ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_R2); @@ -423,7 +424,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, MONO_MAX_IREGS + 8, + ip, NULL, regs, MONO_MAX_IREGS + 8, save_locations, MONO_MAX_IREGS, &cfa); for (i = 0; i < 16; ++i) @@ -435,11 +436,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, new_ctx->fregs [8 + i] = regs [MONO_MAX_IREGS + i]; #endif - if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->sp)) { - /* remove any unused lmf */ - *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3); - } - /* Clear thumb bit */ new_ctx->pc &= ~1; diff --git a/mono/mini/exceptions-mips.c b/mono/mini/exceptions-mips.c index abfe26ce30..3419714504 100644 --- a/mono/mini/exceptions-mips.c +++ b/mono/mini/exceptions-mips.c @@ -413,7 +413,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, MONO_MAX_IREGS, + ip, NULL, regs, MONO_MAX_IREGS, save_locations, MONO_MAX_IREGS, &cfa); for (i = 0; i < MONO_MAX_IREGS; ++i) @@ -421,11 +421,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, new_ctx->sc_pc = regs [mips_ra]; new_ctx->sc_regs [mips_sp] = (mgreg_t)cfa; - if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->iregs [mips_sp])) { - /* remove any unused lmf */ - *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3); - } - /* we substract 8, so that the IP points into the call instruction */ MONO_CONTEXT_SET_IP (new_ctx, new_ctx->sc_pc - 8); diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c index ca243dfc6e..6c3878e97b 100644 --- a/mono/mini/exceptions-ppc.c +++ b/mono/mini/exceptions-ppc.c @@ -550,7 +550,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, ppc_lr + 1, + ip, NULL, regs, ppc_lr + 1, save_locations, MONO_MAX_IREGS, &cfa); /* we substract 4, so that the IP points into the call instruction */ @@ -561,11 +561,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, new_ctx->regs [i] = regs [ppc_r13 + i]; } - if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) { - /* remove any unused lmf */ - *lmf = (*lmf)->previous_lmf; - } - return TRUE; } else if (*lmf) { diff --git a/mono/mini/exceptions-s390x.c b/mono/mini/exceptions-s390x.c index 38c4a5b987..74c8a0f37a 100644 --- a/mono/mini/exceptions-s390x.c +++ b/mono/mini/exceptions-s390x.c @@ -474,27 +474,17 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, unwind_info = mono_jinfo_get_unwind_info (ji, &unwind_info_len); - if (*lmf && ((*lmf) != jit_tls->first_lmf) && - (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) { - /* remove any unused lmf */ - *lmf = (*lmf)->previous_lmf; - } - address = (char *)ip - (char *)ji->code_start; memcpy(®s, &ctx->uc_mcontext.gregs, sizeof(regs)); mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, - (guint8 *) ji->code_start + ji->code_size, - ip, regs, 16, save_locations, - MONO_MAX_IREGS, &cfa); + (guint8 *) ji->code_start + ji->code_size, + ip, NULL, regs, 16, save_locations, + MONO_MAX_IREGS, &cfa); memcpy (&new_ctx->uc_mcontext.gregs, ®s, sizeof(regs)); MONO_CONTEXT_SET_IP(new_ctx, regs[14] - 2); MONO_CONTEXT_SET_BP(new_ctx, cfa); - if (*lmf && (MONO_CONTEXT_GET_SP (ctx) >= (gpointer)(*lmf)->ebp)) { - /* remove any unused lmf */ - *lmf = (*lmf)->previous_lmf; - } return TRUE; } else if (*lmf) { diff --git a/mono/mini/exceptions-sparc.c b/mono/mini/exceptions-sparc.c index 20d2f0face..3ebe2e7a29 100644 --- a/mono/mini/exceptions-sparc.c +++ b/mono/mini/exceptions-sparc.c @@ -350,11 +350,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, if (ji != NULL) { frame->type = FRAME_TYPE_MANAGED; - if (*lmf && (MONO_CONTEXT_GET_BP (ctx) >= (gpointer)(*lmf)->ebp)) { - /* remove any unused lmf */ - *lmf = (*lmf)->previous_lmf; - } - /* Restore ip and sp from the saved register window */ window = MONO_SPARC_WINDOW_ADDR (ctx->sp); new_ctx->ip = window [sparc_i7 - 16]; diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c index aa10aaad59..d335d7ea5c 100644 --- a/mono/mini/exceptions-x86.c +++ b/mono/mini/exceptions-x86.c @@ -9,16 +9,11 @@ #include -#if _WIN32_WINNT < 0x0501 -/* Required for Vectored Exception Handling. */ -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif /* _WIN32_WINNT < 0x0501 */ - #include #include #include +#include #include #include #include @@ -47,7 +42,6 @@ static MonoW32ExceptionHandler segv_handler; LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter; gpointer mono_win_vectored_exception_handle; -extern gboolean mono_win_chained_exception_needs_run; extern int (*gUnhandledExceptionHandler)(EXCEPTION_POINTERS*); #ifndef PROCESS_CALLBACK_FILTER_ENABLED @@ -95,13 +89,14 @@ mono_win32_get_handle_stackoverflow (void) x86_mov_reg_reg (code, X86_EDI, X86_ESP, 4); /* use the new freed stack from sigcontext */ + /* XXX replace usage of struct sigcontext with MonoContext so we can use MONO_STRUCT_OFFSET */ x86_mov_reg_membase (code, X86_ESP, X86_EBX, G_STRUCT_OFFSET (struct sigcontext, esp), 4); /* get the current domain */ x86_call_code (code, mono_domain_get); /* get stack overflow exception from domain object */ - x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4); + x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4); /* call mono_arch_handle_exception (sctx, stack_overflow_exception_obj) */ x86_push_reg (code, X86_EAX); @@ -196,8 +191,13 @@ LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep) CONTEXT* ctx; struct sigcontext* sctx; LONG res; + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); - mono_win_chained_exception_needs_run = FALSE; + /* If the thread is not managed by the runtime return early */ + if (!jit_tls) + return EXCEPTION_CONTINUE_SEARCH; + + jit_tls->mono_win_chained_exception_needs_run = FALSE; res = EXCEPTION_CONTINUE_EXECUTION; er = ep->ExceptionRecord; @@ -234,10 +234,11 @@ LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep) W32_SEH_HANDLE_EX(fpe); break; default: + jit_tls->mono_win_chained_exception_needs_run = TRUE; break; } - if (mono_win_chained_exception_needs_run) { + if (jit_tls->mono_win_chained_exception_needs_run) { /* Don't copy context back if we chained exception * as the handler may have modfied the EXCEPTION_POINTERS * directly. We don't pass sigcontext to chained handlers. @@ -321,16 +322,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4); /* restore EBX */ - x86_mov_reg_membase (code, X86_EBX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebx), 4); + x86_mov_reg_membase (code, X86_EBX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebx), 4); /* restore EDI */ - x86_mov_reg_membase (code, X86_EDI, X86_EAX, G_STRUCT_OFFSET (MonoContext, edi), 4); + x86_mov_reg_membase (code, X86_EDI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edi), 4); /* restore ESI */ - x86_mov_reg_membase (code, X86_ESI, X86_EAX, G_STRUCT_OFFSET (MonoContext, esi), 4); + x86_mov_reg_membase (code, X86_ESI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esi), 4); /* restore EDX */ - x86_mov_reg_membase (code, X86_EDX, X86_EAX, G_STRUCT_OFFSET (MonoContext, edx), 4); + x86_mov_reg_membase (code, X86_EDX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edx), 4); /* * The context resides on the stack, in the stack frame of the @@ -342,24 +343,24 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot) */ /* load ESP into EBP */ - x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, esp), 4); + x86_mov_reg_membase (code, X86_EBP, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esp), 4); /* load return address into ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eip), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, eip), 4); /* save the return addr to the restored stack - 4 */ x86_mov_membase_reg (code, X86_EBP, -4, X86_ECX, 4); /* load EBP into ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebp), 4); /* save EBP to the restored stack - 8 */ x86_mov_membase_reg (code, X86_EBP, -8, X86_ECX, 4); /* load EAX into ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eax), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, eax), 4); /* save EAX to the restored stack - 12 */ x86_mov_membase_reg (code, X86_EBP, -12, X86_ECX, 4); /* restore ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ecx), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ecx), 4); /* restore ESP - 12 */ x86_lea_membase (code, X86_ESP, X86_EBP, -12); @@ -418,11 +419,11 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot) x86_push_reg (code, X86_EBP); /* set new EBP */ - x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4); + x86_mov_reg_membase (code, X86_EBP, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebp), 4); /* restore registers used by global register allocation (EBX & ESI) */ - x86_mov_reg_membase (code, X86_EBX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebx), 4); - x86_mov_reg_membase (code, X86_ESI, X86_EAX, G_STRUCT_OFFSET (MonoContext, esi), 4); - x86_mov_reg_membase (code, X86_EDI, X86_EAX, G_STRUCT_OFFSET (MonoContext, edi), 4); + x86_mov_reg_membase (code, X86_EBX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebx), 4); + x86_mov_reg_membase (code, X86_ESI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esi), 4); + x86_mov_reg_membase (code, X86_EDI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edi), 4); /* align stack and save ESP */ x86_mov_reg_reg (code, X86_EDX, X86_ESP, 4); @@ -815,7 +816,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start, (guint8*)ji->code_start + ji->code_size, - ip, regs, MONO_MAX_IREGS + 1, + ip, NULL, regs, MONO_MAX_IREGS + 1, save_locations, MONO_MAX_IREGS, &cfa); new_ctx->eax = regs [X86_EAX]; @@ -834,21 +835,8 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, /* Adjust IP */ new_ctx->eip --; - if (*lmf && ((*lmf) != jit_tls->first_lmf)) { - gboolean is_tramp = ((guint32)((*lmf)->previous_lmf) & 1); - gpointer lmf_esp; - - if (is_tramp) - /* lmf->esp is only set in trampoline frames */ - lmf_esp = (gpointer)(*lmf)->esp; - else - /* In non-trampoline frames, ebp is the frame pointer */ - lmf_esp = (gpointer)(*lmf)->ebp; - if (MONO_CONTEXT_GET_SP (ctx) >= lmf_esp) - /* remove any unused lmf */ - *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~3); - } +#ifndef MONO_X86_NO_PUSHES /* Pop arguments off the stack */ if (ji->has_arch_eh_info) { int stack_size; @@ -868,6 +856,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, #endif } } +#endif return TRUE; } else if (*lmf) { @@ -1219,26 +1208,26 @@ mono_tasklets_arch_restore (void) x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4); /* setup the copy of the stack */ - x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4); x86_shift_reg_imm (code, X86_SHR, X86_ECX, 2); x86_cld (code); - x86_mov_reg_membase (code, X86_ESI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, saved_stack), 4); - x86_mov_reg_membase (code, X86_EDI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_sp), 4); + x86_mov_reg_membase (code, X86_ESI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), 4); + x86_mov_reg_membase (code, X86_EDI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), 4); x86_prefix (code, X86_REP_PREFIX); x86_movsl (code); /* now restore the registers from the LMF */ - x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, lmf), 4); - x86_mov_reg_membase (code, X86_EBX, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebx), 4); - x86_mov_reg_membase (code, X86_EBP, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebp), 4); - x86_mov_reg_membase (code, X86_ESI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, esi), 4); - x86_mov_reg_membase (code, X86_EDI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, edi), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 4); + x86_mov_reg_membase (code, X86_EBX, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebx), 4); + x86_mov_reg_membase (code, X86_EBP, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebp), 4); + x86_mov_reg_membase (code, X86_ESI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, esi), 4); + x86_mov_reg_membase (code, X86_EDI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, edi), 4); /* restore the lmf chain */ /*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4); x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/ - x86_jump_membase (code, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_ip)); + x86_jump_membase (code, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_ip)); g_assert ((code - start) <= 48); saved = start; return (MonoContinuationRestore)saved; diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs index fe65826ce4..342dec7060 100644 --- a/mono/mini/gshared.cs +++ b/mono/mini/gshared.cs @@ -40,6 +40,12 @@ class GFoo3 { // The tests use arrays to pass/receive values to keep the calling convention of the methods stable, which is a current limitation of the runtime support for gsharedvt. // +// +// Interfaces are used to prevent the AOT compiler from discovering instantiations, thus forcing the usage of the gsharedvt +// versions of methods. Unused vtype type arguments are used to test gsharedvt methods with ref type arguments, i.e. +// when calling foo as foo, the gsharedvt version is used, but with a ref type argument. +// + // FIXME: Add mixed ref/noref tests, i.e. Dictionary #if MOBILE @@ -221,6 +227,9 @@ public class Tests res = iface.Unbox (AnEnum.One, 0, AnEnum.Two); if (res != AnEnum.Two) return 2; + int res2 = iface.Unbox (0, AnEnum.One, AnEnum.Two); + if (res2 != 1) + return 3; return 0; } @@ -1019,6 +1028,7 @@ public class Tests return action(null, state); } + [Category ("!FULLAOT")] public static int test_0_delegate_wrappers () { Func, Pair> del1 = delegate (object o, Pair p) { return p; }; Func, Pair> del2 = delegate (object o, Pair p) { return p; }; @@ -1459,6 +1469,42 @@ public class Tests var c = new ReadOnlyCollection (arr); return c.Contains (AnEnum.Two) == false ? 0 : 1; } + + interface IFaceCallPatching { + bool caller (); + } + + class CallPatching2 { + T t; + public object o; + + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public bool callee () { + return (string)o == "ABC"; + } + } + + class CallPatching : IFaceCallPatching { + public bool caller () { + var c = new CallPatching2 (); + c.o = "ABC"; + return c.callee (); + } + } + + // + // This tests that generic calls made from gsharedvt methods are not patched normally. + // If they are, the first call to 'caller' would patch in the gshared version of + // 'callee', causing the second call to fail because the gshared version of callee + // wouldn't work with CallPatching2 since it has a different object layout. + // + public static int test_0_call_patching () { + IFaceCallPatching c = new CallPatching (); + c.caller (); + if (!c.caller ()) + return 1; + return 0; + } } // #13191 diff --git a/mono/mini/helpers.c b/mono/mini/helpers.c index 43bd17e2fa..4c0950163f 100644 --- a/mono/mini/helpers.c +++ b/mono/mini/helpers.c @@ -214,8 +214,14 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) #else #if defined(sparc) && !defined(__GNUC__) #define DIS_CMD "dis" -#elif defined(__i386__) || defined(__x86_64__) +#elif defined(TARGET_X86) #define DIS_CMD "objdump -l -d" +#elif defined(TARGET_AMD64) + #if defined(HOST_WIN32) + #define DIS_CMD "x86_64-w64-mingw32-objdump.exe -M x86-64 -d" + #else + #define DIS_CMD "objdump -l -d" + #endif #else #define DIS_CMD "objdump -d" #endif @@ -281,7 +287,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id) unused = system (cmd); g_free (cmd); #endif - + cmd = g_strdup_printf (ARCH_PREFIX DIS_CMD " %s %s", objdump_args, o_file); unused = system (cmd); g_free (cmd); diff --git a/mono/mini/image-writer.c b/mono/mini/image-writer.c index 62b2b3525a..13c055bd1e 100644 --- a/mono/mini/image-writer.c +++ b/mono/mini/image-writer.c @@ -125,7 +125,7 @@ #define USE_ELF_WRITER 1 #endif -#if defined(TARGET_ARM) && !defined(TARGET_MACH) +#if defined(TARGET_ARM) && !defined(TARGET_MACH) && !defined(HOST_WIN32) #define USE_ELF_WRITER 1 #endif diff --git a/mono/mini/ir-emit.h b/mono/mini/ir-emit.h index 9ba92bf376..c208c2a4b1 100644 --- a/mono/mini/ir-emit.h +++ b/mono/mini/ir-emit.h @@ -933,15 +933,15 @@ static int ccount = 0; if (!(cfg->opt & MONO_OPT_ABCREM)) { \ MONO_EMIT_NULL_CHECK (cfg, array_reg); \ if (COMPILE_LLVM (cfg)) \ - MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \ + MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \ else \ - MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \ + MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \ } else { \ MonoInst *ins; \ MONO_INST_NEW ((cfg), ins, OP_BOUNDS_CHECK); \ ins->sreg1 = array_reg; \ ins->sreg2 = index_reg; \ - ins->inst_imm = G_STRUCT_OFFSET (array_type, array_length_field); \ + ins->inst_imm = MONO_STRUCT_OFFSET (array_type, array_length_field); \ ins->flags |= MONO_INST_FAULT; \ MONO_ADD_INS ((cfg)->cbb, ins); \ (cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS; \ diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 45c7689a58..8c7c00c832 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -1061,6 +1061,7 @@ MonoObject* mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass) { MonoJitTlsData *jit_tls = NULL; + MonoClass *oklass; if (mini_get_debug_options ()->better_cast_details) { jit_tls = mono_native_tls_get_value (mono_jit_tls_id); @@ -1070,13 +1071,14 @@ mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass) if (!obj) return NULL; - if (klass->enumtype && obj->vtable->klass == klass->element_class) + oklass = obj->vtable->klass; + if ((klass->enumtype && oklass == klass->element_class) || (oklass->enumtype && klass == oklass->element_class)) return obj; if (mono_object_isinst (obj, klass)) return obj; if (mini_get_debug_options ()->better_cast_details) { - jit_tls->class_cast_from = obj->vtable->klass; + jit_tls->class_cast_from = oklass; jit_tls->class_cast_to = klass; } diff --git a/mono/mini/main.c b/mono/mini/main.c index 84c6f39c06..784179c644 100644 --- a/mono/mini/main.c +++ b/mono/mini/main.c @@ -19,7 +19,7 @@ mono_main_with_options (int argc, char *argv []) GPtrArray *array = g_ptr_array_new (); GString *buffer = g_string_new (""); const char *p; - int i; + unsigned i; gboolean in_quotes = FALSE; char quote_char = '\0'; diff --git a/mono/mini/method-to-ir.c.REMOVED.git-id b/mono/mini/method-to-ir.c.REMOVED.git-id index 587b51940e..555e94ad1e 100644 --- a/mono/mini/method-to-ir.c.REMOVED.git-id +++ b/mono/mini/method-to-ir.c.REMOVED.git-id @@ -1 +1 @@ -4a9c33d29539581bfa3fe405320247a4801af2aa \ No newline at end of file +7edaa066775ac56963e50395e88bc0272ae55aec \ No newline at end of file diff --git a/mono/mini/mini-amd64.c.REMOVED.git-id b/mono/mini/mini-amd64.c.REMOVED.git-id index e7e1b62537..8b3e6307e3 100644 --- a/mono/mini/mini-amd64.c.REMOVED.git-id +++ b/mono/mini/mini-amd64.c.REMOVED.git-id @@ -1 +1 @@ -b5fed14d8d22f584ac059dfff08b2e0dff1a9586 \ No newline at end of file +a09d3d79064ddfde150db0a3557ccb684057d273 \ No newline at end of file diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h index 9c1c7ca15a..fbe9910b62 100644 --- a/mono/mini/mini-amd64.h +++ b/mono/mini/mini-amd64.h @@ -167,9 +167,6 @@ struct MonoLMF { * If the third lowest bit is set, then this is a MonoLMFTramp structure. */ gpointer previous_lmf; -#ifdef HOST_WIN32 - gpointer lmf_addr; -#endif #if defined(__default_codegen__) || defined(HOST_WIN32) guint64 rip; #elif defined(__native_client_codegen__) @@ -177,17 +174,8 @@ struct MonoLMF { /* this allows the structure to match for 32-bit compilers. */ guint64 rip __attribute__ ((aligned(8))); #endif - guint64 rbx; guint64 rbp; guint64 rsp; - guint64 r12; - guint64 r13; - guint64 r14; - guint64 r15; -#ifdef HOST_WIN32 - guint64 rdi; - guint64 rsi; -#endif }; /* LMF structure used by the JIT trampolines */ @@ -202,6 +190,7 @@ typedef struct MonoCompileArch { gint32 reg_save_area_offset; gint32 stack_alloc_size; gint32 sp_fp_offset; + guint32 saved_iregs; gboolean omit_fp, omit_fp_computed, no_pushes; gpointer cinfo; gint32 async_point_count; @@ -214,6 +203,28 @@ typedef struct MonoCompileArch { gpointer lmf_var; } MonoCompileArch; + + +#ifdef HOST_WIN32 +#define PARAM_REGS 4 +#else +#define PARAM_REGS 6 +#endif + +/* Structure used by the sequence points in AOTed code */ +typedef struct { + gpointer ss_trigger_page; + gpointer bp_trigger_page; + gpointer bp_addrs [MONO_ZERO_LEN_ARRAY]; +} SeqPointInfo; + +typedef struct { + mgreg_t regs [PARAM_REGS]; + mgreg_t res; + guint8 *ret; +} DynCallArgs; + + #define MONO_CONTEXT_SET_LLVM_EXC_REG(ctx, exc) do { (ctx)->rax = (gsize)exc; } while (0) #define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf) @@ -345,11 +356,7 @@ typedef struct MonoCompileArch { #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1 -#define MONO_ARCH_HAVE_ATOMIC_ADD 1 -#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 -#define MONO_ARCH_HAVE_ATOMIC_CAS 1 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_HAVE_TLS_GET (mono_amd64_have_tls_get ()) #define MONO_ARCH_IMT_REG AMD64_R10 #define MONO_ARCH_IMT_SCRATCH_REG AMD64_R11 diff --git a/mono/mini/mini-arm.c.REMOVED.git-id b/mono/mini/mini-arm.c.REMOVED.git-id index ede77a5ae5..8a8c0e8a61 100644 --- a/mono/mini/mini-arm.c.REMOVED.git-id +++ b/mono/mini/mini-arm.c.REMOVED.git-id @@ -1 +1 @@ -6895e1fb3a1eb78a5a8623292272b9695812297f \ No newline at end of file +eff7174271e83652930b6e7c3fdc9e8a5c6f6b32 \ No newline at end of file diff --git a/mono/mini/mini-arm.h b/mono/mini/mini-arm.h index cba8a33a74..7c3fd9ad04 100644 --- a/mono/mini/mini-arm.h +++ b/mono/mini/mini-arm.h @@ -124,6 +124,17 @@ * reproduceable results for benchmarks */ #define MONO_ARCH_CODE_ALIGNMENT 32 +/* Argument marshallings for calls between gsharedvt and normal code */ +typedef enum { + GSHAREDVT_ARG_NONE = 0, + GSHAREDVT_ARG_BYVAL_TO_BYREF = 1, + GSHAREDVT_ARG_BYREF_TO_BYVAL = 2, + GSHAREDVT_ARG_BYREF_TO_BYVAL_I1 = 3, + GSHAREDVT_ARG_BYREF_TO_BYVAL_I2 = 4, + GSHAREDVT_ARG_BYREF_TO_BYVAL_U1 = 5, + GSHAREDVT_ARG_BYREF_TO_BYVAL_U2 = 6 +} GSharedVtArgMarshal; + /* Return value marshalling for calls between gsharedvt and normal code */ typedef enum { GSHAREDVT_RET_NONE = 0, @@ -156,6 +167,23 @@ typedef struct { int map [MONO_ZERO_LEN_ARRAY]; } GSharedVtCallInfo; +/* Structure used by the sequence points in AOTed code */ +typedef struct { + gpointer ss_trigger_page; + gpointer bp_trigger_page; + guint8* bp_addrs [MONO_ZERO_LEN_ARRAY]; +} SeqPointInfo; + + +#define PARAM_REGS 4 +#define DYN_CALL_STACK_ARGS 6 + +typedef struct { + mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS]; + mgreg_t res, res2; + guint8 *ret; +} DynCallArgs; + void arm_patch (guchar *code, const guchar *target); guint8* mono_arm_emit_load_imm (guint8 *code, int dreg, guint32 val); int mono_arm_is_rotated_imm8 (guint32 val, gint *rot_amount); @@ -235,7 +263,6 @@ typedef struct MonoCompileArch { #define ARM_NUM_REG_FPARGS 0 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1 #define MONO_ARCH_AOT_SUPPORTED 1 @@ -246,7 +273,10 @@ typedef struct MonoCompileArch { #define MONO_ARCH_DYN_CALL_SUPPORTED 1 #define MONO_ARCH_DYN_CALL_PARAM_AREA 24 +#ifndef MONO_CROSS_COMPILE #define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1 +#endif + #define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1 #define MONO_ARCH_HAVE_GET_TRAMPOLINES 1 #define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1 @@ -263,10 +293,6 @@ typedef struct MonoCompileArch { #define MONO_ARCH_HAVE_OP_TAIL_CALL 1 #endif #define MONO_ARCH_HAVE_DUMMY_INIT 1 -#define MONO_ARCH_HAVE_OPCODE_SUPPORTED 1 -#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 -#define MONO_ARCH_HAVE_ATOMIC_CAS 1 -#define MONO_ARCH_HAVE_ATOMIC_ADD 1 #if defined(__native_client__) #undef MONO_ARCH_SOFT_DEBUG_SUPPORTED diff --git a/mono/mini/mini-codegen.c b/mono/mini/mini-codegen.c index 6e5bf2f858..66eb8fcdcf 100644 --- a/mono/mini/mini-codegen.c +++ b/mono/mini/mini-codegen.c @@ -1452,6 +1452,8 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb) if (k != j) sreg_masks [k] &= ~ (regmask (dest_sreg)); } + /* See below */ + dreg_mask &= ~ (regmask (dest_sreg)); } else { val = rs->vassign [sreg]; if (val == -1) { @@ -1471,7 +1473,7 @@ mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb) sreg_masks [k] &= ~ (regmask (dest_sreg)); } /* - * Prevent the dreg from being allocate to dest_sreg + * Prevent the dreg from being allocated to dest_sreg * too, since it could force sreg1 to be allocated to * the same reg on x86. */ diff --git a/mono/mini/mini-cross-helpers.c b/mono/mini/mini-cross-helpers.c new file mode 100644 index 0000000000..dede99f3ee --- /dev/null +++ b/mono/mini/mini-cross-helpers.c @@ -0,0 +1,13 @@ +#include "config.h" + +#ifdef ENABLE_EXTENSION_MODULE +#include "../../../mono-extensions/mono/mini/mini-cross-helpers.c" +#else + +void mono_cross_helpers_run (void); + +void +mono_cross_helpers_run (void) +{ +} +#endif diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index 221082759f..7659466cd2 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -217,6 +217,14 @@ find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInfo *res, Mo if (!err) return (gpointer)-1; + if (*lmf && ((*lmf) != jit_tls->first_lmf) && ((gpointer)MONO_CONTEXT_GET_SP (new_ctx) >= (gpointer)(*lmf))) { + /* + * Remove any unused lmf. + * Mask out the lower bits which might be used to hold additional information. + */ + *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~(SIZEOF_VOID_P -1)); + } + /* Convert between the new and the old APIs */ switch (frame.type) { case FRAME_TYPE_MANAGED: @@ -369,6 +377,14 @@ mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls, if (!err) return FALSE; + if (*lmf && ((*lmf) != jit_tls->first_lmf) && ((gpointer)MONO_CONTEXT_GET_SP (new_ctx) >= (gpointer)(*lmf))) { + /* + * Remove any unused lmf. + * Mask out the lower bits which might be used to hold additional information. + */ + *lmf = (gpointer)(((gsize)(*lmf)->previous_lmf) & ~(SIZEOF_VOID_P -1)); + } + if (frame->ji && !frame->ji->async) method = jinfo_get_method (frame->ji); @@ -1800,7 +1816,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume, mono_profiler_exception_clause_handler (method, ei->flags, i); jit_tls->orig_ex_ctx_set = FALSE; MONO_CONTEXT_SET_IP (ctx, ei->handler_start); - *(mono_get_lmf_addr ()) = lmf; + mono_set_lmf (lmf); #ifndef DISABLE_PERFCOUNTERS mono_perfcounters->exceptions_depth += frame_count; #endif @@ -1828,7 +1844,7 @@ mono_handle_exception_internal (MonoContext *ctx, gpointer obj, gboolean resume, #ifndef DISABLE_PERFCOUNTERS mono_perfcounters->exceptions_finallys++; #endif - *(mono_get_lmf_addr ()) = lmf; + mono_set_lmf (lmf); if (ji->from_llvm) { /* * LLVM compiled finally handlers follow the design @@ -2221,6 +2237,8 @@ print_stack_frame_to_string (StackFrameInfo *frame, MonoContext *ctx, gpointer d return FALSE; } +#ifndef MONO_CROSS_COMPILE + static gboolean handling_sigsegv = FALSE; /* @@ -2248,7 +2266,7 @@ mono_handle_native_sigsegv (int signal, void *ctx) ; #else while (1) { - sleep (0); + sleep (1); } #endif } @@ -2344,6 +2362,16 @@ mono_handle_native_sigsegv (int signal, void *ctx) } } +#else + +void +mono_handle_native_sigsegv (int signal, void *ctx) +{ + g_assert_not_reached (); +} + +#endif /* !MONO_CROSS_COMPILE */ + static void mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx) { @@ -2352,7 +2380,10 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx) MonoContext ctx; #endif GString* text = g_string_new (0); - char *name, *wapi_desc; + char *name; +#ifndef HOST_WIN32 + char *wapi_desc; +#endif GError *error = NULL; if (thread->name) { @@ -2728,5 +2759,6 @@ mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len) if (ji->from_aot) return mono_aot_get_unwind_info (ji, unwind_info_len); else - return mono_get_cached_unwind_info (ji->used_regs, unwind_info_len); + /* The upper 16 bits of ji->unwind_info might contain the epilog offset */ + return mono_get_cached_unwind_info (ji->unwind_info & 0xffff, unwind_info_len); } diff --git a/mono/mini/mini-gc.c b/mono/mini/mini-gc.c index 5589d99eab..8ca1eebfe5 100644 --- a/mono/mini/mini-gc.c +++ b/mono/mini/mini-gc.c @@ -15,15 +15,10 @@ //#if 0 #if defined(MONO_ARCH_GC_MAPS_SUPPORTED) +#include #include #include -#if SIZEOF_VOID_P == 4 -typedef guint32 mword; -#else -typedef guint64 mword; -#endif - #define SIZEOF_SLOT ((int)sizeof (mgreg_t)) #define GC_BITS_PER_WORD (sizeof (mword) * 8) @@ -598,7 +593,9 @@ thread_suspend_func (gpointer user_data, void *sigctx, MonoContext *ctx) if (tls->tid != GetCurrentThreadId ()) { /* Happens on osx because threads are not suspended using signals */ +#ifndef TARGET_WIN32 gboolean res; +#endif g_assert (tls->info); #ifdef TARGET_WIN32 @@ -1106,7 +1103,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end) * pass. */ static void -precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end) +precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end, void *gc_data) { int findex, i; FrameInfo *fi; @@ -1144,7 +1141,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end) MonoObject *obj = *ptr; if (obj) { DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p ->", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj)); - *ptr = mono_gc_scan_object (obj); + *ptr = mono_gc_scan_object (obj, gc_data); DEBUG (fprintf (logfile, " %p.\n", *ptr)); } else { DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p.\n", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj)); @@ -1185,7 +1182,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end) if (obj) { DEBUG (fprintf (logfile, "\treg %s saved at %p: %p ->", mono_arch_regname (fi->regs [i]), ptr, obj)); - *ptr = mono_gc_scan_object (obj); + *ptr = mono_gc_scan_object (obj, gc_data); DEBUG (fprintf (logfile, " %p.\n", *ptr)); } else { DEBUG (fprintf (logfile, "\treg %s saved at %p: %p\n", mono_arch_regname (fi->regs [i]), ptr, obj)); @@ -1213,7 +1210,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end) * structure filled up by thread_suspend_func. */ static void -thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise) +thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data) { TlsData *tls = user_data; @@ -1224,7 +1221,7 @@ thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gb if (!precise) conservative_pass (tls, stack_start, stack_end); else - precise_pass (tls, stack_start, stack_end); + precise_pass (tls, stack_start, stack_end, gc_data); } #ifndef DISABLE_JIT @@ -1869,7 +1866,11 @@ sp_offset_to_fp_offset (MonoCompile *cfg, int sp_offset) #elif defined(TARGET_X86) /* The offset is computed from the sp at the start of the call sequence */ g_assert (cfg->frame_reg == X86_EBP); +#ifdef MONO_X86_NO_PUSHES + return (- cfg->arch.sp_fp_offset + sp_offset); +#else return (- cfg->arch.sp_fp_offset - sp_offset); +#endif #else NOT_IMPLEMENTED; return -1; @@ -2056,7 +2057,11 @@ compute_frame_size (MonoCompile *cfg) #ifdef TARGET_AMD64 min_offset = MIN (min_offset, -cfg->arch.sp_fp_offset); #elif defined(TARGET_X86) +#ifdef MONO_X86_NO_PUSHES + min_offset = MIN (min_offset, -cfg->arch.sp_fp_offset); +#else min_offset = MIN (min_offset, - (cfg->arch.sp_fp_offset + cfg->arch.param_area_size)); +#endif #elif defined(TARGET_ARM) // FIXME: #elif defined(TARGET_s390X) diff --git a/mono/mini/mini-generic-sharing.c b/mono/mini/mini-generic-sharing.c index ab9245f26a..4c42fd9a75 100644 --- a/mono/mini/mini-generic-sharing.c +++ b/mono/mini/mini-generic-sharing.c @@ -1343,9 +1343,6 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti if (virtual) { /* Same as in mono_emit_method_call_full () */ -#ifndef MONO_ARCH_HAVE_IMT - NOT_IMPLEMENTED; -#endif if ((method->klass->parent == mono_defaults.multicastdelegate_class) && (!strcmp (method->name, "Invoke"))) { /* See mono_emit_method_call_full () */ /* The gsharedvt trampoline will recognize this constant */ @@ -2689,7 +2686,9 @@ mini_method_get_rgctx (MonoMethod *m) gboolean mini_type_is_vtype (MonoCompile *cfg, MonoType *t) { - return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t); + t = mini_native_type_replace_type (t); + + return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t); } gboolean diff --git a/mono/mini/mini-ia64.c.REMOVED.git-id b/mono/mini/mini-ia64.c.REMOVED.git-id index 8b7074b8dc..9c472cd7cd 100644 --- a/mono/mini/mini-ia64.c.REMOVED.git-id +++ b/mono/mini/mini-ia64.c.REMOVED.git-id @@ -1 +1 @@ -17cc1f9f2f7f50c8ce62031fde85e2ef3bc19bfb \ No newline at end of file +7d74ad8f45f34aead1f502d2d46f48a2d6006a8d \ No newline at end of file diff --git a/mono/mini/mini-ia64.h b/mono/mini/mini-ia64.h index 4d4f1df443..d419bc26c7 100644 --- a/mono/mini/mini-ia64.h +++ b/mono/mini/mini-ia64.h @@ -114,8 +114,6 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code); #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1 #define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1 -#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1 #define MONO_ARCH_THIS_AS_FIRST_ARG 1 diff --git a/mono/mini/mini-llvm-cpp.cpp b/mono/mini/mini-llvm-cpp.cpp index 1f4775368c..032059d931 100644 --- a/mono/mini/mini-llvm-cpp.cpp +++ b/mono/mini/mini-llvm-cpp.cpp @@ -21,12 +21,6 @@ // #include "config.h" -//undef those as llvm defines them on its own config.h as well. -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION #include diff --git a/mono/mini/mini-llvm.c.REMOVED.git-id b/mono/mini/mini-llvm.c.REMOVED.git-id index 6804da7713..3e3c8bc022 100644 --- a/mono/mini/mini-llvm.c.REMOVED.git-id +++ b/mono/mini/mini-llvm.c.REMOVED.git-id @@ -1 +1 @@ -d09863f709b43646dfa5df388408e604d40d7f7a \ No newline at end of file +df6de20bab48786bcf4caed9ec1b139896289f9c \ No newline at end of file diff --git a/mono/mini/mini-mips.c.REMOVED.git-id b/mono/mini/mini-mips.c.REMOVED.git-id index af817243f9..f84877b3d4 100644 --- a/mono/mini/mini-mips.c.REMOVED.git-id +++ b/mono/mini/mini-mips.c.REMOVED.git-id @@ -1 +1 @@ -235fd33a449b15e2c2d8b4e2f8c0f2f900d8871b \ No newline at end of file +cc32f05f72828cf9f1a6a06fcded6d33be8a6bfe \ No newline at end of file diff --git a/mono/mini/mini-mips.h b/mono/mini/mini-mips.h index 7476469c27..c94f7c898f 100644 --- a/mono/mini/mini-mips.h +++ b/mono/mini/mini-mips.h @@ -257,7 +257,6 @@ typedef struct MonoCompileArch { #define MIPS_LAST_FPARG_REG mips_f19 #endif -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_IMT_REG mips_t0 #define MONO_ARCH_VTABLE_REG mips_a0 diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h index b1a31ee16d..e667a4c08f 100644 --- a/mono/mini/mini-ops.h +++ b/mono/mini/mini-ops.h @@ -847,32 +847,36 @@ MINI_OP(OP_XMOVE, "xmove", XREG, XREG, NONE) MINI_OP(OP_XZERO, "xzero", XREG, NONE, NONE) MINI_OP(OP_XPHI, "xphi", XREG, NONE, NONE) -/* Atomic specific - - Note, OP_ATOMIC_ADD_IMM_NEW_I4 and - OP_ATOMIC_ADD_NEW_I4 returns the new - value compared to OP_ATOMIC_ADD_I4 that - returns the old value. - - OP_ATOMIC_ADD_NEW_I4 is used by - Interlocked::Increment and Interlocked:Decrement - and atomic_add_i4 by Interlocked::Add +/* + * These are used for efficient implementation of the + * methods on the System.Threading.Interlocked class + * on architectures that support it. This is checked + * via mono_arch_opcode_supported (). + * + * Note that while the 32-bit variants are used on + * both 32-bit and 64-bit systems, the 64-bit variants + * are only used if the system is 64-bit. If that is + * not the case, the fallback code in the runtime is + * used instead. This is done because decomposing the + * 64-bit variants to instructions operating on 32-bit + * registers is very complicated on some architectures. + * + * The memory_barrier instruction translates to a full + * acquire/release barrier. Such a memory barrier is + * implied at the beginning and end of all other atomic + * operations, such that they ensure sequential + * consistency. + * + * All of these return the new value at the given + * memory location after performing the operation. */ MINI_OP(OP_ATOMIC_ADD_I4, "atomic_add_i4", IREG, IREG, IREG) -MINI_OP(OP_ATOMIC_ADD_NEW_I4, "atomic_add_new_i4", IREG, IREG, IREG) -MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE) -MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I4, "atomic_add_imm_new_i4", IREG, IREG, NONE) -MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG) - MINI_OP(OP_ATOMIC_ADD_I8, "atomic_add_i8", IREG, IREG, IREG) -MINI_OP(OP_ATOMIC_ADD_NEW_I8, "atomic_add_new_i8", IREG, IREG, IREG) -MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE) -MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I8, "atomic_add_imm_new_i8", IREG, IREG, NONE) +MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG) MINI_OP(OP_ATOMIC_EXCHANGE_I8, "atomic_exchange_i8", IREG, IREG, IREG) -MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE) - MINI_OP3(OP_ATOMIC_CAS_I4, "atomic_cas_i4", IREG, IREG, IREG, IREG) MINI_OP3(OP_ATOMIC_CAS_I8, "atomic_cas_i8", IREG, IREG, IREG, IREG) +MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE) /* Conditional move opcodes. * Must be in the same order as the matching CEE_B... opcodes @@ -1077,6 +1081,9 @@ MINI_OP(OP_S390_ISUB_OVF_UN, "s390_int_sub_ovf_un", IREG, IREG, IREG) #endif #if defined(__ia64__) +MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE) +MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE) + MINI_OP(OP_IA64_LOAD, "ia64_load", NONE, NONE, NONE) MINI_OP(OP_IA64_LOADI1, "ia64_loadi1", NONE, NONE, NONE) MINI_OP(OP_IA64_LOADU1, "ia64_loadu1", NONE, NONE, NONE) diff --git a/mono/mini/mini-posix.c b/mono/mini/mini-posix.c index 67f5725de6..d26b4af4e9 100644 --- a/mono/mini/mini-posix.c +++ b/mono/mini/mini-posix.c @@ -296,6 +296,7 @@ SIG_HANDLER_FUNC (static, sigusr1_signal_handler) #define FULL_STAT_PROFILER_BACKTRACE 0 #endif +#ifdef SIGPROF #if defined(__ia64__) || defined(__sparc__) || defined(sparc) || defined(__s390__) || defined(s390) SIG_HANDLER_FUNC (static, sigprof_signal_handler) @@ -384,6 +385,7 @@ SIG_HANDLER_FUNC (static, sigprof_signal_handler) mono_chain_signal (SIG_HANDLER_PARAMS); } +#endif #endif SIG_HANDLER_FUNC (static, sigquit_signal_handler) diff --git a/mono/mini/mini-ppc.c.REMOVED.git-id b/mono/mini/mini-ppc.c.REMOVED.git-id index 47d3e58800..95a1ca840e 100644 --- a/mono/mini/mini-ppc.c.REMOVED.git-id +++ b/mono/mini/mini-ppc.c.REMOVED.git-id @@ -1 +1 @@ -69a1d3d78aa16d9558fff6e6d915d9a95f816ec0 \ No newline at end of file +d3ebe5de2aaa8b786a9fa893aec1b7834216f458 \ No newline at end of file diff --git a/mono/mini/mini-ppc.h b/mono/mini/mini-ppc.h index 13b6adb537..dcc1c5fae2 100644 --- a/mono/mini/mini-ppc.h +++ b/mono/mini/mini-ppc.h @@ -68,7 +68,6 @@ typedef struct MonoCompileArch { #ifdef __mono_ppc64__ #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS #define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS -#define MONO_ARCH_HAVE_ATOMIC_ADD 1 #define PPC_USES_FUNCTION_DESCRIPTOR #ifndef __mono_ilp32__ @@ -95,7 +94,6 @@ typedef struct MonoCompileArch { #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1 #define MONO_ARCH_EMULATE_FREM 1 #define MONO_ARCH_BIGMUL_INTRINS 1 -#define MONO_ARCH_HAVE_ATOMIC_CAS 1 /* Parameters used by the register allocator */ #define MONO_ARCH_CALLEE_REGS ((0xff << ppc_r3) | (1 << ppc_r11) | (1 << ppc_r12)) @@ -171,7 +169,6 @@ typedef struct MonoCompileArch { #endif /* HAVE_WORKING_SIGALTSTACK */ #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_IMT_REG ppc_r12 #define MONO_ARCH_VTABLE_REG ppc_r12 diff --git a/mono/mini/mini-s390x.c.REMOVED.git-id b/mono/mini/mini-s390x.c.REMOVED.git-id index cab62a85fe..c4c08861f1 100644 --- a/mono/mini/mini-s390x.c.REMOVED.git-id +++ b/mono/mini/mini-s390x.c.REMOVED.git-id @@ -1 +1 @@ -5374adc8b029f1c637417f777d1560339a3186e2 \ No newline at end of file +96c054d4c5793eaab0ffc94a5d3305d0e2a94d84 \ No newline at end of file diff --git a/mono/mini/mini-s390x.h b/mono/mini/mini-s390x.h index a5be8f0108..50b74c51fd 100644 --- a/mono/mini/mini-s390x.h +++ b/mono/mini/mini-s390x.h @@ -14,29 +14,6 @@ /* Parameters used by the register allocator */ /*-------------------------------------------*/ -#define S390_LONG(loc, opy, op, r, ix, br, off) \ - if (mono_hwcap_s390x_has_ld) { \ - if (s390_is_imm20(off)) { \ - s390_##opy (loc, r, ix, br, off); \ - } else { \ - s390_basr (code, s390_r13, 0); \ - s390_j (code, 6); \ - s390_llong(code, off); \ - s390_lg (code, s390_r13, 0, s390_r13, 4); \ - s390_##op (code, r, s390_r13, br, 0); \ - } \ - } else { \ - if (s390_is_uimm12(off)) { \ - s390_##op (loc, r, ix, br, off); \ - } else { \ - s390_basr (code, s390_r13, 0); \ - s390_j (code, 6); \ - s390_llong(code, off); \ - s390_lg (code, s390_r13, 0, s390_r13, 4); \ - s390_##op (code, r, s390_r13, br, 0); \ - } \ - } - struct MonoLMF { gpointer previous_lmf; gpointer lmf_addr; @@ -62,58 +39,15 @@ typedef struct void *return_address; } MonoS390StackFrame; -typedef struct -{ - char n3:1; // N3 instructions present - char zArch:1; // z/Architecture mode installed - char zAct:1; // z/Architecture mode active - char date:1; // DATE enhancement facility - char idte1:1; // IDTE present (PST) - char idte2:1; // IDTE present (REG) - char asnlx:1; // ASN and LX reuse facility - char stfle:1; // STFLE installed - char zDATe:1; // Enhanced DAT in z mode - char srstat:1; // Sense running status facility - char cSSKE:1; // Conditional SSKE facility - char topo:1; // COnfiguration topology facility - char xTrans2:1; // Extended translation facility 2 - char msgSec:1; // Message security facility - char longDsp:1; // Long displacement facility - char hiPerfLD:1; // High performance long displacement facility - char hfpMAS:1; // HFP multiply-and-add/subtrace facility - char xImm:1; // Extended immediate facility - char xTrans3:1; // Extended translation facility 3 - char hfpUnX:1; // HFP unnormalized extension facility - char etf2:1; // ETF2-enhancement facility - char stckf:1; // Store-clock-fast facility - char parse:1; // Parsing enhancement facility - char mvcos:1; // MVCOS facility - char todSteer:1; // TOD-clock steering facility - char etf3:1; // ETF3-enhancement facility - char xCPUtm:1; // Extract CPU time facility - char csst:1; // Compare-swap-and-store facility - char csst2:1; // Compare-swap-and-store facility 2 - char giX:1; // General instructions extension facility - char exX:1; // Execute extensions facility - char ibm:1; // IBM internal use - char fps:1; // Floating point support enhancement - char dfp:1; // Decimal floating point facility - char hiDFP:1; // High Performance DFP facility - char pfpo:1; // PFPO instruction facility -} __attribute__((aligned(8))) facilityList_t; - // #define MONO_ARCH_SIGSEGV_ON_ALTSTACK 1 #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1 #define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS 1 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS 1 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1 #define MONO_ARCH_NEED_DIV_CHECK 1 -#define MONO_ARCH_HAVE_ATOMIC_ADD 1 -#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 #define MONO_ARCH_SIGNAL_STACK_SIZE 256*1024 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS 1 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_HAVE_TLS_GET 1 #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1 #define MONO_ARCH_IMT_REG s390_r9 @@ -128,6 +62,8 @@ typedef struct #define MONO_ARCH_GC_MAPS_SUPPORTED 1 #define MONO_ARCH_GSHARED_SUPPORTED 1 #define MONO_ARCH_MONITOR_ENTER_ADJUSTMENT 1 +#define MONO_ARCH_HAVE_HANDLER_BLOCK_GUARD 1 +#define MONO_ARCH_HAVE_INVALIDATE_METHOD 1 #define S390_STACK_ALIGNMENT 8 #define S390_FIRST_ARG_REG s390_r2 diff --git a/mono/mini/mini-sparc.c.REMOVED.git-id b/mono/mini/mini-sparc.c.REMOVED.git-id index 7e57399663..e18c0405f8 100644 --- a/mono/mini/mini-sparc.c.REMOVED.git-id +++ b/mono/mini/mini-sparc.c.REMOVED.git-id @@ -1 +1 @@ -ec65fb5c6b9abf2b5f4d6d986f1f0995b5842a57 \ No newline at end of file +3b95fd970336c9f187ef0e05f7f563b96acc9190 \ No newline at end of file diff --git a/mono/mini/mini-sparc.h b/mono/mini/mini-sparc.h index f2b3b41d79..4b94778455 100644 --- a/mono/mini/mini-sparc.h +++ b/mono/mini/mini-sparc.h @@ -102,7 +102,6 @@ typedef struct MonoCompileArch { #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1 #define MONO_ARCH_EMULATE_FREM 1 #define MONO_ARCH_NEED_DIV_CHECK 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_IMT_REG sparc_g1 #define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1 #define MONO_ARCH_HAVE_TLS_INIT 1 diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c index 6e56ed5d2a..5de69085b6 100644 --- a/mono/mini/mini-trampolines.c +++ b/mono/mini/mini-trampolines.c @@ -22,9 +22,9 @@ */ guint8* mono_trampoline_code [MONO_TRAMPOLINE_NUM]; -static GHashTable *class_init_hash_addr = NULL; -static GHashTable *rgctx_lazy_fetch_trampoline_hash = NULL; -static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr = NULL; +static GHashTable *class_init_hash_addr; +static GHashTable *rgctx_lazy_fetch_trampoline_hash; +static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr; static guint32 trampoline_calls, jit_trampolines, unbox_trampolines, static_rgctx_trampolines; #define mono_trampolines_lock() EnterCriticalSection (&trampolines_mutex) @@ -138,8 +138,6 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr) } #endif -#ifdef MONO_ARCH_HAVE_IMT - /* * Either IMPL_METHOD or AOT_ADDR will be set on return. */ @@ -243,7 +241,6 @@ __attribute__ ((noinline)) } } } -#endif /* * This is a super-ugly hack to fix bug #616463. @@ -406,7 +403,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram orig_vtable_slot = vtable_slot; vtable_slot_to_patch = vtable_slot; -#ifdef MONO_ARCH_HAVE_IMT /* IMT call */ if (vt && (gpointer)vtable_slot < (gpointer)vt) { MonoMethod *impl_method = NULL; @@ -464,7 +460,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram m = impl_method; } } -#endif /* * The virtual check is needed because is_generic_method_definition (m) could @@ -484,9 +479,7 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram else g_assert (!m->klass->generic_container); -#ifdef MONO_ARCH_HAVE_IMT generic_virtual = mono_arch_find_imt_method (regs, code); -#endif if (generic_virtual) { g_assert (generic_virtual->is_inflated); context.method_inst = ((MonoMethodInflated*)generic_virtual)->context.method_inst; @@ -524,7 +517,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram g_assert_not_reached (); #endif } else { -#ifdef MONO_ARCH_HAVE_IMT MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code); vt = this_argument->vtable; @@ -537,9 +529,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram mono_class_setup_supertypes (this_argument->vtable->klass); klass = this_argument->vtable->klass->supertypes [m->klass->idepth - 1]; } -#else - NOT_IMPLEMENTED; -#endif } g_assert (vtable_slot || klass); @@ -816,11 +805,9 @@ mono_generic_virtual_remoting_trampoline (mgreg_t *regs, guint8 *code, MonoMetho else g_assert (!m->klass->generic_container); -#ifdef MONO_ARCH_HAVE_IMT imt_method = mono_arch_find_imt_method (regs, code); if (imt_method->is_inflated) context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst; -#endif m = mono_class_inflate_generic_method (declaring, &context); m = mono_marshal_get_remoting_invoke_with_check (m); @@ -981,24 +968,14 @@ mono_monitor_exit_trampoline (mgreg_t *regs, guint8 *code, MonoObject *obj, guin #ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE -typedef struct { - MonoMethod *invoke; - gpointer impl_this; - gpointer impl_nothis; - MonoMethod *method; - MonoMethodSignature *invoke_sig; - MonoMethodSignature *sig; - gboolean need_rgctx_tramp; -} DelegateTrampInfo; - /* * Precompute data to speed up mono_delegate_trampoline (). * METHOD might be NULL. */ -static gpointer +static MonoDelegateTrampInfo* create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMethod *method) { - DelegateTrampInfo *tramp_data; + MonoDelegateTrampInfo *tramp_data; MonoMethod *invoke; MonoError err; @@ -1006,7 +983,7 @@ create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMetho invoke = mono_get_delegate_invoke (klass); g_assert (invoke); - tramp_data = mono_domain_alloc (domain, sizeof (DelegateTrampInfo)); + tramp_data = mono_domain_alloc (domain, sizeof (MonoDelegateTrampInfo)); tramp_data->invoke = invoke; tramp_data->invoke_sig = mono_method_signature (invoke); tramp_data->impl_this = mono_arch_get_delegate_invoke_impl (mono_method_signature (invoke), TRUE); @@ -1039,7 +1016,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr gboolean need_rgctx_tramp = FALSE; gboolean need_unbox_tramp = FALSE; gboolean enable_caching = TRUE; - DelegateTrampInfo *tramp_info = (DelegateTrampInfo*)arg; + MonoDelegateTrampInfo *tramp_info = (MonoDelegateTrampInfo*)arg; MonoMethod *invoke = tramp_info->invoke; guint8 *impl_this = tramp_info->impl_this; guint8 *impl_nothis = tramp_info->impl_nothis; @@ -1161,6 +1138,9 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr delegate->method_ptr = mono_create_static_rgctx_trampoline (method, delegate->method_ptr); } + /* Necessary for !code condition to fallback to slow path */ + code = NULL; + multicast = ((MonoMulticastDelegate*)delegate)->prev != NULL; if (!multicast && !callvirt) { if (method && (method->flags & METHOD_ATTRIBUTE_STATIC) && mono_method_signature (method)->param_count == mono_method_signature (invoke)->param_count + 1) @@ -1168,18 +1148,20 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr code = impl_this; else code = delegate->target ? impl_this : impl_nothis; - - if (code) { - delegate->invoke_impl = mono_get_addr_from_ftnptr (code); - return code; - } } - /* The general, unoptimized case */ - m = mono_marshal_get_delegate_invoke (invoke, delegate); - code = mono_compile_method (m); - code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE); + if (!code) { + /* The general, unoptimized case */ + m = mono_marshal_get_delegate_invoke (invoke, delegate); + code = mono_compile_method (m); + code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE); + } + delegate->invoke_impl = mono_get_addr_from_ftnptr (code); + if (enable_caching && !callvirt && tramp_info->method) { + tramp_info->method_ptr = delegate->method_ptr; + tramp_info->invoke_impl = delegate->invoke_impl; + } return code; } @@ -1540,30 +1522,29 @@ mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token) /* - * mono_create_delegate_trampoline_with_method: + * mono_create_delegate_trampoline_info: * * Create a delegate trampoline for the KLASS+METHOD pair. */ -gpointer -mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klass, MonoMethod *method) +MonoDelegateTrampInfo* +mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method) { #ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE - gpointer ptr; - guint32 code_size = 0; - gpointer tramp_info; + MonoDelegateTrampInfo *tramp_info; MonoClassMethodPair pair, *dpair; + guint32 code_size = 0; pair.klass = klass; pair.method = method; mono_domain_lock (domain); - ptr = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair); + tramp_info = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair); mono_domain_unlock (domain); - if (ptr) - return ptr; + if (tramp_info) + return tramp_info; tramp_info = create_delegate_trampoline_data (domain, klass, method); - ptr = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size); + tramp_info->invoke_impl = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size); g_assert (code_size); dpair = mono_domain_alloc0 (domain, sizeof (MonoClassMethodPair)); @@ -1571,10 +1552,10 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas /* store trampoline address */ mono_domain_lock (domain); - g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, ptr); + g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, tramp_info); mono_domain_unlock (domain); - return ptr; + return tramp_info; #else return NULL; #endif @@ -1583,7 +1564,11 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas gpointer mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass) { - return mono_create_delegate_trampoline_with_method (domain, klass, NULL); +#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE + return mono_create_delegate_trampoline_info (domain, klass, NULL)->invoke_impl; +#else + return NULL; +#endif } gpointer diff --git a/mono/mini/mini-unwind.h b/mono/mini/mini-unwind.h index 6b6ba7ad2f..a2c9f49805 100644 --- a/mono/mini/mini-unwind.h +++ b/mono/mini/mini-unwind.h @@ -60,6 +60,13 @@ #define DW_CFA_lo_user 0x1c #define DW_CFA_hi_user 0x3f +/* + * Mono extension, advance loc to a location stored outside the unwind info. + * This is required to make the unwind descriptors sharable, since otherwise each one would contain + * an advance_loc with a different offset just before the unwind ops for the epilog. + */ +#define DW_CFA_mono_advance_loc DW_CFA_lo_user + /* Represents one unwind instruction */ typedef struct { guint8 op; /* One of DW_CFA_... */ @@ -84,6 +91,16 @@ typedef struct { #define mono_emit_unwind_op_same_value(cfg,ip,reg) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_same_value, (reg), 0) /* Reg is saved at cfa+offset */ #define mono_emit_unwind_op_offset(cfg,ip,reg,offset) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_offset, (reg), (offset)) +/* Save the unwind state into an implicit stack */ +#define mono_emit_unwind_op_remember_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_remember_state, 0, 0) +/* Restore the unwind state from the state stack */ +#define mono_emit_unwind_op_restore_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_restore_state, 0, 0) +/* + * Mark the current location as a location stored outside the unwind info, which will be passed + * explicitly to mono_unwind_frame () in the MARK_LOCATIONS argument. This allows the unwind info + * to be shared among multiple methods. + */ +#define mono_emit_unwind_op_mark_loc(cfg,ip,n) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_mono_advance_loc, 0, (n)) /* Similar macros usable when a cfg is not available, like for trampolines */ #define mono_add_unwind_op_def_cfa(op_list,code,buf,reg,offset) do { (op_list) = g_slist_append ((op_list), mono_create_unwind_op ((code) - (buf), DW_CFA_def_cfa, (reg), (offset))); } while (0) @@ -127,7 +144,8 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) MONO_INTERNAL; void mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, - guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs, + guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations, + mgreg_t *regs, int nregs, mgreg_t **save_locations, int save_locations_len, guint8 **out_cfa) MONO_INTERNAL; diff --git a/mono/mini/mini-windows.c b/mono/mini/mini-windows.c index bb71ec4819..c43b1d0102 100644 --- a/mono/mini/mini-windows.c +++ b/mono/mini/mini-windows.c @@ -50,8 +50,6 @@ #include "jit-icalls.h" -gboolean mono_win_chained_exception_needs_run; - void mono_runtime_install_handlers (void) { @@ -83,7 +81,8 @@ mono_runtime_cleanup_handlers (void) gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) { - mono_win_chained_exception_needs_run = TRUE; + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); + jit_tls->mono_win_chained_exception_needs_run = TRUE; return TRUE; } diff --git a/mono/mini/mini-x86.c.REMOVED.git-id b/mono/mini/mini-x86.c.REMOVED.git-id index fbcd51bf38..cf06372a3e 100644 --- a/mono/mini/mini-x86.c.REMOVED.git-id +++ b/mono/mini/mini-x86.c.REMOVED.git-id @@ -1 +1 @@ -02a6d1daa781c7916d546236bdc4ad61452d0368 \ No newline at end of file +08637dbb8e1cad77848ae3c430340771b13ebf01 \ No newline at end of file diff --git a/mono/mini/mini-x86.h b/mono/mini/mini-x86.h index 995686bf94..e342054fce 100644 --- a/mono/mini/mini-x86.h +++ b/mono/mini/mini-x86.h @@ -74,6 +74,8 @@ struct sigcontext { #endif /* HAVE_WORKING_SIGALTSTACK */ #endif /* !HOST_WIN32 */ +/* #define MONO_X86_NO_PUSHES 1 */ + #define MONO_ARCH_SUPPORT_TASKLETS 1 #ifndef DISABLE_SIMD @@ -167,6 +169,7 @@ struct MonoLMF { typedef struct { gboolean need_stack_frame_inited; gboolean need_stack_frame; + gboolean no_pushes; int sp_fp_offset, param_area_size; } MonoCompileArch; @@ -206,12 +209,11 @@ typedef struct { #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1 #define MONO_ARCH_NEED_GOT_VAR 1 +#ifndef HOST_WIN32 +/* X86 uses jit_tls->lmf (See emit_push_lmf ()) */ #define MONO_ARCH_ENABLE_MONO_LMF_VAR 1 +#endif #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1 -#define MONO_ARCH_HAVE_ATOMIC_ADD 1 -#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 -#define MONO_ARCH_HAVE_ATOMIC_CAS 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_HAVE_TLS_GET (mono_x86_have_tls_get ()) #define MONO_ARCH_IMT_REG X86_EDX #define MONO_ARCH_VTABLE_REG X86_EDX diff --git a/mono/mini/mini.c.REMOVED.git-id b/mono/mini/mini.c.REMOVED.git-id index e5b6fbb37f..7e58fe003d 100644 --- a/mono/mini/mini.c.REMOVED.git-id +++ b/mono/mini/mini.c.REMOVED.git-id @@ -1 +1 @@ -035f975c9f80430359e947c8c006f77b01df0f1f \ No newline at end of file +dd31c02d7a6db4954b9a979ebde01717f648748a \ No newline at end of file diff --git a/mono/mini/mini.h.REMOVED.git-id b/mono/mini/mini.h.REMOVED.git-id index 0cff243888..5b99018da2 100644 --- a/mono/mini/mini.h.REMOVED.git-id +++ b/mono/mini/mini.h.REMOVED.git-id @@ -1 +1 @@ -ff3d5537ad28b22cb4718acd8357fe1f20a0effe \ No newline at end of file +a15cbfa5e72262754a5f4614d473a1b886e61c12 \ No newline at end of file diff --git a/mono/mini/objects.cs b/mono/mini/objects.cs index 40c79e6280..0e8ea1a4d7 100644 --- a/mono/mini/objects.cs +++ b/mono/mini/objects.cs @@ -1625,6 +1625,20 @@ ncells ) { [MethodImplAttribute (MethodImplOptions.NoInlining)] static void t_14217_inner (BugStruct bug) { } + + [StructLayout(LayoutKind.Sequential)] + public struct EmptyStruct { + } + + class EmptyClass { + public static EmptyStruct s; + } + + // #20349 + static int test_0_empty_struct_as_static () { + var s = EmptyClass.s; + return 0; + } } #if MOBILE diff --git a/mono/mini/simd-intrinsics.c b/mono/mini/simd-intrinsics.c index ff737bbe93..2fb8f0709a 100644 --- a/mono/mini/simd-intrinsics.c +++ b/mono/mini/simd-intrinsics.c @@ -13,6 +13,7 @@ #include "mini.h" #include "ir-emit.h" #include "mono/utils/bsearch.h" +#include /* General notes on SIMD intrinsics @@ -1569,7 +1570,7 @@ mono_emit_vector_ldelema (MonoCompile *cfg, MonoType *array_type, MonoInst *arr, MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size); MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, array_reg, mult_reg); - NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector)); + NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector)); ins->type = STACK_PTR; MONO_ADD_INS (cfg->cbb, ins); diff --git a/mono/mini/ssa.c b/mono/mini/ssa.c index 023d277800..801826b96e 100644 --- a/mono/mini/ssa.c +++ b/mono/mini/ssa.c @@ -1424,7 +1424,7 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg) else sreg = -1; if (sreg != -1) { - MonoInst *tins; + MonoInst *tins, *var; skip = FALSE; for (tins = ins->prev; tins; tins = tins->prev) { @@ -1439,6 +1439,9 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg) } if (skip) continue; + var = get_vreg_to_inst (cfg, sreg); + if (var && (var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT))) + continue; ins->sreg1 = sreg; } diff --git a/mono/mini/ssapre.c b/mono/mini/ssapre.c index a6499d13d5..692eedfacc 100644 --- a/mono/mini/ssapre.c +++ b/mono/mini/ssapre.c @@ -651,7 +651,7 @@ add_expression_to_tree (MonoSsapreExpression *tree, MonoSsapreExpression *expres } #if (MONO_APPLY_SSAPRE_TO_SINGLE_EXPRESSION) -static char *mono_ssapre_expression_name = NULL; +static char *mono_ssapre_expression_name; static gboolean check_ssapre_expression_name (MonoSsapreWorkArea *area, MonoSsapreExpressionDescription *expression_description) { if (area->expression_is_handled_father) { diff --git a/mono/mini/tasklets.c b/mono/mini/tasklets.c index 6766c26a69..9ab067a76b 100644 --- a/mono/mini/tasklets.c +++ b/mono/mini/tasklets.c @@ -8,7 +8,7 @@ #if defined(MONO_SUPPORT_TASKLETS) /* keepalive_stacks could be a per-stack var to avoid locking overhead */ -static MonoGHashTable *keepalive_stacks = NULL; +static MonoGHashTable *keepalive_stacks; static CRITICAL_SECTION tasklets_mutex; #define tasklets_lock() EnterCriticalSection(&tasklets_mutex) #define tasklets_unlock() LeaveCriticalSection(&tasklets_mutex) diff --git a/mono/mini/tramp-amd64.c b/mono/mini/tramp-amd64.c index 69f4fb6597..50d57970fe 100644 --- a/mono/mini/tramp-amd64.c +++ b/mono/mini/tramp-amd64.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -585,17 +586,17 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, 8, sizeof(gpointer)); else amd64_mov_reg_imm (code, AMD64_R11, 0); - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t)); /* Save fp */ amd64_mov_reg_membase (code, AMD64_R11, AMD64_RSP, framesize, sizeof(mgreg_t)); - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t)); /* Save sp */ amd64_mov_reg_reg (code, AMD64_R11, AMD64_RSP, sizeof(mgreg_t)); amd64_alu_reg_imm (code, X86_ADD, AMD64_R11, framesize + 16); - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t)); /* Save pointer to registers */ amd64_lea_membase (code, AMD64_R11, AMD64_RBP, saved_regs_offset); - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t)); if (aot) { code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr"); @@ -605,13 +606,13 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf amd64_call_reg (code, AMD64_R11); /* Save lmf_addr */ - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer)); /* Save previous_lmf */ /* Set the lowest bit to signal that this LMF has the ip field set */ /* Set the third lowest bit to signal that this is a MonoLMFTramp structure */ amd64_mov_reg_membase (code, AMD64_R11, AMD64_RAX, 0, sizeof(gpointer)); amd64_alu_reg_imm_size (code, X86_ADD, AMD64_R11, 0x5, sizeof(gpointer)); - amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer)); + amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer)); /* Set new lmf */ amd64_lea_membase (code, AMD64_R11, AMD64_RBP, lmf_offset); amd64_mov_membase_reg (code, AMD64_RAX, 0, AMD64_R11, sizeof(gpointer)); @@ -658,9 +659,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf amd64_mov_reg_membase (code, AMD64_RAX, AMD64_RBP, res_offset, sizeof(mgreg_t)); /* Restore LMF */ - amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer)); + amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer)); amd64_alu_reg_imm_size (code, X86_SUB, AMD64_RCX, 0x5, sizeof(gpointer)); - amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer)); + amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer)); amd64_mov_membase_reg (code, AMD64_R11, 0, AMD64_RCX, sizeof(gpointer)); /* @@ -833,7 +834,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8); } else { /* load rgctx ptr from vtable */ - amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer)); + amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer)); /* is the rgctx ptr null? */ amd64_test_reg_reg (code, AMD64_RAX, AMD64_RAX); /* if yes, jump to actual trampoline */ @@ -981,7 +982,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot) amd64_branch8 (code, X86_CC_Z, -1, 1); /* load obj->synchronization to RCX */ - amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8); + amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8); if (mono_gc_is_moving ()) { /*if bit zero is set it's a thin hash*/ @@ -1003,7 +1004,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot) /* load MonoInternalThread* into RDX */ code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ()); /* load TID into RDX */ - amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8); + amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8); /* is synchronization->owner null? */ amd64_alu_membase_imm_size (code, X86_CMP, AMD64_RCX, owner_offset, 0, 8); @@ -1106,7 +1107,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot) amd64_branch8 (code, X86_CC_Z, -1, 1); /* load obj->synchronization to RCX */ - amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8); + amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8); if (mono_gc_is_moving ()) { /*if bit zero is set it's a thin hash*/ @@ -1129,7 +1130,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot) /* load MonoInternalThread* into RDX */ code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ()); /* load TID into RDX */ - amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8); + amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8); /* is synchronization->owner == TID */ amd64_alu_membase_reg_size (code, X86_CMP, AMD64_RCX, owner_offset, AMD64_RDX, 8); /* if no, jump to actual trampoline */ @@ -1228,7 +1229,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot) if (mono_get_jit_tls_offset () != -1) { code = mono_amd64_emit_tls_get (code, AMD64_RDI, mono_get_jit_tls_offset ()); - amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8); + amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8); /* Simulate a call */ amd64_push_reg (code, AMD64_RAX); amd64_jump_code (code, tramp); diff --git a/mono/mini/tramp-arm.c b/mono/mini/tramp-arm.c index 9810f48f79..bb500a7c0f 100644 --- a/mono/mini/tramp-arm.c +++ b/mono/mini/tramp-arm.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -296,33 +297,33 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf */ /* r0 is the result from mono_get_lmf_addr () */ - ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr)); + ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr)); /* new_lmf->previous_lmf = *lmf_addr */ - ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf)); - ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf)); + ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf)); + ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf)); /* *(lmf_addr) = r1 */ - ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf)); + ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf)); /* save method info (it's in v2) */ if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP)) - ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method)); + ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method)); else { ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0); - ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method)); + ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method)); } /* save caller SP */ code = mono_arm_emit_load_imm (code, ARMREG_R2, cfa_offset); ARM_ADD_REG_REG (code, ARMREG_R2, ARMREG_SP, ARMREG_R2); - ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, sp)); + ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, sp)); /* save caller FP */ - ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4)); - ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fp)); + ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4)); + ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fp)); /* save the IP (caller ip) */ if (tramp_type == MONO_TRAMPOLINE_JUMP) { ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0); } else { - ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + 13*4)); + ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + 13*4)); } - ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, ip)); + ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, ip)); /* Save VFP registers. */ if (mono_arm_is_hard_float ()) { @@ -331,7 +332,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * it's easier than attempting to store them on the stack since * this trampoline code is pretty messy. */ - ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs)); + ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs)); ARM_FSTMD (code, ARM_VFP_D0, 8, ARMREG_R0); } @@ -339,7 +340,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * Now we're ready to call xxx_trampoline (). */ /* Arg 1: the saved registers */ - ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs), 0); + ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs), 0); /* Arg 2: code (next address to the instruction that called us) */ if (tramp_type == MONO_TRAMPOLINE_JUMP) { @@ -378,7 +379,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * clobbered). This way we can just restore all the regs in one inst * and branch to IP. */ - ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t))); + ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t))); /* Check for thread interruption */ /* This is not perf critical code so no need to check the interrupt flag */ @@ -413,15 +414,15 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * the same state as before we executed. */ /* ip = previous_lmf */ - ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf)); + ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf)); /* lr = lmf_addr */ - ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr)); + ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr)); /* *(lmf_addr) = previous_lmf */ - ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, G_STRUCT_OFFSET (MonoLMF, previous_lmf)); + ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf)); /* Restore VFP registers. */ if (mono_arm_is_hard_float ()) { - ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs)); + ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs)); ARM_FLDMD (code, ARM_VFP_D0, 8, ARMREG_R0); } @@ -703,8 +704,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info ARM_MOV_REG_REG (code, ARMREG_R1, ARMREG_R0); } else { /* load rgctx ptr from vtable */ - g_assert (arm_is_imm12 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context))); - ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)); + g_assert (arm_is_imm12 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context))); + ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)); /* is the rgctx ptr null? */ ARM_CMP_REG_IMM (code, ARMREG_R1, 0, 0); /* if yes, jump to actual trampoline */ diff --git a/mono/mini/tramp-mips.c b/mono/mini/tramp-mips.c index d7b598537d..9b80527ae7 100644 --- a/mono/mini/tramp-mips.c +++ b/mono/mini/tramp-mips.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -408,8 +409,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info mips_move (code, mips_a1, mips_a0); } else { /* load rgctx ptr from vtable */ - g_assert (mips_is_imm16 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context))); - mips_lw (code, mips_a1, mips_a0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)); + g_assert (mips_is_imm16 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context))); + mips_lw (code, mips_a1, mips_a0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)); /* is the rgctx ptr null? */ /* if yes, jump to actual trampoline */ rgctx_null_jumps [njumps ++] = code; diff --git a/mono/mini/tramp-ppc.c b/mono/mini/tramp-ppc.c index aec06abc14..6fac1a1bcb 100644 --- a/mono/mini/tramp-ppc.c +++ b/mono/mini/tramp-ppc.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -545,7 +546,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info ppc_mr (code, ppc_r4, PPC_FIRST_ARG_REG); } else { /* load rgctx ptr from vtable */ - ppc_ldptr (code, ppc_r4, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG); + ppc_ldptr (code, ppc_r4, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG); /* is the rgctx ptr null? */ ppc_compare_reg_imm (code, 0, ppc_r4, 0); /* if yes, jump to actual trampoline */ diff --git a/mono/mini/tramp-s390x.c b/mono/mini/tramp-s390x.c index 8f2875afdf..fa664e12e1 100644 --- a/mono/mini/tramp-s390x.c +++ b/mono/mini/tramp-s390x.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -53,6 +54,7 @@ #include "mini.h" #include "mini-s390x.h" +#include "support-s390x.h" /*========================= End of Includes ========================*/ @@ -99,10 +101,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *method, gpointer addr) start = code = mono_domain_code_reserve (domain, 28); - s390_basr (code, s390_r1, 0); - s390_j (code, 6); - s390_llong(code, addr); - s390_lg (code, s390_r1, 0, s390_r1, 4); + S390_SET (code, s390_r1, addr); s390_aghi (code, this_pos, sizeof(MonoObject)); s390_br (code, s390_r1); @@ -129,27 +128,20 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr) gint32 displace; unsigned short opcode; - opcode = *((unsigned short *) (orig_code - 6)); - if (opcode == 0xc0e5) { + opcode = *((unsigned short *) (orig_code - 2)); + if (opcode == 0x0dee) { + /* This should be a 'iihf/iilf' sequence */ + S390_EMIT_CALL((orig_code - 14), addr); + mono_arch_flush_icache (orig_code - 14, 12); + } else { +fprintf(stderr, "%p %02x %02x %02x %02x\n", +&orig_code[-14], orig_code[-12], orig_code[-11], orig_code[-6], orig_code[-5]); +fflush(stderr); /* This is the 'brasl' instruction */ orig_code -= 4; displace = ((gssize) addr - (gssize) (orig_code - 2)) / 2; s390_patch_rel (orig_code, displace); mono_arch_flush_icache (orig_code, 4); - } else { - /* This should be a 'lg %r14,4(%r13)' then a 'basr r14, r14' instruction */ - g_assert (orig_code [-8] == 0xe3); - g_assert (orig_code [-7] == 0xe0); - g_assert (orig_code [-6] == 0xd0); - g_assert (orig_code [-5] == 0x04); - g_assert (orig_code [-4] == 0x00); - g_assert (orig_code [-3] == 0x04); - opcode = *((unsigned short*) (orig_code - 2)); - g_assert (opcode == 0x0dee); - - /* The call address is stored in the 8 bytes preceeding the basr instruction */ - s390_patch_addr(orig_code - 16, (gssize)addr); - mono_arch_flush_icache (orig_code - 16, 8); } } @@ -231,7 +223,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf { char *tramp_name; guint8 *buf, *tramp, *code; - int i, offset, lmfOffset; + int i, offset, lmfOffset, has_caller; GSList *unwind_ops = NULL; MonoJumpInfo *ji = NULL; @@ -242,6 +234,12 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf code = buf = mono_global_codeman_reserve(512); + if ((tramp_type == MONO_TRAMPOLINE_JUMP) || + (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD)) + has_caller = 0; + else + has_caller = 1; + /*----------------------------------------------------------- STEP 0: First create a non-standard function prologue with a stack size big enough to save our registers. @@ -268,10 +266,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf method. ----------------------------------------------------------*/ - s390_basr (buf, s390_r13, 0); - s390_j (buf, 6); - s390_llong(buf, mono_get_lmf_addr); - s390_lg (buf, s390_r1, 0, s390_r13, 4); + S390_SET (buf, s390_r1, mono_get_lmf_addr); s390_basr (buf, s390_r14, s390_r1); /*---------------------------------------------------------------*/ @@ -321,11 +316,10 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf /*---------------------------------------------------------------*/ /* save the current IP */ /*---------------------------------------------------------------*/ - if (tramp_type == MONO_TRAMPOLINE_JUMP) { - s390_lghi (buf, s390_r1, 0); - } else { + if (has_caller) { s390_lg (buf, s390_r1, 0, s390_r1, S390_RET_ADDR_OFFSET); - // s390_la (buf, s390_r1, 0, s390_r1, 0); + } else { + s390_lghi (buf, s390_r1, 0); } s390_stg (buf, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, eip)); @@ -351,10 +345,10 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf s390_la (buf, s390_r2, 0, STK_BASE, CREATE_STACK_SIZE); /* Arg 2: code (next address to the instruction that called us) */ - if (tramp_type == MONO_TRAMPOLINE_JUMP) { - s390_lghi (buf, s390_r3, 0); - } else { + if (has_caller) { s390_lg (buf, s390_r3, 0, s390_r11, S390_RET_ADDR_OFFSET); + } else { + s390_lghi (buf, s390_r3, 0); } /* Arg 3: Trampoline argument */ @@ -366,11 +360,8 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf /* Arg 4: trampoline address. Ignore for now */ /* Calculate call address and call the C trampoline. Return value will be in r2 */ - s390_basr (buf, s390_r13, 0); - s390_j (buf, 6); tramp = (guint8*)mono_get_trampoline_func (tramp_type); - s390_llong (buf, tramp); - s390_lg (buf, s390_r1, 0, s390_r13, 4); + S390_SET (buf, s390_r1, tramp); s390_basr (buf, s390_r14, s390_r1); /* OK, code address is now on r2. Move it to r1, so that we @@ -426,6 +417,28 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf /*========================= End of Function ========================*/ +/*------------------------------------------------------------------*/ +/* */ +/* Name - mono_arch_invalidate_method */ +/* */ +/* Function - */ +/* */ +/*------------------------------------------------------------------*/ + +void +mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg) +{ + /* FIXME: This is not thread safe */ + guint8 *code = ji->code_start; + + S390_SET (code, s390_r1, func); + S390_SET (code, s390_r2, func_arg); + s390_br (code, s390_r1); + +} + +/*========================= End of Function ========================*/ + /*------------------------------------------------------------------*/ /* */ /* Name - mono_arch_create_specific_trampoline */ @@ -449,10 +462,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty /*----------------------------------------------------------*/ code = buf = mono_domain_code_reserve (domain, SPECIFIC_TRAMPOLINE_SIZE); - s390_basr (buf, s390_r1, 0); - s390_j (buf, 6); - s390_llong(buf, arg1); - s390_lg (buf, s390_r1, 0, s390_r1, 4); + S390_SET (buf, s390_r1, arg1); displace = (tramp - buf) / 2; s390_jg (buf, displace); @@ -524,7 +534,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info s390_lgr (code, s390_r1, s390_r2); } else { /* load rgctx ptr from vtable */ - s390_lg (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoVTable, runtime_generic_context)); + s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET(MonoVTable, runtime_generic_context)); /* is the rgctx ptr null? */ s390_ltgr (code, s390_r1, s390_r1); /* if yes, jump to actual trampoline */ @@ -615,10 +625,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, start = code = mono_domain_code_reserve (domain, buf_len); - s390_basr (code, s390_r1, 0); - s390_j (code, 6); - s390_llong(code, mrgctx); - s390_lg (code, MONO_ARCH_RGCTX_REG, 0, s390_r1, 4); + S390_SET (code, MONO_ARCH_RGCTX_REG, mrgctx); displace = ((uintptr_t) addr - (uintptr_t) code) / 2; s390_jg (code, displace); g_assert ((code - start) < buf_len); @@ -630,6 +637,80 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, /*========================= End of Function ========================*/ +/*------------------------------------------------------------------*/ +/* */ +/* Name - handler_block_trampoline_helper */ +/* */ +/* Function - */ +/* */ +/*------------------------------------------------------------------*/ + +static void +handler_block_trampoline_helper (gpointer *ptr) +{ + MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id); + *ptr = jit_tls->handler_block_return_address; +} + +/*========================= End of Function ========================*/ + +/*------------------------------------------------------------------*/ +/* */ +/* Name - mono_arch_create_handler_block_trampoline */ +/* */ +/* Function - */ +/* */ +/*------------------------------------------------------------------*/ + +gpointer +mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot) +{ + guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD); + guint8 *code, *buf; + int tramp_size = 64; + MonoJumpInfo *ji = NULL; + GSList *unwind_ops = NULL; + + g_assert (!aot); + + code = buf = mono_global_codeman_reserve (tramp_size); + + /* + * This trampoline restore the call chain of the handler block + * then jumps into the code that deals with it. + */ + + if (mono_get_jit_tls_offset () != -1) { + s390_ear (code, s390_r1, 0); + s390_sllg (code, s390_r1, s390_r1, 0, 32); + s390_ear (code, s390_r1, 1); + S390_SET (code, s390_r14, mono_get_jit_tls_offset()); + s390_lg (code, s390_r14, s390_r1, 0, G_STRUCT_OFFSET(MonoJitTlsData, handler_block_return_address)); + /* + * Simulate a call + */ + S390_SET (code, s390_r1, tramp); + s390_br (code, s390_r1); + } else { + /* + * Slow path uses a C helper + */ + S390_SET (code, s390_r2, tramp); + S390_SET (code, s390_r1, handler_block_trampoline_helper); + s390_br (code, s390_r1); + } + + mono_arch_flush_icache (buf, code - buf); + g_assert (code - buf <= tramp_size); + + if (info) + *info = mono_tramp_info_create ("handler_block_trampoline", buf, code - buf, ji, unwind_ops); + + return buf; +} + +/*========================= End of Function ========================*/ + /*------------------------------------------------------------------*/ /* */ /* Name - mono_arch_create_generic_class_init_trampoline */ @@ -645,7 +726,6 @@ mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean a guint8 *code, *buf; static int byte_offset = -1; static guint8 bitmask; - guint8 *jump; gint32 displace; int tramp_size; GSList *unwind_ops = NULL; diff --git a/mono/mini/tramp-x86.c b/mono/mini/tramp-x86.c index 5d9f17dff5..e86e061eb7 100644 --- a/mono/mini/tramp-x86.c +++ b/mono/mini/tramp-x86.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -25,6 +26,8 @@ #include "mini.h" #include "mini-x86.h" +#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1)) + /* * mono_arch_get_unbox_trampoline: * @m: method pointer @@ -297,9 +300,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf { char *tramp_name; guint8 *buf, *code, *tramp; - int pushed_args, pushed_args_caller_saved; GSList *unwind_ops = NULL; MonoJumpInfo *ji = NULL; + int i, offset, frame_size, regarray_offset, lmf_offset, caller_ip_offset, arg_offset; unwind_ops = mono_arch_get_cie_program (); @@ -310,65 +313,75 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf * the ret address is at: esp + (pushed_args + 1) * sizeof (gpointer) */ - /* Put all registers into an array on the stack - * If this code is changed, make sure to update the offset value in - * mono_arch_get_this_arg_from_call () in mini-x86.c. - */ - x86_push_reg (code, X86_EDI); - x86_push_reg (code, X86_ESI); + // FIXME: Unwind info + + /* Compute frame offsets relative to the frame pointer %ebp */ + arg_offset = sizeof (mgreg_t); + caller_ip_offset = 2 * sizeof (mgreg_t); + offset = 0; + offset += sizeof (MonoLMF); + lmf_offset = -offset; + offset += X86_NREG * sizeof (mgreg_t); + regarray_offset = -offset; + /* Argument area */ + offset += 4 * sizeof (mgreg_t); + frame_size = ALIGN_TO (offset, MONO_ARCH_FRAME_ALIGNMENT); + + /* Allocate frame */ x86_push_reg (code, X86_EBP); - x86_push_reg (code, X86_ESP); - x86_push_reg (code, X86_EBX); - x86_push_reg (code, X86_EDX); - x86_push_reg (code, X86_ECX); - x86_push_reg (code, X86_EAX); + x86_mov_reg_reg (code, X86_EBP, X86_ESP, sizeof (mgreg_t)); + /* There are three words on the stack, adding + 4 aligns the stack to 16, which is needed on osx */ + x86_alu_reg_imm (code, X86_SUB, X86_ESP, frame_size + sizeof (mgreg_t)); - pushed_args_caller_saved = pushed_args = 8; + /* Save all registers */ + for (i = X86_EAX; i <= X86_EDI; ++i) { + int reg = i; - /* Align stack on apple */ - x86_alu_reg_imm (code, X86_SUB, X86_ESP, 4); + if (i == X86_EBP) { + /* Save original ebp */ + /* EAX is already saved */ + x86_mov_reg_membase (code, X86_EAX, X86_EBP, 0, sizeof (mgreg_t)); + reg = X86_EAX; + } else if (i == X86_ESP) { + /* Save original esp */ + /* EAX is already saved */ + x86_mov_reg_reg (code, X86_EAX, X86_EBP, sizeof (mgreg_t)); + /* Saved ebp + trampoline arg + return addr */ + x86_alu_reg_imm (code, X86_ADD, X86_EAX, 3 * sizeof (mgreg_t)); + reg = X86_EAX; + } + x86_mov_membase_reg (code, X86_EBP, regarray_offset + (i * sizeof (mgreg_t)), reg, sizeof (mgreg_t)); + } - pushed_args ++; - - /* save LMF begin */ - - /* save the IP (caller ip) */ - if (tramp_type == MONO_TRAMPOLINE_JUMP) - x86_push_imm (code, 0); - else - x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer)); - - pushed_args++; - - x86_push_reg (code, X86_EBP); - x86_push_reg (code, X86_ESI); - x86_push_reg (code, X86_EDI); - x86_push_reg (code, X86_EBX); - - pushed_args += 4; - - /* save ESP */ - x86_push_reg (code, X86_ESP); - /* Adjust ESP so it points to the previous frame */ - x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, (pushed_args + 2) * 4); - - pushed_args ++; - - /* save method info */ - if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP)) - x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer)); - else - x86_push_imm (code, 0); - - pushed_args++; - - /* On apple, the stack is correctly aligned to 16 bytes because pushed_args is - * 16 and there is the extra trampoline arg + the return ip pushed by call - * FIXME: Note that if an exception happens while some args are pushed - * on the stack, the stack will be misaligned. - */ - g_assert (pushed_args == 16); + /* Setup LMF */ + /* eip */ + if (tramp_type == MONO_TRAMPOLINE_JUMP) { + x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), 0, sizeof (mgreg_t)); + } else { + x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t)); + } + /* method */ + if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP)) { + x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), X86_EAX, sizeof (mgreg_t)); + } else { + x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), 0, sizeof (mgreg_t)); + } + /* esp */ + x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESP * sizeof (mgreg_t)), sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esp), X86_EAX, sizeof (mgreg_t)); + /* callee save registers */ + x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBX * sizeof (mgreg_t)), sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), X86_EAX, sizeof (mgreg_t)); + x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EDI * sizeof (mgreg_t)), sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), X86_EAX, sizeof (mgreg_t)); + x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESI * sizeof (mgreg_t)), sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), X86_EAX, sizeof (mgreg_t)); + x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBP * sizeof (mgreg_t)), sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), X86_EAX, sizeof (mgreg_t)); + /* Push LMF */ /* get the address of lmf for the current thread */ if (aot) { code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr"); @@ -376,42 +389,36 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf } else { x86_call_code (code, mono_get_lmf_addr); } - /* push lmf */ - x86_push_reg (code, X86_EAX); - /* push *lfm (previous_lmf) */ - x86_push_membase (code, X86_EAX, 0); + /* lmf->lmf_addr = lmf_addr (%eax) */ + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), X86_EAX, sizeof (mgreg_t)); + /* lmf->previous_lmf = *(lmf_addr) */ + x86_mov_reg_membase (code, X86_ECX, X86_EAX, 0, sizeof (mgreg_t)); /* Signal to mono_arch_find_jit_info () that this is a trampoline frame */ - x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, 1); - /* *(lmf) = ESP */ - x86_mov_membase_reg (code, X86_EAX, 0, X86_ESP, 4); - /* save LFM end */ + x86_alu_reg_imm (code, X86_ADD, X86_ECX, 1); + x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), X86_ECX, sizeof (mgreg_t)); + /* *lmf_addr = lmf */ + x86_lea_membase (code, X86_ECX, X86_EBP, lmf_offset); + x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t)); - pushed_args += 2; - - /* starting the call sequence */ - - /* FIXME: Push the trampoline address */ - x86_push_imm (code, 0); - - pushed_args++; - - /* push the method info */ - x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer)); - - pushed_args++; - - /* push the return address onto the stack */ - if (tramp_type == MONO_TRAMPOLINE_JUMP) - x86_push_imm (code, 0); - else - x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer)); - pushed_args++; - /* push the address of the register array */ - x86_lea_membase (code, X86_EAX, X86_ESP, (pushed_args - 8) * sizeof (gpointer)); - x86_push_reg (code, X86_EAX); - - pushed_args++; + /* Call trampoline function */ + /* Arg 1 - registers */ + x86_lea_membase (code, X86_EAX, X86_EBP, regarray_offset); + x86_mov_membase_reg (code, X86_ESP, (0 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t)); + /* Arg2 - calling code */ + if (tramp_type == MONO_TRAMPOLINE_JUMP) { + x86_mov_membase_imm (code, X86_ESP, (1 * sizeof (mgreg_t)), 0, sizeof (mgreg_t)); + } else { + x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_ESP, (1 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t)); + } + /* Arg3 - trampoline argument */ + x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t)); + x86_mov_membase_reg (code, X86_ESP, (2 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t)); + /* Arg4 - trampoline address */ + // FIXME: + x86_mov_membase_imm (code, X86_ESP, (3 * sizeof (mgreg_t)), 0, sizeof (mgreg_t)); + // FIXME: #ifdef __APPLE__ /* check the stack is aligned after the ret ip is pushed */ /*x86_mov_reg_reg (buf, X86_EDX, X86_ESP, 4); @@ -421,8 +428,6 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf x86_breakpoint (buf);*/ #endif - mono_add_unwind_op_def_cfa (unwind_ops, code, buf, X86_ESP, ((pushed_args + 2) * 4)); - if (aot) { char *icall_name = g_strdup_printf ("trampoline_func_%d", tramp_type); code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, icall_name); @@ -432,96 +437,53 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf x86_call_code (code, tramp); } - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4*4); + /* + * Overwrite the trampoline argument with the address we need to jump to, + * to free %eax. + */ + x86_mov_membase_reg (code, X86_EBP, arg_offset, X86_EAX, 4); - pushed_args -= 4; - - /* Check for thread interruption */ - /* This is not perf critical code so no need to check the interrupt flag */ - /* Align the stack on osx */ - x86_alu_reg_imm (code, X86_SUB, X86_ESP, 3 * 4); - x86_push_reg (code, X86_EAX); + /* Check for interruptions */ if (aot) { code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_thread_force_interruption_checkpoint"); x86_call_reg (code, X86_EAX); } else { x86_call_code (code, (guint8*)mono_thread_force_interruption_checkpoint); } - x86_pop_reg (code, X86_EAX); - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 3 * 4); /* Restore LMF */ + x86_mov_reg_membase (code, X86_EAX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), sizeof (mgreg_t)); + x86_mov_reg_membase (code, X86_ECX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof (mgreg_t)); + x86_alu_reg_imm (code, X86_SUB, X86_ECX, 1); + x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t)); - /* ebx = previous_lmf */ - x86_pop_reg (code, X86_EBX); - pushed_args--; - x86_alu_reg_imm (code, X86_SUB, X86_EBX, 1); - - /* edi = lmf */ - x86_pop_reg (code, X86_EDI); - pushed_args--; - - /* *(lmf) = previous_lmf */ - x86_mov_membase_reg (code, X86_EDI, 0, X86_EBX, 4); - - /* discard method info */ - x86_pop_reg (code, X86_ESI); - pushed_args--; - - /* discard ESP */ - x86_pop_reg (code, X86_ESI); - pushed_args--; - - /* restore caller saved regs */ - x86_pop_reg (code, X86_EBX); - x86_pop_reg (code, X86_EDI); - x86_pop_reg (code, X86_ESI); - x86_pop_reg (code, X86_EBP); - - pushed_args -= 4; - - /* discard save IP */ - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4); - pushed_args--; - - /* restore LMF end */ - - if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) { - /* - * Overwrite the method ptr with the address we need to jump to, - * to free %eax. - */ - x86_mov_membase_reg (code, X86_ESP, pushed_args * sizeof (gpointer), X86_EAX, 4); + /* Restore registers */ + for (i = X86_EAX; i <= X86_EDI; ++i) { + if (i == X86_ESP || i == X86_EBP) + continue; + if (i == X86_EAX && !((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT))) + continue; + x86_mov_reg_membase (code, i, X86_EBP, regarray_offset + (i * 4), 4); } - /* Restore caller saved registers */ - x86_mov_reg_membase (code, X86_ECX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_ECX) * 4, 4); - x86_mov_reg_membase (code, X86_EDX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EDX) * 4, 4); - if ((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT)) - x86_mov_reg_membase (code, X86_EAX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EAX) * 4, 4); + /* Restore frame */ + x86_leave (code); - if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) { - /* Pop saved reg array + stack align */ - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 9 * 4); - pushed_args -= 9; - g_assert (pushed_args == 0); - } else { - /* Pop saved reg array + stack align + method ptr */ - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 10 * 4); - pushed_args -= 10; - - /* We've popped one more stack item than we've pushed (the - method ptr argument), so we must end up at -1. */ - g_assert (pushed_args == -1); - } - - /*block guard trampolines are called with the stack aligned but must exit with the stack unaligned. */ - if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD) { - x86_pop_reg (code, X86_EAX); - x86_alu_reg_imm (code, X86_ADD, X86_ESP, 0x8); - x86_jump_reg (code, X86_EAX); - } else { + if (MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) { + /* Load the value returned by the trampoline */ + x86_mov_reg_membase (code, X86_EAX, X86_ESP, 0, 4); + /* The trampoline returns normally, pop the trampoline argument */ + x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4); x86_ret (code); + } else { + /* The trampoline argument is at the top of the stack, and it contains the address we need to branch to */ + if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD) { + x86_pop_reg (code, X86_EAX); + x86_alu_reg_imm (code, X86_ADD, X86_ESP, 0x8); + x86_jump_reg (code, X86_EAX); + } else { + x86_ret (code); + } } nacl_global_codeman_validate (&buf, 256, &code); @@ -622,7 +584,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4); if (!mrgctx) { /* load rgctx ptr from vtable */ - x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4); + x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4); /* is the rgctx ptr null? */ x86_test_reg_reg (code, X86_EAX, X86_EAX); /* if yes, jump to actual trampoline */ @@ -834,7 +796,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot) x86_branch8 (code, X86_CC_Z, -1, 1); /* load obj->synchronization to ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4); if (mono_gc_is_moving ()) { /*if bit zero is set it's a thin hash*/ @@ -865,7 +827,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot) code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ()); } /* load TID into EDX */ - x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4); + x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4); /* is synchronization->owner null? */ x86_alu_membase_imm (code, X86_CMP, X86_ECX, owner_offset, 0); @@ -975,7 +937,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot) x86_branch8 (code, X86_CC_Z, -1, 1); /* load obj->synchronization to ECX */ - x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4); + x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4); if (mono_gc_is_moving ()) { /*if bit zero is set it's a thin hash*/ @@ -1006,7 +968,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot) code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ()); } /* load TID into EDX */ - x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4); + x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4); /* is synchronization->owner == TID */ x86_alu_membase_reg (code, X86_CMP, X86_ECX, owner_offset, X86_EDX); /* if no, jump to actual trampoline */ @@ -1121,7 +1083,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot) if (mono_get_jit_tls_offset () != -1) { code = mono_x86_emit_tls_get (code, X86_EAX, mono_get_jit_tls_offset ()); - x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4); + x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4); } else { /*Slow path uses a c helper*/ x86_call_code (code, handler_block_trampoline_helper); diff --git a/mono/mini/unwind.c b/mono/mini/unwind.c index 8a7d46eae4..a993350aef 100644 --- a/mono/mini/unwind.c +++ b/mono/mini/unwind.c @@ -307,10 +307,23 @@ mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len) offset = decode_sleb128 (p, &p) * DWARF_DATA_ALIGN; printf ("CFA: [%x] offset_extended_sf: %s at cfa-0x%x\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg)), -offset); break; + case DW_CFA_same_value: + reg = decode_uleb128 (p, &p); + printf ("CFA: [%x] same_value: %s\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg))); + break; case DW_CFA_advance_loc4: pos += read32 (p); p += 4; break; + case DW_CFA_remember_state: + printf ("CFA: [%x] remember_state\n", pos); + break; + case DW_CFA_restore_state: + printf ("CFA: [%x] restore_state\n", pos); + break; + case DW_CFA_mono_advance_loc: + printf ("CFA: [%x] mono_advance_loc\n", pos); + break; default: g_assert_not_reached (); } @@ -348,9 +361,31 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) /* Convert the register from the hw encoding to the dwarf encoding */ reg = mono_hw_reg_to_dwarf_reg (op->reg); + if (op->op == DW_CFA_mono_advance_loc) { + /* This advances loc to its location */ + loc = op->when; + } + /* Emit an advance_loc if neccesary */ while (op->when > loc) { - if (op->when - loc < 32) { + if (op->when - loc > 65536) { + *p ++ = DW_CFA_advance_loc4; + *(guint32*)p = (guint32)(op->when - loc); + g_assert (read32 (p) == (guint32)(op->when - loc)); + p += 4; + loc = op->when; + } else if (op->when - loc > 256) { + *p ++ = DW_CFA_advance_loc2; + *(guint16*)p = (guint16)(op->when - loc); + g_assert (read16 (p) == (guint32)(op->when - loc)); + p += 2; + loc = op->when; + } else if (op->when - loc >= 32) { + *p ++ = DW_CFA_advance_loc1; + *(guint8*)p = (guint8)(op->when - loc); + p += 1; + loc = op->when; + } else if (op->when - loc < 32) { *p ++ = DW_CFA_advance_loc | (op->when - loc); loc = op->when; } else { @@ -373,6 +408,10 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) *p ++ = op->op; encode_uleb128 (reg, p, &p); break; + case DW_CFA_same_value: + *p ++ = op->op; + encode_uleb128 (reg, p, &p); + break; case DW_CFA_offset: if (reg > 63) { *p ++ = DW_CFA_offset_extended_sf; @@ -383,6 +422,15 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) encode_uleb128 (op->val / DWARF_DATA_ALIGN, p, &p); } break; + case DW_CFA_remember_state: + case DW_CFA_restore_state: + *p ++ = op->op; + break; + case DW_CFA_mono_advance_loc: + /* Only one location is supported */ + g_assert (op->val == 0); + *p ++ = op->op; + break; default: g_assert_not_reached (); break; @@ -416,6 +464,12 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location printf ("\n"); } +typedef struct { + Loc locations [NUM_REGS]; + guint8 reg_saved [NUM_REGS]; + int cfa_reg, cfa_offset; +} UnwindState; + /* * Given the state of the current frame as stored in REGS, execute the unwind * operations in unwind_info until the location counter reaches POS. The result is @@ -423,11 +477,13 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location * If SAVE_LOCATIONS is non-NULL, it should point to an array of size SAVE_LOCATIONS_LEN. * On return, the nth entry will point to the address of the stack slot where register * N was saved, or NULL, if it was not saved by this frame. + * MARK_LOCATIONS should contain the locations marked by mono_emit_unwind_op_mark_loc (), if any. * This function is signal safe. */ void mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, - guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs, + guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations, + mgreg_t *regs, int nregs, mgreg_t **save_locations, int save_locations_len, guint8 **out_cfa) { @@ -436,6 +492,8 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, int i, pos, reg, cfa_reg, cfa_offset, offset; guint8 *p; guint8 *cfa_val; + UnwindState state_stack [1]; + int state_stack_pos; memset (reg_saved, 0, sizeof (reg_saved)); @@ -443,6 +501,7 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, pos = 0; cfa_reg = -1; cfa_offset = -1; + state_stack_pos = 0; while (pos <= ip - start_ip && p < unwind_info + unwind_info_len) { int op = *p & 0xc0; @@ -489,10 +548,42 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len, locations [reg].loc_type = LOC_OFFSET; locations [reg].offset = offset * DWARF_DATA_ALIGN; break; + case DW_CFA_same_value: + reg = decode_uleb128 (p, &p); + locations [reg].loc_type = LOC_SAME; + break; + case DW_CFA_advance_loc1: + pos += *p; + p += 1; + break; + case DW_CFA_advance_loc2: + pos += read16 (p); + p += 2; + break; case DW_CFA_advance_loc4: pos += read32 (p); p += 4; break; + case DW_CFA_remember_state: + g_assert (state_stack_pos == 0); + memcpy (&state_stack [0].locations, &locations, sizeof (locations)); + memcpy (&state_stack [0].reg_saved, ®_saved, sizeof (reg_saved)); + state_stack [0].cfa_reg = cfa_reg; + state_stack [0].cfa_offset = cfa_offset; + state_stack_pos ++; + break; + case DW_CFA_restore_state: + g_assert (state_stack_pos == 1); + state_stack_pos --; + memcpy (&locations, &state_stack [0].locations, sizeof (locations)); + memcpy (®_saved, &state_stack [0].reg_saved, sizeof (reg_saved)); + cfa_reg = state_stack [0].cfa_reg; + cfa_offset = state_stack [0].cfa_offset; + break; + case DW_CFA_mono_advance_loc: + g_assert (mark_locations [0]); + pos = mark_locations [0] - start_ip; + break; default: g_assert_not_reached (); } @@ -555,7 +646,7 @@ mono_unwind_cleanup (void) * A copy is made of the unwind info. * This function is useful for two reasons: * - many methods have the same unwind info - * - MonoJitInfo->used_regs is an int so it can't store the pointer to the unwind info + * - MonoJitInfo->unwind_info is an int so it can't store the pointer to the unwind info */ guint32 mono_cache_unwind_info (guint8 *unwind_info, guint32 unwind_info_len) diff --git a/mono/mini/version.h b/mono/mini/version.h index c0a67bae21..0a67b3a0be 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "(detached/f540f8a" +#define FULL_VERSION "(detached/45d0ba1" diff --git a/mono/monograph/Makefile.in b/mono/monograph/Makefile.in index e9555ad026..42070f8617 100644 --- a/mono/monograph/Makefile.in +++ b/mono/monograph/Makefile.in @@ -225,6 +225,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -233,6 +234,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -299,6 +301,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -348,6 +351,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/profiler/Makefile.in b/mono/profiler/Makefile.in index fe9f84f801..f22c9b576d 100644 --- a/mono/profiler/Makefile.in +++ b/mono/profiler/Makefile.in @@ -289,6 +289,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -297,6 +298,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -363,6 +365,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -412,6 +415,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/profiler/decode.c b/mono/profiler/decode.c index eea1dbf5db..2a674e579a 100644 --- a/mono/profiler/decode.c +++ b/mono/profiler/decode.c @@ -20,6 +20,7 @@ #if defined (HAVE_SYS_ZLIB) #include #endif +#include #include #include #include @@ -457,9 +458,12 @@ dump_counters (void) } } else if (counters_sort_mode == COUNTERS_SORT_TIME) { for (ctimestamp = counters_timestamps; ctimestamp; ctimestamp = ctimestamp->next) { - fprintf (outfile, "\t%lld:%02lld:%02lld:%02lld.%03lld:\n", ctimestamp->value / 1000 / 60 / 60 / 24 % 1000, - ctimestamp->value / 1000 / 60 / 60 % 24, ctimestamp->value / 1000 / 60 % 60, - ctimestamp->value / 1000 % 60, ctimestamp->value % 1000); + fprintf (outfile, "\t%llu:%02llu:%02llu:%02llu.%03llu:\n", + (unsigned long long) (ctimestamp->value / 1000 / 60 / 60 / 24 % 1000), + (unsigned long long) (ctimestamp->value / 1000 / 60 / 60 % 24), + (unsigned long long) (ctimestamp->value / 1000 / 60 % 60), + (unsigned long long) (ctimestamp->value / 1000 % 60), + (unsigned long long) (ctimestamp->value % 1000)); for (csection = ctimestamp->sections; csection; csection = csection->next) { fprintf (outfile, "\t\t%s:\n", section_name (csection->value)); @@ -485,9 +489,12 @@ dump_counters (void) counter->name, type_name (counter->type), unit_name (counter->unit), variance_name (counter->variance)); for (cvalue = counter->values; cvalue; cvalue = cvalue->next) { - snprintf (strtimestamp, sizeof (strtimestamp), "%lld:%02lld:%02lld:%02lld.%03lld", cvalue->timestamp / 1000 / 60 / 60 / 24 % 1000, - cvalue->timestamp / 1000 / 60 / 60 % 24, cvalue->timestamp / 1000 / 60 % 60, - cvalue->timestamp / 1000 % 60, cvalue->timestamp % 1000); + snprintf (strtimestamp, sizeof (strtimestamp), "%llu:%02llu:%02llu:%02llu.%03llu", + (unsigned long long) (cvalue->timestamp / 1000 / 60 / 60 / 24 % 1000), + (unsigned long long) (cvalue->timestamp / 1000 / 60 / 60 % 24), + (unsigned long long) (cvalue->timestamp / 1000 / 60 % 60), + (unsigned long long) (cvalue->timestamp / 1000 % 60), + (unsigned long long) (cvalue->timestamp % 1000)); dump_counters_value (counter, "\t\t\t%s", strtimestamp, cvalue->buffer); } @@ -852,9 +859,9 @@ static void print_usym (UnmanagedSymbol* um) { if (um->parent) - fprintf (outfile, "\t%6d %6.2f %-36s in %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name, um->parent->name); + fprintf (outfile, "\t%6zd %6.2f %-36s in %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name, um->parent->name); else - fprintf (outfile, "\t%6d %6.2f %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name); + fprintf (outfile, "\t%6zd %6.2f %s\n", um->sample_hits, um->sample_hits*100.0/num_stat_samples, um->name); } static int @@ -1333,7 +1340,7 @@ heap_shot_mark_objects (HeapShot *hs) fprintf (outfile, "object %p (%s) unmarked\n", (void*)hs->objects_hash [i], hs->objects_hash [i]->hklass->klass->name); } } - fprintf (outfile, "Total unmarked: %d/%d\n", num_unmarked, hs->objects_count); + fprintf (outfile, "Total unmarked: %zd/%zd\n", num_unmarked, hs->objects_count); free (marks); } @@ -1426,7 +1433,7 @@ typedef struct _ThreadContext ThreadContext; typedef struct { FILE *file; #if defined (HAVE_SYS_ZLIB) - gzFile *gzfile; + gzFile gzfile; #endif unsigned char *buf; int size; @@ -1840,7 +1847,7 @@ tracked_creation (uintptr_t obj, ClassDesc *cd, uint64_t size, BackTrace *bt, ui for (i = 0; i < num_tracked_objects; ++i) { if (tracked_objects [i] != obj) continue; - fprintf (outfile, "Object %p created (%s, %llu bytes) at %.3f secs.\n", (void*)obj, cd->name, size, (timestamp - startup_time)/1000000000.0); + fprintf (outfile, "Object %p created (%s, %llu bytes) at %.3f secs.\n", (void*)obj, cd->name, (unsigned long long) size, (timestamp - startup_time)/1000000000.0); if (bt && bt->count) { int k; for (k = 0; k < bt->count; ++k) @@ -1929,7 +1936,7 @@ decode_buffer (ProfContext *ctx) thread_id = read_int64 (p + 32); method_base = read_int64 (p + 40); if (debug) - fprintf (outfile, "buf: thread:%x, len: %d, time: %llu, file offset: %llu\n", thread_id, len, time_base, file_offset); + fprintf (outfile, "buf: thread:%zx, len: %d, time: %llu, file offset: %llu\n", thread_id, len, (unsigned long long) time_base, (unsigned long long) file_offset); thread = load_thread (ctx, thread_id); if (!load_data (ctx, len)) return 0; @@ -1956,7 +1963,7 @@ decode_buffer (ProfContext *ctx) if (subtype == TYPE_GC_RESIZE) { uint64_t new_size = decode_uleb128 (p, &p); if (debug) - fprintf (outfile, "gc heap resized to %llu\n", new_size); + fprintf (outfile, "gc heap resized to %llu\n", (unsigned long long) new_size); gc_resizes++; if (new_size > max_heap_size) max_heap_size = new_size; @@ -1964,7 +1971,7 @@ decode_buffer (ProfContext *ctx) uint64_t ev = decode_uleb128 (p, &p); int gen = decode_uleb128 (p, &p); if (debug) - fprintf (outfile, "gc event for gen%d: %s at %llu (thread: 0x%x)\n", gen, gc_event_name (ev), time_base, thread->thread_id); + fprintf (outfile, "gc event for gen%d: %s at %llu (thread: 0x%zx)\n", gen, gc_event_name (ev), (unsigned long long) time_base, thread->thread_id); if (gen > 2) { fprintf (outfile, "incorrect gc gen: %d\n", gen); break; @@ -2033,7 +2040,7 @@ decode_buffer (ProfContext *ctx) return 0; } if (debug) - fprintf (outfile, "loaded class %p (%s in %p) at %llu\n", (void*)(ptr_base + ptrdiff), p, (void*)(ptr_base + imptrdiff), time_base); + fprintf (outfile, "loaded class %p (%s in %p) at %llu\n", (void*)(ptr_base + ptrdiff), p, (void*)(ptr_base + imptrdiff), (unsigned long long) time_base); if (!error) add_class (ptr_base + ptrdiff, (char*)p); while (*p) p++; @@ -2045,7 +2052,7 @@ decode_buffer (ProfContext *ctx) return 0; } if (debug) - fprintf (outfile, "loaded image %p (%s) at %llu\n", (void*)(ptr_base + ptrdiff), p, time_base); + fprintf (outfile, "loaded image %p (%s) at %llu\n", (void*)(ptr_base + ptrdiff), p, (unsigned long long) time_base); if (!error) add_image (ptr_base + ptrdiff, (char*)p); while (*p) p++; @@ -2080,7 +2087,7 @@ decode_buffer (ProfContext *ctx) LOG_TIME (time_base, tdiff); time_base += tdiff; if (debug) - fprintf (outfile, "alloced object %p, size %llu (%s) at %llu\n", (void*)OBJ_ADDR (objdiff), len, lookup_class (ptr_base + ptrdiff)->name, time_base); + fprintf (outfile, "alloced object %p, size %llu (%s) at %llu\n", (void*)OBJ_ADDR (objdiff), (unsigned long long) len, lookup_class (ptr_base + ptrdiff)->name, (unsigned long long) time_base); if (has_bt) { num_bt = 8; frames = decode_bt (sframes, &num_bt, p, &p, ptr_base); @@ -2149,13 +2156,13 @@ decode_buffer (ProfContext *ctx) case TYPE_HEAP: { int subtype = *p & 0xf0; if (subtype == TYPE_HEAP_OBJECT) { - HeapObjectDesc *ho; + HeapObjectDesc *ho = NULL; int i; intptr_t objdiff = decode_sleb128 (p + 1, &p); intptr_t ptrdiff = decode_sleb128 (p, &p); uint64_t size = decode_uleb128 (p, &p); uintptr_t num = decode_uleb128 (p, &p); - uintptr_t ref_offset; + uintptr_t ref_offset = 0; uintptr_t last_obj_offset = 0; ClassDesc *cd = lookup_class (ptr_base + ptrdiff); if (size) { @@ -2182,10 +2189,10 @@ decode_buffer (ProfContext *ctx) track_obj_reference (OBJ_ADDR (obj1diff), OBJ_ADDR (objdiff), cd); } if (debug && size) - fprintf (outfile, "traced object %p, size %llu (%s), refs: %d\n", (void*)OBJ_ADDR (objdiff), size, cd->name, num); + fprintf (outfile, "traced object %p, size %llu (%s), refs: %zd\n", (void*)OBJ_ADDR (objdiff), (unsigned long long) size, cd->name, num); } else if (subtype == TYPE_HEAP_ROOT) { uintptr_t num = decode_uleb128 (p + 1, &p); - uintptr_t gc_num = decode_uleb128 (p, &p); + uintptr_t gc_num G_GNUC_UNUSED = decode_uleb128 (p, &p); int i; for (i = 0; i < num; ++i) { intptr_t objdiff = decode_sleb128 (p, &p); @@ -2389,7 +2396,7 @@ decode_buffer (ProfContext *ctx) /* un unmanaged binary loaded in memory */ uint64_t tdiff = decode_uleb128 (p + 1, &p); uintptr_t addr = decode_sleb128 (p, &p); - uint64_t offset = decode_uleb128 (p, &p); + uint64_t offset G_GNUC_UNUSED = decode_uleb128 (p, &p); uintptr_t size = decode_uleb128 (p, &p); char *name; LOG_TIME (time_base, tdiff); @@ -2487,7 +2494,7 @@ decode_buffer (ProfContext *ctx) break; } default: - fprintf (outfile, "unhandled profiler event: 0x%x at file offset: %llu + %d (len: %d\n)\n", *p, file_offset, p - ctx->buf, len); + fprintf (outfile, "unhandled profiler event: 0x%x at file offset: %llu + %lld (len: %d\n)\n", *p, (unsigned long long) file_offset, (long long) (p - ctx->buf), len); exit (1); } } @@ -2591,7 +2598,7 @@ dump_traces (TraceDesc *traces, const char *desc) bt = traces->traces [j].bt; if (!bt->count) continue; - fprintf (outfile, "\t%llu %s from:\n", traces->traces [j].count, desc); + fprintf (outfile, "\t%llu %s from:\n", (unsigned long long) traces->traces [j].count, desc); for (k = 0; k < bt->count; ++k) fprintf (outfile, "\t\t%s\n", bt->methods [k]->name); } @@ -2612,12 +2619,12 @@ dump_exceptions (void) { int i; fprintf (outfile, "\nException summary\n"); - fprintf (outfile, "\tThrows: %llu\n", throw_count); + fprintf (outfile, "\tThrows: %llu\n", (unsigned long long) throw_count); dump_traces (&exc_traces, "throws"); for (i = 0; i <= MONO_EXCEPTION_CLAUSE_FAULT; ++i) { if (!clause_summary [i]) continue; - fprintf (outfile, "\tExecuted %s clauses: %llu\n", clause_name (i), clause_summary [i]); + fprintf (outfile, "\tExecuted %s clauses: %llu\n", clause_name (i), (unsigned long long) clause_summary [i]); } } @@ -2657,9 +2664,9 @@ dump_monitors (void) mdesc->wait_time/1000000000.0, mdesc->max_wait_time/1000000000.0, mdesc->wait_time/1000000000.0/mdesc->contentions); dump_traces (&mdesc->traces, "contentions"); } - fprintf (outfile, "\tLock contentions: %llu\n", monitor_contention); - fprintf (outfile, "\tLock acquired: %llu\n", monitor_acquired); - fprintf (outfile, "\tLock failures: %llu\n", monitor_failed); + fprintf (outfile, "\tLock contentions: %llu\n", (unsigned long long) monitor_contention); + fprintf (outfile, "\tLock acquired: %llu\n", (unsigned long long) monitor_acquired); + fprintf (outfile, "\tLock failures: %llu\n", (unsigned long long) monitor_failed); } static void @@ -2668,20 +2675,25 @@ dump_gcs (void) int i; fprintf (outfile, "\nGC summary\n"); fprintf (outfile, "\tGC resizes: %d\n", gc_resizes); - fprintf (outfile, "\tMax heap size: %llu\n", max_heap_size); - fprintf (outfile, "\tObject moves: %llu\n", gc_object_moves); + fprintf (outfile, "\tMax heap size: %llu\n", (unsigned long long) max_heap_size); + fprintf (outfile, "\tObject moves: %llu\n", (unsigned long long) gc_object_moves); for (i = 0; i < 3; ++i) { if (!gc_info [i].count) continue; fprintf (outfile, "\tGen%d collections: %d, max time: %lluus, total time: %lluus, average: %lluus\n", - i, gc_info [i].count, gc_info [i].max_time / 1000, gc_info [i].total_time / 1000, - gc_info [i].total_time / gc_info [i].count / 1000); + i, gc_info [i].count, + (unsigned long long) (gc_info [i].max_time / 1000), + (unsigned long long) (gc_info [i].total_time / 1000), + (unsigned long long) (gc_info [i].total_time / gc_info [i].count / 1000)); } for (i = 0; i < 3; ++i) { if (!handle_info [i].max_live) continue; fprintf (outfile, "\tGC handles %s: created: %llu, destroyed: %llu, max: %llu\n", - get_handle_name (i), handle_info [i].created, handle_info [i].destroyed, handle_info [i].max_live); + get_handle_name (i), + (unsigned long long) (handle_info [i].created), + (unsigned long long) (handle_info [i].destroyed), + (unsigned long long) (handle_info [i].max_live)); dump_traces (&handle_info [i].traces, "created"); } } @@ -2735,11 +2747,15 @@ dump_allocations (void) fprintf (outfile, "\nAllocation summary\n"); fprintf (outfile, "%10s %10s %8s Type name\n", "Bytes", "Count", "Average"); } - fprintf (outfile, "%10llu %10d %8llu %s\n", cd->alloc_size, cd->allocs, cd->alloc_size / cd->allocs, cd->name); + fprintf (outfile, "%10llu %10zd %8llu %s\n", + (unsigned long long) (cd->alloc_size), + cd->allocs, + (unsigned long long) (cd->alloc_size / cd->allocs), + cd->name); dump_traces (&cd->traces, "bytes"); } if (allocs) - fprintf (outfile, "Total memory allocated: %llu bytes in %d objects\n", size, allocs); + fprintf (outfile, "Total memory allocated: %llu bytes in %zd objects\n", (unsigned long long) size, allocs); } enum { @@ -2825,11 +2841,15 @@ dump_methods (void) fprintf (outfile, "\nMethod call summary\n"); fprintf (outfile, "%8s %8s %10s Method name\n", "Total(ms)", "Self(ms)", "Calls"); } - fprintf (outfile, "%8llu %8llu %10llu %s\n", msecs, smsecs, cd->calls, cd->name); + fprintf (outfile, "%8llu %8llu %10llu %s\n", + (unsigned long long) (msecs), + (unsigned long long) (smsecs), + (unsigned long long) (cd->calls), + cd->name); dump_traces (&cd->traces, "calls"); } if (calls) - fprintf (outfile, "Total calls: %llu\n", calls); + fprintf (outfile, "Total calls: %llu\n", (unsigned long long) calls); } static int @@ -2874,7 +2894,9 @@ dump_rev_claases (HeapClassRevRef *revs, int count) return; for (j = 0; j < count; ++j) { HeapClassDesc *cd = revs [j].klass; - fprintf (outfile, "\t\t%llu references from: %s\n", revs [j].count, cd->klass->name); + fprintf (outfile, "\t\t%llu references from: %s\n", + (unsigned long long) (revs [j].count), + cd->klass->name); } } @@ -2898,8 +2920,12 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs) } hs->sorted = sorted; qsort (sorted, ccount, sizeof (void*), compare_heap_class); - fprintf (outfile, "\n\tHeap shot %d at %.3f secs: size: %llu, object count: %llu, class count: %d, roots: %d\n", - hs_num, (hs->timestamp - startup_time)/1000000000.0, size, count, ccount, hs->num_roots); + fprintf (outfile, "\n\tHeap shot %d at %.3f secs: size: %llu, object count: %llu, class count: %d, roots: %zd\n", + hs_num, + (hs->timestamp - startup_time)/1000000000.0, + (unsigned long long) (size), + (unsigned long long) (count), + ccount, hs->num_roots); if (!verbose && ccount > 30) ccount = 30; fprintf (outfile, "\t%10s %10s %8s Class name\n", "Bytes", "Count", "Average"); @@ -2910,11 +2936,15 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs) cd = sorted [i]; if (last_hs) ocd = heap_class_lookup (last_hs, cd->klass); - fprintf (outfile, "\t%10llu %10llu %8llu %s", cd->total_size, cd->count, cd->total_size / cd->count, cd->klass->name); + fprintf (outfile, "\t%10llu %10llu %8llu %s", + (unsigned long long) (cd->total_size), + (unsigned long long) (cd->count), + (unsigned long long) (cd->total_size / cd->count), + cd->klass->name); if (ocd) { int64_t bdiff = cd->total_size - ocd->total_size; int64_t cdiff = cd->count - ocd->count; - fprintf (outfile, " (bytes: %+lld, count: %+lld)\n", bdiff, cdiff); + fprintf (outfile, " (bytes: %+lld, count: %+lld)\n", (long long) bdiff, (long long) cdiff); } else { fprintf (outfile, "\n"); } @@ -2929,7 +2959,7 @@ heap_shot_summary (HeapShot *hs, int hs_num, HeapShot *last_hs) assert (cd->rev_count == k); qsort (rev_sorted, cd->rev_count, sizeof (HeapClassRevRef), compare_rev_class); if (cd->root_references) - fprintf (outfile, "\t\t%d root references (%d pinning)\n", cd->root_references, cd->pinned_references); + fprintf (outfile, "\t\t%zd root references (%zd pinning)\n", cd->root_references, cd->pinned_references); dump_rev_claases (rev_sorted, cd->rev_count); free (rev_sorted); } diff --git a/mono/profiler/proflog.c b/mono/profiler/proflog.c index 438c0ec380..f5ca7472a1 100644 --- a/mono/profiler/proflog.c +++ b/mono/profiler/proflog.c @@ -66,8 +66,7 @@ #include #endif -/* the architecture needs a memory fence */ -#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__arm__)) +#if defined(__linux__) #include #include #include "perf_event.h" @@ -354,7 +353,12 @@ struct _LogBuffer { unsigned char buf [1]; }; -#define ENTER_LOG(lb,str) if ((lb)->locked) {write(2, str, strlen(str)); write(2, "\n", 1);return;} else {(lb)->locked++;} +static inline void +ign_res (int G_GNUC_UNUSED unused, ...) +{ +} + +#define ENTER_LOG(lb,str) if ((lb)->locked) {ign_res (write(2, str, strlen(str))); ign_res (write(2, "\n", 1));return;} else {(lb)->locked++;} #define EXIT_LOG(lb) (lb)->locked--; typedef struct _StatBuffer StatBuffer; @@ -379,7 +383,7 @@ struct _MonoProfiler { StatBuffer *stat_buffers; FILE* file; #if defined (HAVE_SYS_ZLIB) - gzFile *gzfile; + gzFile gzfile; #endif uint64_t startup_time; int pipe_output; @@ -1233,7 +1237,7 @@ mono_sample_hit (MonoProfiler *profiler, unsigned char *ip, void *context) char buf [256]; snprintf (buf, sizeof (buf), "hit at %p in thread %p after %llu ms\n", ip, (void*)thread_id (), (unsigned long long int)elapsed/100); len = strlen (buf); - write (2, buf, len); + ign_res (write (2, buf, len)); } sbuf = profiler->stat_buffers; if (!sbuf) @@ -1251,22 +1255,22 @@ mono_sample_hit (MonoProfiler *profiler, unsigned char *ip, void *context) do { oldsb = profiler->stat_buffers; sbuf->next = oldsb; - foundsb = InterlockedCompareExchangePointer ((volatile void**)&profiler->stat_buffers, sbuf, oldsb); + foundsb = InterlockedCompareExchangePointer ((void * volatile*)&profiler->stat_buffers, sbuf, oldsb); } while (foundsb != oldsb); if (do_debug) - write (2, "overflow\n", 9); + ign_res (write (2, "overflow\n", 9)); /* notify the helper thread */ if (sbuf->next->next) { char c = 0; - write (profiler->pipes [1], &c, 1); + ign_res (write (profiler->pipes [1], &c, 1)); if (do_debug) - write (2, "notify\n", 7); + ign_res (write (2, "notify\n", 7)); } } do { old_data = sbuf->data; new_data = old_data + 4 + bt_data.count * 3; - data = InterlockedCompareExchangePointer ((volatile void**)&sbuf->data, new_data, old_data); + data = InterlockedCompareExchangePointer ((void * volatile*)&sbuf->data, new_data, old_data); } while (data != old_data); if (old_data >= sbuf->data_end) return; /* lost event */ @@ -1334,6 +1338,7 @@ add_code_pointer (uintptr_t ip) num_code_pages += add_code_page (code_pages, size_code_pages, ip & CPAGE_MASK); } +#if defined(HAVE_DL_ITERATE_PHDR) && defined(ELFMAG0) static void dump_ubin (const char *filename, uintptr_t load_addr, uint64_t offset, uintptr_t size) { @@ -1351,6 +1356,7 @@ dump_ubin (const char *filename, uintptr_t load_addr, uint64_t offset, uintptr_t memcpy (logbuffer->data, filename, len); logbuffer->data += len; } +#endif static void dump_usym (const char *name, uintptr_t value, uintptr_t size) @@ -2089,7 +2095,7 @@ log_shutdown (MonoProfiler *prof) if (prof->command_port) { char c = 1; void *res; - write (prof->pipes [1], &c, 1); + ign_res (write (prof->pipes [1], &c, 1)); pthread_join (prof->helper_thread, &res); } #endif diff --git a/mono/profiler/utils.c b/mono/profiler/utils.c index 8bf57a72f7..9266dee403 100644 --- a/mono/profiler/utils.c +++ b/mono/profiler/utils.c @@ -275,7 +275,7 @@ alloc_buffer (int size) return ptr; #else ptr = mmap (NULL, size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); - if (ptr == (void*)-1) + if (ptr == MAP_FAILED) return NULL; return ptr; #endif diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am index 097788b710..80c8f7e536 100644 --- a/mono/tests/Makefile.am +++ b/mono/tests/Makefile.am @@ -43,6 +43,7 @@ STRESS_TESTS_SRC= \ monitor-stress.cs \ thread-stress.cs \ gc-stress.cs \ + gc-graystack-stress.cs \ exit-stress.cs \ process-stress.cs \ assembly-load-stress.cs @@ -398,7 +399,6 @@ BASE_TEST_CS_SRC= \ allow-synchronous-major.cs \ unload-appdomain-on-shutdown.cs \ block_guard_restore_aligment_on_exit.cs \ - finally_block_ending_in_dead_bb.cs \ thread_static_gc_layout.cs \ sleep.cs @@ -406,19 +406,20 @@ TEST_CS_SRC_DIST= \ $(BASE_TEST_CS_SRC) \ async-exc-compilation.cs \ filter-stack.cs \ - finally_guard.cs + finally_guard.cs \ + finally_block_ending_in_dead_bb.cs TEST_CS_SRC_GEN = \ runtime-invoke.gen.cs \ imt_big_iface_test.cs if AMD64 -TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs +TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs # #651684 PLATFORM_DISABLED_TESTS = finally_guard.exe else if X86 -TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs +TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) async-exc-compilation.cs finally_guard.cs finally_block_ending_in_dead_bb.cs else TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) endif @@ -434,7 +435,7 @@ endif if X86 if HOST_WIN32 -PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe +PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe endif endif @@ -469,6 +470,7 @@ PLATFORM_DISABLED_TESTS= abort-stress-1.exe \ bug-70561.exe \ finalizer-abort.exe \ finally_guard.exe \ + finally_block_ending_in_dead_bb.exe \ main-returns-abort-resetabort.exe \ main-returns-background-abort-resetabort.exe \ thread6.exe \ @@ -563,7 +565,8 @@ DISABLED_TESTS_WRENCH= \ assemblyresolve_event3.exe \ delegate2.exe \ finally_guard.exe \ - gc-altstack.exe + gc-altstack.exe \ + generic-xdomain.2.exe AOT_DISABLED_TESTS=constraints-load.exe @@ -926,6 +929,7 @@ SGEN_TESTS = \ sgen-cementing-stress.exe \ sgen-case-23400.exe \ sgen-new-threads-dont-join-stw.exe \ + gc-graystack-stress.exe \ bug-17590.exe SGEN_CONFIGURATIONS = \ @@ -1247,7 +1251,7 @@ GSHARED_TESTS = \ generic-sealed-virtual.2.exe generic-system-arrays.2.exe \ generic-stack-traces.2.exe generic-stack-traces2.2.exe \ bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe \ - bug-479763.2.exe generic-xdomain.2.exe \ + bug-479763.2.exe \ generic-type-load-exception.2.exe bug-616463.exe \ bug-1147.exe diff --git a/mono/tests/Makefile.in b/mono/tests/Makefile.in index 936de70d40..0d536b9ae6 100644 --- a/mono/tests/Makefile.in +++ b/mono/tests/Makefile.in @@ -269,6 +269,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -277,6 +278,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -343,6 +345,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -392,6 +395,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -453,6 +457,7 @@ STRESS_TESTS_SRC = \ monitor-stress.cs \ thread-stress.cs \ gc-stress.cs \ + gc-graystack-stress.cs \ exit-stress.cs \ process-stress.cs \ assembly-load-stress.cs @@ -809,7 +814,6 @@ BASE_TEST_CS_SRC = \ allow-synchronous-major.cs \ unload-appdomain-on-shutdown.cs \ block_guard_restore_aligment_on_exit.cs \ - finally_block_ending_in_dead_bb.cs \ thread_static_gc_layout.cs \ sleep.cs @@ -817,7 +821,8 @@ TEST_CS_SRC_DIST = \ $(BASE_TEST_CS_SRC) \ async-exc-compilation.cs \ filter-stack.cs \ - finally_guard.cs + finally_guard.cs \ + finally_block_ending_in_dead_bb.cs TEST_CS_SRC_GEN = \ runtime-invoke.gen.cs \ @@ -828,17 +833,21 @@ TEST_CS_SRC_GEN = \ @AMD64_FALSE@@X86_TRUE@TEST_CS_SRC = $(BASE_TEST_CS_SRC) \ @AMD64_FALSE@@X86_TRUE@ $(TEST_CS_SRC_GEN) \ @AMD64_FALSE@@X86_TRUE@ async-exc-compilation.cs \ -@AMD64_FALSE@@X86_TRUE@ finally_guard.cs $(am__append_1) +@AMD64_FALSE@@X86_TRUE@ finally_guard.cs \ +@AMD64_FALSE@@X86_TRUE@ finally_block_ending_in_dead_bb.cs \ +@AMD64_FALSE@@X86_TRUE@ $(am__append_1) @AMD64_TRUE@TEST_CS_SRC = $(BASE_TEST_CS_SRC) $(TEST_CS_SRC_GEN) \ @AMD64_TRUE@ async-exc-compilation.cs finally_guard.cs \ -@AMD64_TRUE@ $(am__append_1) +@AMD64_TRUE@ finally_block_ending_in_dead_bb.cs $(am__append_1) # #651684 @AMD64_TRUE@PLATFORM_DISABLED_TESTS = finally_guard.exe \ @AMD64_TRUE@ $(am__append_2) @ARM_TRUE@PLATFORM_DISABLED_TESTS = filter-stack.exe $(am__append_2) @HOST_WIN32_TRUE@@X86_TRUE@PLATFORM_DISABLED_TESTS = \ @HOST_WIN32_TRUE@@X86_TRUE@ async-exc-compilation.exe \ -@HOST_WIN32_TRUE@@X86_TRUE@ finally_guard.exe $(am__append_2) +@HOST_WIN32_TRUE@@X86_TRUE@ finally_guard.exe \ +@HOST_WIN32_TRUE@@X86_TRUE@ finally_block_ending_in_dead_bb.exe \ +@HOST_WIN32_TRUE@@X86_TRUE@ $(am__append_2) # bug #319249 @IA64_TRUE@PLATFORM_DISABLED_TESTS = exception17.exe winx64structs.exe \ @IA64_TRUE@ $(am__append_2) @@ -871,6 +880,7 @@ TEST_CS_SRC_GEN = \ @NACL_CODEGEN_TRUE@ async-exc-compilation.exe bug-561239.exe \ @NACL_CODEGEN_TRUE@ bug-70561.exe finalizer-abort.exe \ @NACL_CODEGEN_TRUE@ finally_guard.exe \ +@NACL_CODEGEN_TRUE@ finally_block_ending_in_dead_bb.exe \ @NACL_CODEGEN_TRUE@ main-returns-abort-resetabort.exe \ @NACL_CODEGEN_TRUE@ main-returns-background-abort-resetabort.exe \ @NACL_CODEGEN_TRUE@ thread6.exe threadpool-exceptions5.exe \ @@ -924,7 +934,8 @@ DISABLED_TESTS_WRENCH = \ assemblyresolve_event3.exe \ delegate2.exe \ finally_guard.exe \ - gc-altstack.exe + gc-altstack.exe \ + generic-xdomain.2.exe AOT_DISABLED_TESTS = constraints-load.exe @@ -1060,6 +1071,7 @@ SGEN_TESTS = \ sgen-cementing-stress.exe \ sgen-case-23400.exe \ sgen-new-threads-dont-join-stw.exe \ + gc-graystack-stress.exe \ bug-17590.exe SGEN_CONFIGURATIONS = \ @@ -1112,7 +1124,7 @@ GSHARED_TESTS = \ generic-sealed-virtual.2.exe generic-system-arrays.2.exe \ generic-stack-traces.2.exe generic-stack-traces2.2.exe \ bug-472600.2.exe bug-473482.2.exe bug-473999.2.exe \ - bug-479763.2.exe generic-xdomain.2.exe \ + bug-479763.2.exe \ generic-type-load-exception.2.exe bug-616463.exe \ bug-1147.exe diff --git a/mono/tests/assemblyresolve/Makefile.in b/mono/tests/assemblyresolve/Makefile.in index 2e0dbc1086..1a12268485 100644 --- a/mono/tests/assemblyresolve/Makefile.in +++ b/mono/tests/assemblyresolve/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/Makefile.in b/mono/tests/cas/Makefile.in index 8370d66aa0..a72dc896ca 100644 --- a/mono/tests/cas/Makefile.in +++ b/mono/tests/cas/Makefile.in @@ -221,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -229,6 +230,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -295,6 +297,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -344,6 +347,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/assembly/Makefile.in b/mono/tests/cas/assembly/Makefile.in index fafecc35e6..d59f56872b 100644 --- a/mono/tests/cas/assembly/Makefile.in +++ b/mono/tests/cas/assembly/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/demand/Makefile.in b/mono/tests/cas/demand/Makefile.in index 9849a49320..43e84860f4 100644 --- a/mono/tests/cas/demand/Makefile.in +++ b/mono/tests/cas/demand/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/inheritance/Makefile.in b/mono/tests/cas/inheritance/Makefile.in index d68a81d817..7458c9e876 100644 --- a/mono/tests/cas/inheritance/Makefile.in +++ b/mono/tests/cas/inheritance/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/linkdemand/Makefile.in b/mono/tests/cas/linkdemand/Makefile.in index 18cd52ac81..8c2b58c129 100644 --- a/mono/tests/cas/linkdemand/Makefile.in +++ b/mono/tests/cas/linkdemand/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/cas/threads/Makefile.in b/mono/tests/cas/threads/Makefile.in index 9a8890953d..fa9e7da93b 100644 --- a/mono/tests/cas/threads/Makefile.in +++ b/mono/tests/cas/threads/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/mono/tests/finalizer-exception.cs b/mono/tests/finalizer-exception.cs index 29489ad494..0e48d9081c 100644 --- a/mono/tests/finalizer-exception.cs +++ b/mono/tests/finalizer-exception.cs @@ -30,7 +30,9 @@ public class FinalizerException { Environment.Exit (0); }; - MakeException (1024); + var t = new Thread (delegate () { MakeException (1024); }); + t.Start (); + t.Join (); GC.Collect (); GC.WaitForPendingFinalizers (); diff --git a/mono/tests/finalizer-wait.cs b/mono/tests/finalizer-wait.cs index 9b9bf2dc3d..dde31cbc34 100644 --- a/mono/tests/finalizer-wait.cs +++ b/mono/tests/finalizer-wait.cs @@ -6,35 +6,25 @@ class P { static public int count = 0; ~P () { - T.finalized = true; - Thread.Sleep (1000); // Console.WriteLine ("finalizer done"); count++; } } class T { - - static public bool finalized = false; - - static void makeP () { - P p = new P (); - p = null; - } - static int Main () { - var t = new Thread (makeP); - t.Start (); - t.Join (); + for (int i = 0; i < 1000; ++i) { + var t = new Thread (() => { + P p = new P (); + }); + t.Start (); + t.Join (); - GC.Collect (); - while (!finalized) { - Thread.Sleep (100); + GC.Collect (); + GC.WaitForPendingFinalizers (); + if (P.count != i + 1) + return 1; } - GC.WaitForPendingFinalizers (); - - if (P.count == 0) - return 1; return 0; } } diff --git a/mono/tests/gc-descriptors/Makefile.am b/mono/tests/gc-descriptors/Makefile.am index 4daa22ba80..54eca51ef5 100755 --- a/mono/tests/gc-descriptors/Makefile.am +++ b/mono/tests/gc-descriptors/Makefile.am @@ -10,7 +10,7 @@ descriptor-tests.exe : descriptor-tests.cs $(MCS) -Warn:0 descriptor-tests.cs descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py - -cp $^ . + if [ "$(srcdir)" != "$(builddir)" ]; then cp $^ .; fi $(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py diff --git a/mono/tests/gc-descriptors/Makefile.in b/mono/tests/gc-descriptors/Makefile.in index 477a6d1e92..3e17ebda3b 100644 --- a/mono/tests/gc-descriptors/Makefile.in +++ b/mono/tests/gc-descriptors/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -522,7 +526,7 @@ descriptor-tests.exe : descriptor-tests.cs $(MCS) -Warn:0 descriptor-tests.cs descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py - -cp $^ . + if [ "$(srcdir)" != "$(builddir)" ]; then cp $^ .; fi $(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs .DELETE_ON_ERROR: diff --git a/mono/tests/gc-graystack-stress.cs b/mono/tests/gc-graystack-stress.cs new file mode 100644 index 0000000000..7d711d9a25 --- /dev/null +++ b/mono/tests/gc-graystack-stress.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; + +class Program { + + class Node { + Node child; + Node sibling; + + public Node (int depth) : this (depth, null) {} + + public Node (int depth, Node sibling) { + if (depth > 0) + this.child = new Node (depth - 1); + + this.sibling = sibling; + } + + public override String ToString () { + return String.Format ("Node[child={0},sibling={1}]", this.child, this.sibling); + } + } + + /** + * Usage : width [depth [collections]] + * - width : trigger the overflow + * - depth : modify the cost difference of the overflow + * - collections : # of collections to perform + */ + public static void Main (String[] args) { + int width = 125; + if (args.Length > 0) + width = Math.Max (width, Int32.Parse (args [0])); + + int depth = 10000; + if (args.Length > 1) + depth = Math.Max (depth, Int32.Parse (args [1])); + + int collections = 100; + if (args.Length > 2) + collections = Math.Max (collections, Int32.Parse (args [2])); + + Node sibling = null; + + for (int i = 0; i < width; i++) { + sibling = new Node(depth, sibling); + if (i > 0 && i % 10 == 0) + Console.Write ("+"); + } + + for (int i = 0; i < collections; i++) { + GC.Collect(); + if (i > 0 && i % 10 == 0) + Console.Write ("."); + } + Console.WriteLine (); + } +} diff --git a/mono/tests/marshal2.cs b/mono/tests/marshal2.cs index a4d02ab143..8a0d43f3a3 100644 --- a/mono/tests/marshal2.cs +++ b/mono/tests/marshal2.cs @@ -3,6 +3,7 @@ // using System; +using System.Text; using System.Runtime.InteropServices; public class Tests { @@ -37,6 +38,12 @@ public class Tests { [MarshalAs (UnmanagedType.ByValArray, SizeConst=2)] public char[] a2; } + [StructLayout (LayoutKind.Sequential, CharSet=CharSet.Ansi)] + public struct ByValTStrStruct { + [MarshalAs (UnmanagedType.ByValTStr, SizeConst=4)] public string s1; + public int i; + } + [StructLayout (LayoutKind.Sequential, CharSet=CharSet.Unicode)] public struct ByValWStrStruct { [MarshalAs (UnmanagedType.ByValTStr, SizeConst=4)] public string s1; @@ -184,6 +191,44 @@ public class Tests { public string Field3; } + public static int test_0_byvaltstr () { + ByValTStrStruct s = new ByValTStrStruct (); + + IntPtr p2 = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (ByValTStrStruct))); + Marshal.StructureToPtr(s, p2, false); + + /* Check that the ByValTStr is initialized correctly */ + for (int i = 0; i < 4; ++i) + if (Marshal.ReadByte (p2, i) != 0) + return 31; + + s.s1 = "ABCD"; + s.i = 55; + + Marshal.StructureToPtr(s, p2, false); + + ByValTStrStruct s2 = (ByValTStrStruct)Marshal.PtrToStructure (p2, typeof (ByValTStrStruct)); + + /* The fourth char is lost because of null-termination */ + if (s2.s1 != "ABC") + return 32; + + if (s2.i != 55) + return 33; + + // Check that decoding also respects the size, even when there is no null terminator + byte[] data = Encoding.ASCII.GetBytes ("ABCDXXXX"); + int size = Marshal.SizeOf (typeof (ByValTStrStruct)); + IntPtr buffer = Marshal.AllocHGlobal (size); + Marshal.Copy (data, 0, buffer, size); + + s2 = (ByValTStrStruct)Marshal.PtrToStructure (buffer, typeof (ByValTStrStruct)); + if (s2.s1 != "ABC") + return 34; + + return 0; + } + public static int test_0_byvaltstr_unicode () { ByValWStrStruct s = new ByValWStrStruct (); diff --git a/mono/tests/marshal7.cs b/mono/tests/marshal7.cs index 02cfbbd40a..640f4a04d7 100644 --- a/mono/tests/marshal7.cs +++ b/mono/tests/marshal7.cs @@ -218,9 +218,9 @@ public class Test if (Marshal.SizeOf (typeof (TestStruct10)) != 12) return 16; } else { - if (Marshal.SizeOf (typeof (TestStruct8)) != 16) + if (Marshal.SizeOf (typeof (TestStruct8)) != 16 && Marshal.SizeOf (typeof (TestStruct8)) != 12) return 14; - if (Marshal.SizeOf (typeof (TestStruct10)) != 16) + if (Marshal.SizeOf (typeof (TestStruct10)) != 16 && Marshal.SizeOf (typeof (TestStruct10)) != 12) return 16; } if (Marshal.SizeOf (typeof (TestStruct9)) != 12) diff --git a/mono/tests/stress-runner.pl b/mono/tests/stress-runner.pl index 0e193c307e..24d5b9db8d 100755 --- a/mono/tests/stress-runner.pl +++ b/mono/tests/stress-runner.pl @@ -65,6 +65,13 @@ my %tests = ( 'arg-knob' => 0, # loops 'ratio' => 20, }, + 'gc-graystack-stress' => { + 'program' => 'gc-graystack-stress.exe', + # width, depth, collections + 'args' => [125, 10000, 100], + 'arg-knob' => 2, # loops + 'ratio' => 10, + }, 'thread-stress' => { 'program' => 'thread-stress.exe', # loops diff --git a/mono/unit-tests/Makefile.am b/mono/unit-tests/Makefile.am index 70ba8ab3a5..e7f2ddb10b 100644 --- a/mono/unit-tests/Makefile.am +++ b/mono/unit-tests/Makefile.am @@ -11,6 +11,7 @@ endif if !CROSS_COMPILE if !HOST_WIN32 if SUPPORT_BOEHM +if !PLATFORM_LINUX test_sgen_qsort_SOURCES = test-sgen-qsort.c test_sgen_qsort_CFLAGS = $(TEST_CFLAGS) @@ -27,10 +28,16 @@ test_mono_linked_list_set_CFLAGS = $(TEST_CFLAGS) test_mono_linked_list_set_LDADD = $(TEST_LDADD) test_mono_linked_list_set_LDFLAGS = $(TEST_LDFLAGS) -noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set +test_conc_hashtable_SOURCES = test-conc-hashtable.c +test_conc_hashtable_CFLAGS = $(TEST_CFLAGS) +test_conc_hashtable_LDADD = $(TEST_LDADD) +test_conc_hashtable_LDFLAGS = $(TEST_LDFLAGS) -TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set +noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable +TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable + +endif !PLATFORM_LINUX endif SUPPORT_BOEHM endif !HOST_WIN32 endif !CROSS_COMPILE diff --git a/mono/unit-tests/Makefile.in b/mono/unit-tests/Makefile.in index 1ce1840d76..6adef1d595 100644 --- a/mono/unit-tests/Makefile.in +++ b/mono/unit-tests/Makefile.in @@ -79,12 +79,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@noinst_PROGRAMS = test-sgen-qsort$(EXEEXT) \ -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@ test-gc-memfuncs$(EXEEXT) \ -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@ test-mono-linked-list-set$(EXEEXT) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@TESTS = test-sgen-qsort$(EXEEXT) \ -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@ test-gc-memfuncs$(EXEEXT) \ -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@ test-mono-linked-list-set$(EXEEXT) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@noinst_PROGRAMS = test-sgen-qsort$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-gc-memfuncs$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-mono-linked-list-set$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-conc-hashtable$(EXEEXT) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@TESTS = test-sgen-qsort$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-gc-memfuncs$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-mono-linked-list-set$(EXEEXT) \ +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@ test-conc-hashtable$(EXEEXT) subdir = mono/unit-tests DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ @@ -105,37 +107,45 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) -am__test_gc_memfuncs_SOURCES_DIST = test-gc-memfuncs.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@am_test_gc_memfuncs_OBJECTS = test_gc_memfuncs-test-gc-memfuncs.$(OBJEXT) -test_gc_memfuncs_OBJECTS = $(am_test_gc_memfuncs_OBJECTS) +am__test_conc_hashtable_SOURCES_DIST = test-conc-hashtable.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@am_test_conc_hashtable_OBJECTS = test_conc_hashtable-test-conc-hashtable.$(OBJEXT) +test_conc_hashtable_OBJECTS = $(am_test_conc_hashtable_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = ../metadata/libmonoruntimesgen.la \ ../io-layer/libwapi.la ../utils/libmonoutils.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_DEPENDENCIES = $(am__DEPENDENCIES_2) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_conc_hashtable_DEPENDENCIES = $(am__DEPENDENCIES_2) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +test_conc_hashtable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(test_conc_hashtable_CFLAGS) $(CFLAGS) \ + $(test_conc_hashtable_LDFLAGS) $(LDFLAGS) -o $@ +am__test_gc_memfuncs_SOURCES_DIST = test-gc-memfuncs.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@am_test_gc_memfuncs_OBJECTS = test_gc_memfuncs-test-gc-memfuncs.$(OBJEXT) +test_gc_memfuncs_OBJECTS = $(am_test_gc_memfuncs_OBJECTS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_DEPENDENCIES = $(am__DEPENDENCIES_2) test_gc_memfuncs_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_gc_memfuncs_CFLAGS) $(CFLAGS) \ $(test_gc_memfuncs_LDFLAGS) $(LDFLAGS) -o $@ am__test_mono_linked_list_set_SOURCES_DIST = \ test-mono-linked-list-set.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@am_test_mono_linked_list_set_OBJECTS = test_mono_linked_list_set-test-mono-linked-list-set.$(OBJEXT) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@am_test_mono_linked_list_set_OBJECTS = test_mono_linked_list_set-test-mono-linked-list-set.$(OBJEXT) test_mono_linked_list_set_OBJECTS = \ $(am_test_mono_linked_list_set_OBJECTS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_DEPENDENCIES = $(am__DEPENDENCIES_2) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_DEPENDENCIES = $(am__DEPENDENCIES_2) test_mono_linked_list_set_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_mono_linked_list_set_CFLAGS) $(CFLAGS) \ $(test_mono_linked_list_set_LDFLAGS) $(LDFLAGS) -o $@ am__test_sgen_qsort_SOURCES_DIST = test-sgen-qsort.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@am_test_sgen_qsort_OBJECTS = test_sgen_qsort-test-sgen-qsort.$(OBJEXT) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@am_test_sgen_qsort_OBJECTS = test_sgen_qsort-test-sgen-qsort.$(OBJEXT) test_sgen_qsort_OBJECTS = $(am_test_sgen_qsort_OBJECTS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_DEPENDENCIES = $(am__DEPENDENCIES_2) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_DEPENDENCIES = $(am__DEPENDENCIES_2) test_sgen_qsort_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(test_sgen_qsort_CFLAGS) $(CFLAGS) $(test_sgen_qsort_LDFLAGS) \ @@ -170,10 +180,11 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(test_gc_memfuncs_SOURCES) \ +SOURCES = $(test_conc_hashtable_SOURCES) $(test_gc_memfuncs_SOURCES) \ $(test_mono_linked_list_set_SOURCES) \ $(test_sgen_qsort_SOURCES) -DIST_SOURCES = $(am__test_gc_memfuncs_SOURCES_DIST) \ +DIST_SOURCES = $(am__test_conc_hashtable_SOURCES_DIST) \ + $(am__test_gc_memfuncs_SOURCES_DIST) \ $(am__test_mono_linked_list_set_SOURCES_DIST) \ $(am__test_sgen_qsort_SOURCES_DIST) am__can_run_installinfo = \ @@ -449,6 +460,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -457,6 +469,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -523,6 +536,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -572,6 +586,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -611,18 +626,22 @@ TEST_LDADD = ../metadata/libmonoruntimesgen.la ../io-layer/libwapi.la ../utils/l $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV) @PLATFORM_DARWIN_TRUE@TEST_LDFLAGS = -framework CoreFoundation -framework Foundation -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_SOURCES = test-sgen-qsort.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_CFLAGS = $(TEST_CFLAGS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_LDADD = $(TEST_LDADD) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_LDFLAGS = $(TEST_LDFLAGS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_SOURCES = test-gc-memfuncs.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_CFLAGS = $(TEST_CFLAGS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_LDADD = $(TEST_LDADD) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_LDFLAGS = $(TEST_LDFLAGS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_SOURCES = test-mono-linked-list-set.c -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_CFLAGS = $(TEST_CFLAGS) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_LDADD = $(TEST_LDADD) -@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_LDFLAGS = $(TEST_LDFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_SOURCES = test-sgen-qsort.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_CFLAGS = $(TEST_CFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_LDADD = $(TEST_LDADD) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_sgen_qsort_LDFLAGS = $(TEST_LDFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_SOURCES = test-gc-memfuncs.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_CFLAGS = $(TEST_CFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_LDADD = $(TEST_LDADD) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_gc_memfuncs_LDFLAGS = $(TEST_LDFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_SOURCES = test-mono-linked-list-set.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_CFLAGS = $(TEST_CFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_LDADD = $(TEST_LDADD) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_mono_linked_list_set_LDFLAGS = $(TEST_LDFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_conc_hashtable_SOURCES = test-conc-hashtable.c +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_conc_hashtable_CFLAGS = $(TEST_CFLAGS) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_conc_hashtable_LDADD = $(TEST_LDADD) +@CROSS_COMPILE_FALSE@@HOST_WIN32_FALSE@@PLATFORM_LINUX_FALSE@@SUPPORT_BOEHM_TRUE@test_conc_hashtable_LDFLAGS = $(TEST_LDFLAGS) all: all-am .SUFFIXES: @@ -667,6 +686,10 @@ clean-noinstPROGRAMS: echo " rm -f" $$list; \ rm -f $$list +test-conc-hashtable$(EXEEXT): $(test_conc_hashtable_OBJECTS) $(test_conc_hashtable_DEPENDENCIES) $(EXTRA_test_conc_hashtable_DEPENDENCIES) + @rm -f test-conc-hashtable$(EXEEXT) + $(AM_V_CCLD)$(test_conc_hashtable_LINK) $(test_conc_hashtable_OBJECTS) $(test_conc_hashtable_LDADD) $(LIBS) + test-gc-memfuncs$(EXEEXT): $(test_gc_memfuncs_OBJECTS) $(test_gc_memfuncs_DEPENDENCIES) $(EXTRA_test_gc_memfuncs_DEPENDENCIES) @rm -f test-gc-memfuncs$(EXEEXT) $(AM_V_CCLD)$(test_gc_memfuncs_LINK) $(test_gc_memfuncs_OBJECTS) $(test_gc_memfuncs_LDADD) $(LIBS) @@ -685,6 +708,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_gc_memfuncs-test-gc-memfuncs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mono_linked_list_set-test-mono-linked-list-set.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sgen_qsort-test-sgen-qsort.Po@am__quote@ @@ -713,6 +737,20 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +test_conc_hashtable-test-conc-hashtable.o: test-conc-hashtable.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_conc_hashtable_CFLAGS) $(CFLAGS) -MT test_conc_hashtable-test-conc-hashtable.o -MD -MP -MF $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Tpo -c -o test_conc_hashtable-test-conc-hashtable.o `test -f 'test-conc-hashtable.c' || echo '$(srcdir)/'`test-conc-hashtable.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Tpo $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-conc-hashtable.c' object='test_conc_hashtable-test-conc-hashtable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_conc_hashtable_CFLAGS) $(CFLAGS) -c -o test_conc_hashtable-test-conc-hashtable.o `test -f 'test-conc-hashtable.c' || echo '$(srcdir)/'`test-conc-hashtable.c + +test_conc_hashtable-test-conc-hashtable.obj: test-conc-hashtable.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_conc_hashtable_CFLAGS) $(CFLAGS) -MT test_conc_hashtable-test-conc-hashtable.obj -MD -MP -MF $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Tpo -c -o test_conc_hashtable-test-conc-hashtable.obj `if test -f 'test-conc-hashtable.c'; then $(CYGPATH_W) 'test-conc-hashtable.c'; else $(CYGPATH_W) '$(srcdir)/test-conc-hashtable.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Tpo $(DEPDIR)/test_conc_hashtable-test-conc-hashtable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-conc-hashtable.c' object='test_conc_hashtable-test-conc-hashtable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_conc_hashtable_CFLAGS) $(CFLAGS) -c -o test_conc_hashtable-test-conc-hashtable.obj `if test -f 'test-conc-hashtable.c'; then $(CYGPATH_W) 'test-conc-hashtable.c'; else $(CYGPATH_W) '$(srcdir)/test-conc-hashtable.c'; fi` + test_gc_memfuncs-test-gc-memfuncs.o: test-gc-memfuncs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(test_gc_memfuncs_CFLAGS) $(CFLAGS) -MT test_gc_memfuncs-test-gc-memfuncs.o -MD -MP -MF $(DEPDIR)/test_gc_memfuncs-test-gc-memfuncs.Tpo -c -o test_gc_memfuncs-test-gc-memfuncs.o `test -f 'test-gc-memfuncs.c' || echo '$(srcdir)/'`test-gc-memfuncs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_gc_memfuncs-test-gc-memfuncs.Tpo $(DEPDIR)/test_gc_memfuncs-test-gc-memfuncs.Po @@ -975,6 +1013,13 @@ test-mono-linked-list-set.log: test-mono-linked-list-set$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +test-conc-hashtable.log: test-conc-hashtable$(EXEEXT) + @p='test-conc-hashtable$(EXEEXT)'; \ + b='test-conc-hashtable'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ diff --git a/mono/unit-tests/test-conc-hashtable.c b/mono/unit-tests/test-conc-hashtable.c new file mode 100644 index 0000000000..ed09d593b6 --- /dev/null +++ b/mono/unit-tests/test-conc-hashtable.c @@ -0,0 +1,324 @@ +/* + * test-conc-hashtable.c: Unit test for the concurrent hashtable. + * + * Copyright (C) 2014 Xamarin Inc + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License 2.0 as published by the Free Software Foundation; + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License 2.0 along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "config.h" + +#include "utils/mono-threads.h" +#include "utils/mono-conc-hashtable.h" + +#include +#include +#include +#include + +#include + +static int +single_writer_single_reader (void) +{ + mono_mutex_t mutex; + MonoConcurrentHashTable *h; + int res = 0; + + mono_mutex_init (&mutex); + h = mono_conc_hashtable_new (&mutex, NULL, NULL); + mono_conc_hashtable_insert (h, GUINT_TO_POINTER (10), GUINT_TO_POINTER (20)); + mono_conc_hashtable_insert (h, GUINT_TO_POINTER (30), GUINT_TO_POINTER (40)); + mono_conc_hashtable_insert (h, GUINT_TO_POINTER (50), GUINT_TO_POINTER (60)); + mono_conc_hashtable_insert (h, GUINT_TO_POINTER (2), GUINT_TO_POINTER (3)); + + if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (30)) != GUINT_TO_POINTER (40)) + res = 1; + if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (10)) != GUINT_TO_POINTER (20)) + res = 2; + if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (2)) != GUINT_TO_POINTER (3)) + res = 3; + if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (50)) != GUINT_TO_POINTER (60)) + res = 4; + + mono_conc_hashtable_destroy (h); + mono_mutex_destroy (&mutex); + if (res) + printf ("SERIAL TEST FAILED %d\n", res); + return res; +} + +static MonoConcurrentHashTable *hash; + +static void* +pw_sr_thread (void *arg) +{ + int i, idx = 1000 * GPOINTER_TO_INT (arg); + mono_thread_info_attach ((gpointer)&arg); + + for (i = 0; i < 1000; ++i) + mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + idx), GINT_TO_POINTER (i + 1)); + return NULL; +} + +static int +parallel_writer_single_reader (void) +{ + pthread_t a,b,c; + mono_mutex_t mutex; + int i, j, res = 0; + + mono_mutex_init (&mutex); + hash = mono_conc_hashtable_new (&mutex, NULL, NULL); + + pthread_create (&a, NULL, pw_sr_thread, GINT_TO_POINTER (1)); + pthread_create (&b, NULL, pw_sr_thread, GINT_TO_POINTER (2)); + pthread_create (&c, NULL, pw_sr_thread, GINT_TO_POINTER (3)); + + pthread_join (a, NULL); + pthread_join (b, NULL); + pthread_join (c, NULL); + + for (i = 0; i < 1000; ++i) { + for (j = 1; j < 4; ++j) { + if (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (j * 1000 + i)) != GINT_TO_POINTER (i + 1)) { + res = j + 1; + goto done; + } + } + } + +done: + mono_conc_hashtable_destroy (hash); + mono_mutex_destroy (&mutex); + if (res) + printf ("PAR_WRITER_SINGLE_READER TEST FAILED %d\n", res); + return res; +} + + +static void* +pr_sw_thread (void *arg) +{ + int i = 0, idx = 100 * GPOINTER_TO_INT (arg); + mono_thread_info_attach ((gpointer)&arg); + + while (i < 100) { + gpointer res = mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (i + idx + 1)); + if (!res) + continue; + if (res != GINT_TO_POINTER ((i + idx) * 2 + 1)) + return GINT_TO_POINTER (i); + ++i; + } + return NULL; +} + +static int +single_writer_parallel_reader (void) +{ + pthread_t a,b,c; + mono_mutex_t mutex; + gpointer ra, rb, rc; + int i, res = 0; + ra = rb = rc = GINT_TO_POINTER (1); + + mono_mutex_init (&mutex); + hash = mono_conc_hashtable_new (&mutex, NULL, NULL); + + pthread_create (&a, NULL, pr_sw_thread, GINT_TO_POINTER (0)); + pthread_create (&b, NULL, pr_sw_thread, GINT_TO_POINTER (1)); + pthread_create (&c, NULL, pr_sw_thread, GINT_TO_POINTER (2)); + + for (i = 0; i < 100; ++i) { + mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 0 + 1), GINT_TO_POINTER ((i + 0) * 2 + 1)); + mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 100 + 1), GINT_TO_POINTER ((i + 100) * 2 + 1)); + mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 200 + 1), GINT_TO_POINTER ((i + 200) * 2 + 1)); + } + + pthread_join (a, &ra); + pthread_join (b, &rb); + pthread_join (c, &rc); + res = GPOINTER_TO_INT (ra) + GPOINTER_TO_INT (rb) + GPOINTER_TO_INT (rc); + + mono_conc_hashtable_destroy (hash); + mono_mutex_destroy (&mutex); + if (res) + printf ("SINGLE_WRITER_PAR_READER TEST FAILED %d\n", res); + return res; +} + +int running = 1; + +static void* +pw_pr_r_thread (void *arg) +{ + int key, val, i; + mono_thread_info_attach ((gpointer)&arg); + + /* i will not be incremented as long as running is set to 1, this guarantee that + we loop over all the keys at least once after the writer threads have finished */ + for (i = 0; i < 2; i += 1 - running) { + for (key = 1; key < 3 * 1000 + 1; key++) { + val = GPOINTER_TO_INT (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (key))); + + if (!val) + continue; + if (key != val) + return GINT_TO_POINTER (key); + } + } + return NULL; +} + +static void* +pw_pr_w_add_thread (void *arg) +{ + int i, idx = 1000 * GPOINTER_TO_INT (arg); + + mono_thread_info_attach ((gpointer)&arg); + + for (i = idx; i < idx + 1000; i++) + mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 1), GINT_TO_POINTER (i + 1)); + return NULL; +} + +static void* +pw_pr_w_del_thread (void *arg) +{ + int i, idx = 1000 * GPOINTER_TO_INT (arg); + + mono_thread_info_attach ((gpointer)&arg); + + for (i = idx; i < idx + 1000; i++) + mono_conc_hashtable_remove (hash, GINT_TO_POINTER (i + 1)); + return NULL; +} + +static int +parallel_writer_parallel_reader (void) +{ + pthread_t wa, wb, wc, ra, rb, rc; + mono_mutex_t mutex; + gpointer a, b, c; + int res = 0, i; + + srand(time(NULL)); + + mono_mutex_init (&mutex); + hash = mono_conc_hashtable_new (&mutex, NULL, NULL); + + for (i = 0; i < 2; i++) { + running = 1; + + pthread_create (&ra, NULL, pw_pr_r_thread, NULL); + pthread_create (&rb, NULL, pw_pr_r_thread, NULL); + pthread_create (&rc, NULL, pw_pr_r_thread, NULL); + + switch (i) { + case 0: + pthread_create (&wa, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (0)); + pthread_create (&wb, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (1)); + pthread_create (&wc, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (2)); + break; + case 1: + pthread_create (&wa, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (0)); + pthread_create (&wb, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (1)); + pthread_create (&wc, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (2)); + break; + } + + pthread_join (wa, NULL); + pthread_join (wb, NULL); + pthread_join (wc, NULL); + + running = 0; + + pthread_join (ra, &a); + pthread_join (rb, &b); + pthread_join (rc, &c); + + res += GPOINTER_TO_INT (a) + GPOINTER_TO_INT (b) + GPOINTER_TO_INT (c); + } + + if (res) + printf ("PAR_WRITER_PAR_READER TEST FAILED %d %d %d\n", GPOINTER_TO_INT (a), GPOINTER_TO_INT (b), GPOINTER_TO_INT (c)); + + mono_conc_hashtable_destroy (hash); + mono_mutex_destroy (&mutex); + + return res; +} + +static void +benchmark_conc (void) +{ + mono_mutex_t mutex; + MonoConcurrentHashTable *h; + int i, j; + + mono_mutex_init (&mutex); + h = mono_conc_hashtable_new (&mutex, NULL, NULL); + + for (i = 1; i < 10 * 1000; ++i) + mono_conc_hashtable_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i)); + + + for (j = 0; j < 100000; ++j) + for (i = 1; i < 10 * 105; ++i) + mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (i)); + + mono_conc_hashtable_destroy (h); + mono_mutex_destroy (&mutex); + +} + +static void +benchmark_glib (void) +{ + GHashTable *h; + int i, j; + + h = g_hash_table_new (NULL, NULL); + + for (i = 1; i < 10 * 1000; ++i) + g_hash_table_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i)); + + + for (j = 0; j < 100000; ++j) + for (i = 1; i < 10 * 105; ++i) + g_hash_table_lookup (h, GUINT_TO_POINTER (i)); + + g_hash_table_destroy (h); +} + +int +main (void) +{ + MonoThreadInfoCallbacks cb = { NULL }; + int res = 0; + + mono_threads_init (&cb, sizeof (MonoThreadInfo)); + mono_thread_info_attach ((gpointer)&cb); + + // benchmark_conc (); + // benchmark_glib (); + + res += single_writer_single_reader (); + res += parallel_writer_single_reader (); + res += single_writer_parallel_reader (); + res += parallel_writer_parallel_reader (); + + return res; +} \ No newline at end of file diff --git a/mono/unit-tests/test-gc-memfuncs.c b/mono/unit-tests/test-gc-memfuncs.c index a8ccf8833c..37c6c26d14 100644 --- a/mono/unit-tests/test-gc-memfuncs.c +++ b/mono/unit-tests/test-gc-memfuncs.c @@ -59,7 +59,7 @@ main (void) memcpy (reference, random_mem, POOL_SIZE); memcpy (playground, random_mem, POOL_SIZE); - bzero (reference + START_OFFSET + offset, size); + memset (reference + START_OFFSET + offset, 0, size); mono_gc_bzero_atomic (playground + START_OFFSET + offset, size); assert (!memcmp (reference, playground, POOL_SIZE)); diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am index 881888fcce..801a177746 100644 --- a/mono/utils/Makefile.am +++ b/mono/utils/Makefile.am @@ -110,7 +110,9 @@ monoutils_sources = \ mono-hwcap.c \ bsearch.h \ bsearch.c \ - mono-signal-handler.h + mono-signal-handler.h \ + mono-conc-hashtable.h \ + mono-conc-hashtable.c arch_sources = diff --git a/mono/utils/Makefile.in b/mono/utils/Makefile.in index 49573ab3e4..1749d330e5 100644 --- a/mono/utils/Makefile.in +++ b/mono/utils/Makefile.in @@ -145,7 +145,8 @@ am__libmonoutils_la_SOURCES_DIST = mono-md5.c mono-sha1.c \ mono-threads-windows.c mono-threads.h mono-tls.h mono-tls.c \ linux_magic.h mono-memory-model.h atomic.h atomic.c \ mono-hwcap.h mono-hwcap.c bsearch.h bsearch.c \ - mono-signal-handler.h mach-support-x86.c mach-support-amd64.c \ + mono-signal-handler.h mono-conc-hashtable.h \ + mono-conc-hashtable.c mach-support-x86.c mach-support-amd64.c \ mach-support-arm.c mach-support-unknown.c mono-hwcap-x86.c \ mono-hwcap-x86.h mono-hwcap-arm.c mono-hwcap-arm.h \ mono-hwcap-arm64.c mono-hwcap-arm64.h mono-hwcap-mips.c \ @@ -165,7 +166,7 @@ am__objects_1 = mono-md5.lo mono-sha1.lo mono-logger.lo \ mono-linked-list-set.lo mono-threads.lo mono-threads-posix.lo \ mono-threads-mach.lo mono-threads-mach-helper.lo \ mono-threads-windows.lo mono-tls.lo atomic.lo mono-hwcap.lo \ - bsearch.lo + bsearch.lo mono-conc-hashtable.lo @CROSS_COMPILE_FALSE@@X86_TRUE@am__objects_2 = mach-support-x86.lo @AMD64_TRUE@@CROSS_COMPILE_FALSE@am__objects_3 = \ @AMD64_TRUE@@CROSS_COMPILE_FALSE@ mach-support-amd64.lo @@ -325,6 +326,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -333,6 +335,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -399,6 +402,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -448,6 +452,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -583,7 +588,9 @@ monoutils_sources = \ mono-hwcap.c \ bsearch.h \ bsearch.c \ - mono-signal-handler.h + mono-signal-handler.h \ + mono-conc-hashtable.h \ + mono-conc-hashtable.c arch_sources = $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ @@ -670,6 +677,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-support-x86.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach-support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-codeman.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-conc-hashtable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-counters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mono-dl.Plo@am__quote@ diff --git a/mono/utils/atomic.c b/mono/utils/atomic.c index 7cd884e61d..9ab8746f29 100755 --- a/mono/utils/atomic.c +++ b/mono/utils/atomic.c @@ -12,12 +12,13 @@ #include #include +#include #if defined (WAPI_NO_ATOMIC_ASM) || defined (BROKEN_64BIT_ATOMICS_INTRINSIC) #include -static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t spin G_GNUC_UNUSED = PTHREAD_MUTEX_INITIALIZER; #define NEED_64BIT_CMPXCHG_FALLBACK @@ -25,21 +26,12 @@ static pthread_mutex_t spin = PTHREAD_MUTEX_INITIALIZER; #ifdef WAPI_NO_ATOMIC_ASM -static mono_once_t spin_once=MONO_ONCE_INIT; - -static void spin_init(void) -{ - g_warning("Using non-atomic functions! Expect race conditions when using process-shared handles!"); -} - gint32 InterlockedCompareExchange(volatile gint32 *dest, gint32 exch, gint32 comp) { gint32 old; int ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); ret = pthread_mutex_lock(&spin); @@ -64,8 +56,6 @@ gpointer InterlockedCompareExchangePointer(volatile gpointer *dest, gpointer old; int ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); ret = pthread_mutex_lock(&spin); @@ -89,8 +79,6 @@ gint32 InterlockedAdd(volatile gint32 *dest, gint32 add) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -112,8 +100,6 @@ gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -135,8 +121,6 @@ gint32 InterlockedIncrement(volatile gint32 *dest) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -158,8 +142,6 @@ gint64 InterlockedIncrement64(volatile gint64 *dest) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -181,8 +163,6 @@ gint32 InterlockedDecrement(volatile gint32 *dest) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -204,8 +184,6 @@ gint64 InterlockedDecrement64(volatile gint64 *dest) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -227,8 +205,6 @@ gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -250,8 +226,6 @@ gint64 InterlockedExchange64(volatile gint64 *dest, gint64 exch) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -273,8 +247,6 @@ gpointer InterlockedExchangePointer(volatile gpointer *dest, gpointer exch) gpointer ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -296,8 +268,6 @@ gint32 InterlockedExchangeAdd(volatile gint32 *dest, gint32 add) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -319,8 +289,6 @@ gint64 InterlockedExchangeAdd64(volatile gint64 *dest, gint64 add) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -342,8 +310,6 @@ gint8 InterlockedRead8(volatile gint8 *src) gint8 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -364,8 +330,6 @@ gint16 InterlockedRead16(volatile gint16 *src) gint16 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -386,8 +350,6 @@ gint32 InterlockedRead(volatile gint32 *src) gint32 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -408,8 +370,6 @@ gint64 InterlockedRead64(volatile gint64 *src) gint64 ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -430,8 +390,6 @@ gpointer InterlockedReadPointer(volatile gpointer *src) gpointer ret; int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -451,8 +409,6 @@ void InterlockedWrite(volatile gint8 *dst, gint8 val) { int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -470,8 +426,6 @@ void InterlockedWrite16(volatile gint16 *dst, gint16 val) { int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -489,8 +443,6 @@ void InterlockedWrite(volatile gint32 *dst, gint32 val) { int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -508,8 +460,6 @@ void InterlockedWrite64(volatile gint64 *dst, gint64 val) { int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -527,8 +477,6 @@ void InterlockedWritePointer(volatile gpointer *dst, gpointer val) { int thr_ret; - mono_once(&spin_once, spin_init); - pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, (void *)&spin); thr_ret = pthread_mutex_lock(&spin); @@ -568,15 +516,24 @@ gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp) { gint64 old; + int ret; + + pthread_cleanup_push ((void(*)(void *))pthread_mutex_unlock, + (void *)&spin); + ret = pthread_mutex_lock(&spin); + g_assert (ret == 0); + + old= *dest; + if(old==comp) { + *dest=exch; + } + + ret = pthread_mutex_unlock(&spin); + g_assert (ret == 0); + + pthread_cleanup_pop (0); - pthread_mutex_lock (&spin); - - old = *dest; - if(old == comp) - *dest = exch; - - pthread_mutex_unlock (&spin); - return old; + return(old); } #endif diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h index c1a1a94b47..306800cfe1 100755 --- a/mono/utils/atomic.h +++ b/mono/utils/atomic.h @@ -108,13 +108,19 @@ static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add) #endif #endif +#ifdef HOST_WIN32 +#define TO_INTERLOCKED_ARGP(ptr) ((volatile LONG*)(ptr)) +#else +#define TO_INTERLOCKED_ARGP(ptr) (ptr) +#endif + /* And now for some dirty hacks... The Windows API doesn't * provide any useful primitives for this (other than getting * into architecture-specific madness), so use CAS. */ static inline gint32 InterlockedRead(volatile gint32 *src) { - return InterlockedCompareExchange (src, 0, 0); + return InterlockedCompareExchange (TO_INTERLOCKED_ARGP (src), 0, 0); } static inline gint64 InterlockedRead64(volatile gint64 *src) @@ -129,7 +135,7 @@ static inline gpointer InterlockedReadPointer(volatile gpointer *src) static inline void InterlockedWrite(volatile gint32 *dst, gint32 val) { - InterlockedExchange (dst, val); + InterlockedExchange (TO_INTERLOCKED_ARGP (dst), val); } static inline void InterlockedWrite64(volatile gint64 *dst, gint64 val) diff --git a/mono/utils/lock-free-alloc.c b/mono/utils/lock-free-alloc.c index 1e5cad6498..4befb3b86a 100644 --- a/mono/utils/lock-free-alloc.c +++ b/mono/utils/lock-free-alloc.c @@ -127,7 +127,7 @@ struct _MonoLockFreeAllocDescriptor { #define SB_HEADER_SIZE 16 #define SB_USABLE_SIZE (SB_SIZE - SB_HEADER_SIZE) -#define SB_HEADER_FOR_ADDR(a) ((gpointer)((gulong)(a) & ~(gulong)(SB_SIZE-1))) +#define SB_HEADER_FOR_ADDR(a) ((gpointer)((size_t)(a) & ~(size_t)(SB_SIZE-1))) #define DESCRIPTOR_FOR_ADDR(a) (*(Descriptor**)SB_HEADER_FOR_ADDR (a)) /* Taken from SGen */ diff --git a/mono/utils/mono-codeman.c b/mono/utils/mono-codeman.c index abdcda6997..c8f7468253 100644 --- a/mono/utils/mono-codeman.c +++ b/mono/utils/mono-codeman.c @@ -28,9 +28,9 @@ #endif static uintptr_t code_memory_used = 0; -static gulong dynamic_code_alloc_count; -static gulong dynamic_code_bytes_count; -static gulong dynamic_code_frees_count; +static size_t dynamic_code_alloc_count; +static size_t dynamic_code_bytes_count; +static size_t dynamic_code_frees_count; /* * AMD64 processors maintain icache coherency only for pages which are diff --git a/mono/utils/mono-compiler.h b/mono/utils/mono-compiler.h index 22623d074f..c1d0e27a49 100644 --- a/mono/utils/mono-compiler.h +++ b/mono/utils/mono-compiler.h @@ -214,6 +214,9 @@ #define __func__ __FUNCTION__ +#include +typedef SSIZE_T ssize_t; + #endif /* _MSC_VER */ #if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN diff --git a/mono/utils/mono-conc-hashtable.c b/mono/utils/mono-conc-hashtable.c new file mode 100644 index 0000000000..7c4637f81c --- /dev/null +++ b/mono/utils/mono-conc-hashtable.c @@ -0,0 +1,371 @@ +/* + * mono-conc-hashtable.h: A mostly concurrent hashtable + * + * Author: + * Rodrigo Kumpera (kumpera@gmail.com) + * + * (C) 2014 Xamarin + */ + +#include "mono-conc-hashtable.h" +#include + +/* Configuration knobs. */ + +#define INITIAL_SIZE 32 +#define LOAD_FACTOR 0.75f +#define TOMBSTONE ((gpointer)(ssize_t)-1) + +typedef struct { + gpointer key; + gpointer value; +} key_value_pair; + +typedef struct { + int table_size; + key_value_pair *kvs; +} conc_table; + +struct _MonoConcurrentHashTable { + volatile conc_table *table; /* goes to HP0 */ + GHashFunc hash_func; + GEqualFunc equal_func; + mono_mutex_t *mutex; + int element_count; + int overflow_count; + GDestroyNotify key_destroy_func; + GDestroyNotify value_destroy_func; +}; + +static conc_table* +conc_table_new (int size) +{ + conc_table *res = g_new (conc_table, 1); + res->table_size = size; + res->kvs = g_new0 (key_value_pair, size); + return res; +} + +static void +conc_table_free (gpointer ptr) +{ + conc_table *table = ptr; + g_free (table->kvs); + g_free (table); +} + +static void +conc_table_lf_free (conc_table *table) +{ + mono_thread_hazardous_free_or_queue (table, conc_table_free, TRUE, FALSE); +} + + +/* +A common problem with power of two hashtables is that it leads of bad clustering when dealing +with aligned numbers. + +The solution here is to mix the bits from two primes plus the hash itself, it produces a better spread +than just the numbers. +*/ + +static MONO_ALWAYS_INLINE int +mix_hash (int hash) +{ + return ((hash * 215497) >> 16) ^ (hash * 1823231) + hash; +} + +static MONO_ALWAYS_INLINE void +insert_one_local (conc_table *table, GHashFunc hash_func, gpointer key, gpointer value) +{ + key_value_pair *kvs = table->kvs; + int table_mask = table->table_size - 1; + int hash = mix_hash (hash_func (key)); + int i = hash & table_mask; + + while (table->kvs [i].key) + i = (i + 1) & table_mask; + + kvs [i].key = key; + kvs [i].value = value; +} + +/* LOCKING: Must be called holding hash_table->mutex */ +static void +expand_table (MonoConcurrentHashTable *hash_table) +{ + conc_table *old_table = (conc_table*)hash_table->table; + conc_table *new_table = conc_table_new (old_table->table_size * 2); + key_value_pair *kvs = old_table->kvs; + int i; + + for (i = 0; i < old_table->table_size; ++i) { + if (kvs [i].key && kvs [i].key != TOMBSTONE) + insert_one_local (new_table, hash_table->hash_func, kvs [i].key, kvs [i].value); + } + mono_memory_barrier (); + hash_table->table = new_table; + hash_table->overflow_count = (int)(new_table->table_size * LOAD_FACTOR); + conc_table_lf_free (old_table); +} + + +MonoConcurrentHashTable* +mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func) +{ + MonoConcurrentHashTable *res = g_new0 (MonoConcurrentHashTable, 1); + res->mutex = mutex; + res->hash_func = hash_func ? hash_func : g_direct_hash; + res->equal_func = key_equal_func; + // res->equal_func = g_direct_equal; + res->table = conc_table_new (INITIAL_SIZE); + res->element_count = 0; + res->overflow_count = (int)(INITIAL_SIZE * LOAD_FACTOR); + return res; +} + +MonoConcurrentHashTable* +mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) +{ + MonoConcurrentHashTable *res = mono_conc_hashtable_new (mutex, hash_func, key_equal_func); + res->key_destroy_func = key_destroy_func; + res->value_destroy_func = value_destroy_func; + return res; +} + + +void +mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table) +{ + if (hash_table->key_destroy_func || hash_table->value_destroy_func) { + int i; + conc_table *table = (conc_table*)hash_table->table; + key_value_pair *kvs = table->kvs; + + for (i = 0; i < table->table_size; ++i) { + if (kvs [i].key && kvs [i].key != TOMBSTONE) { + if (hash_table->key_destroy_func) + (hash_table->key_destroy_func) (kvs [i].key); + if (hash_table->value_destroy_func) + (hash_table->value_destroy_func) (kvs [i].value); + } + } + } + conc_table_free ((gpointer)hash_table->table); + g_free (hash_table); +} + +gpointer +mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key) +{ + MonoThreadHazardPointers* hp; + conc_table *table; + int hash, i, table_mask; + key_value_pair *kvs; + hash = mix_hash (hash_table->hash_func (key)); + hp = mono_hazard_pointer_get (); + +retry: + table = get_hazardous_pointer ((gpointer volatile*)&hash_table->table, hp, 0); + table_mask = table->table_size - 1; + kvs = table->kvs; + i = hash & table_mask; + + if (G_LIKELY (!hash_table->equal_func)) { + while (kvs [i].key) { + if (key == kvs [i].key) { + gpointer value; + /* The read of keys must happen before the read of values */ + mono_memory_barrier (); + value = kvs [i].value; + /* FIXME check for NULL if we add suppport for removal */ + mono_hazard_pointer_clear (hp, 0); + return value; + } + i = (i + 1) & table_mask; + } + } else { + GEqualFunc equal = hash_table->equal_func; + + while (kvs [i].key) { + if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) { + gpointer value; + /* The read of keys must happen before the read of values */ + mono_memory_barrier (); + value = kvs [i].value; + + /* We just read a value been deleted, try again. */ + if (G_UNLIKELY (!value)) + goto retry; + + mono_hazard_pointer_clear (hp, 0); + return value; + } + i = (i + 1) & table_mask; + } + } + + /* The table might have expanded and the value is now on the newer table */ + mono_memory_barrier (); + if (hash_table->table != table) + goto retry; + + mono_hazard_pointer_clear (hp, 0); + return NULL; +} + +/** + * mono_conc_hashtable_remove + * + * @Returns the old value if key is already present or null + */ +gpointer +mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key) +{ + conc_table *table; + key_value_pair *kvs; + int hash, i, table_mask; + + g_assert (key != NULL && key != TOMBSTONE); + + hash = mix_hash (hash_table->hash_func (key)); + mono_mutex_lock (hash_table->mutex); + + table = (conc_table*)hash_table->table; + kvs = table->kvs; + table_mask = table->table_size - 1; + i = hash & table_mask; + + if (!hash_table->equal_func) { + for (;;) { + if (!kvs [i].key) { + mono_mutex_unlock (hash_table->mutex); + return NULL; /*key not found*/ + } + + if (key == kvs [i].key) { + gpointer value = kvs [i].value; + kvs [i].value = NULL; + mono_memory_barrier (); + kvs [i].key = TOMBSTONE; + + mono_mutex_unlock (hash_table->mutex); + if (hash_table->key_destroy_func != NULL) + (*hash_table->key_destroy_func) (key); + if (hash_table->value_destroy_func != NULL) + (*hash_table->value_destroy_func) (value); + + return value; + } + i = (i + 1) & table_mask; + } + } else { + GEqualFunc equal = hash_table->equal_func; + for (;;) { + if (!kvs [i].key) { + mono_mutex_unlock (hash_table->mutex); + return NULL; /*key not found*/ + } + + if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) { + gpointer old_key = kvs [i].key; + gpointer value = kvs [i].value; + kvs [i].value = NULL; + mono_memory_barrier (); + kvs [i].key = TOMBSTONE; + + mono_mutex_unlock (hash_table->mutex); + if (hash_table->key_destroy_func != NULL) + (*hash_table->key_destroy_func) (old_key); + if (hash_table->value_destroy_func != NULL) + (*hash_table->value_destroy_func) (value); + return value; + } + + i = (i + 1) & table_mask; + } + } +} +/** + * mono_conc_hashtable_insert + * + * @Returns the old value if key is already present or null + */ +gpointer +mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value) +{ + conc_table *table; + key_value_pair *kvs; + int hash, i, table_mask; + + g_assert (key != NULL && key != TOMBSTONE); + g_assert (value != NULL); + + hash = mix_hash (hash_table->hash_func (key)); + mono_mutex_lock (hash_table->mutex); + + if (hash_table->element_count >= hash_table->overflow_count) + expand_table (hash_table); + + table = (conc_table*)hash_table->table; + kvs = table->kvs; + table_mask = table->table_size - 1; + i = hash & table_mask; + + if (!hash_table->equal_func) { + for (;;) { + if (!kvs [i].key || kvs [i].key == TOMBSTONE) { + kvs [i].value = value; + /* The write to values must happen after the write to keys */ + mono_memory_barrier (); + kvs [i].key = key; + ++hash_table->element_count; + mono_mutex_unlock (hash_table->mutex); + return NULL; + } + if (key == kvs [i].key) { + gpointer value = kvs [i].value; + mono_mutex_unlock (hash_table->mutex); + return value; + } + i = (i + 1) & table_mask; + } + } else { + GEqualFunc equal = hash_table->equal_func; + for (;;) { + if (!kvs [i].key || kvs [i].key == TOMBSTONE) { + kvs [i].value = value; + /* The write to values must happen after the write to keys */ + mono_memory_barrier (); + kvs [i].key = key; + ++hash_table->element_count; + mono_mutex_unlock (hash_table->mutex); + return NULL; + } + if (equal (key, kvs [i].key)) { + gpointer value = kvs [i].value; + mono_mutex_unlock (hash_table->mutex); + return value; + } + i = (i + 1) & table_mask; + } + } +} + + + + + + + + + + + + + + + + + + diff --git a/mono/utils/mono-conc-hashtable.h b/mono/utils/mono-conc-hashtable.h new file mode 100644 index 0000000000..65792bc54c --- /dev/null +++ b/mono/utils/mono-conc-hashtable.h @@ -0,0 +1,27 @@ +/* + * mono-conc-hashtable.h: A mostly concurrent hashtable + * + * Author: + * Rodrigo Kumpera (kumpera@gmail.com) + * + * (C) 2014 Xamarin + */ + +#ifndef __MONO_CONCURRENT_HASHTABLE_H__ +#define __MONO_CONCURRENT_HASHTABLE_H__ + +#include +#include +#include + +typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable; + +MonoConcurrentHashTable* mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func) MONO_INTERNAL; +MonoConcurrentHashTable* mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) MONO_INTERNAL; +void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table) MONO_INTERNAL; +gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL; +gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value) MONO_INTERNAL; +gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL; + +#endif + diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h index 258199018b..11254802fc 100755 --- a/mono/utils/mono-context.h +++ b/mono/utils/mono-context.h @@ -180,7 +180,12 @@ typedef struct { #define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->rbp)) #define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->rsp)) -#if defined(__native_client__) +#if defined (HOST_WIN32) && !defined(__GNUC__) +/* msvc doesn't support inline assembly, so have to use a separate .asm file */ +extern void mono_context_get_current (void *); +#define MONO_CONTEXT_GET_CURRENT(ctx) do { mono_context_get_current((void*)&(ctx)); } while (0) + +#elif defined(__native_client__) #define MONO_CONTEXT_GET_CURRENT(ctx) \ __asm__ __volatile__( \ "movq $0x0, %%nacl:0x00(%%r15, %0, 1)\n" \ diff --git a/mono/utils/mono-counters.c b/mono/utils/mono-counters.c index 2f642bb3ec..8ab20140cd 100644 --- a/mono/utils/mono-counters.c +++ b/mono/utils/mono-counters.c @@ -250,10 +250,10 @@ dump_counter (MonoCounter *counter, FILE *outfile) { if ((counter->type & MONO_COUNTER_UNIT_MASK) == MONO_COUNTER_TIME) fprintf (outfile, ENTRY_FMT "%.2f ms\n", counter->name, (double)(*(gint64*)buffer) / 10000.0); else - fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, *(gint64*)buffer); + fprintf (outfile, ENTRY_FMT "%lld\n", counter->name, *(long long *)buffer); break; case MONO_COUNTER_ULONG: - fprintf (outfile, ENTRY_FMT "%llu\n", counter->name, *(guint64*)buffer); + fprintf (outfile, ENTRY_FMT "%llu\n", counter->name, *(unsigned long long *)buffer); break; case MONO_COUNTER_WORD: fprintf (outfile, ENTRY_FMT "%zd\n", counter->name, *(gssize*)buffer); diff --git a/mono/utils/mono-error.h b/mono/utils/mono-error.h index 5652432adb..1da46d6f24 100644 --- a/mono/utils/mono-error.h +++ b/mono/utils/mono-error.h @@ -33,7 +33,7 @@ enum { }; /*Keep in sync with MonoErrorInternal*/ -typedef struct { +typedef struct _MonoError { unsigned short error_code; unsigned short hidden_0; /*DON'T TOUCH */ diff --git a/mono/utils/mono-hwcap-s390x.c b/mono/utils/mono-hwcap-s390x.c index d2f2bc5a4a..d5c9d254c3 100644 --- a/mono/utils/mono-hwcap-s390x.c +++ b/mono/utils/mono-hwcap-s390x.c @@ -19,48 +19,21 @@ */ #include "mono/utils/mono-hwcap-s390x.h" - #include -gboolean mono_hwcap_s390x_has_ld = FALSE; - -static void -catch_sigill (int sig_no, siginfo_t *info, gpointer act) -{ - mono_hwcap_s390x_has_ld = FALSE; -} +facilityList_t facs; void mono_hwcap_arch_init (void) { - mono_hwcap_s390x_has_ld = TRUE; + int lFacs = sizeof(facs) / 8; - struct sigaction sa, *old_sa; - - /* Determine if we have a long displacement facility - * by executing the STY instruction. If it fails, we - * catch the SIGILL and assume the answer is no. - */ - sa.sa_sigaction = catch_sigill; - sigemptyset (&sa.sa_mask); - sa.sa_flags = SA_SIGINFO; - - sigaction (SIGILL, &sa, old_sa); - - __asm__ __volatile__ ( - "LGHI\t0,1\n\t" - "LA\t1,%0\n\t" - ".byte\t0xe3,0x00,0x10,0x00,0x00,0x50\n\t" - : "=m" (mono_hwcap_s390x_has_ld) - : - : "0", "1" - ); - - sigaction (SIGILL, old_sa, NULL); + __asm__ (" lgfr 0,%1\n" + " .insn s,0xb2b00000,%0\n" + : "=m" (facs) : "r" (lFacs) : "0", "cc"); } void mono_hwcap_print (FILE *f) { - g_fprintf (f, "mono_hwcap_s390x_has_ld = %i\n", mono_hwcap_s390x_has_ld); } diff --git a/mono/utils/mono-hwcap-s390x.h b/mono/utils/mono-hwcap-s390x.h index 24c76a2854..313aca8bcb 100644 --- a/mono/utils/mono-hwcap-s390x.h +++ b/mono/utils/mono-hwcap-s390x.h @@ -3,6 +3,84 @@ #include "mono/utils/mono-hwcap.h" -extern gboolean mono_hwcap_s390x_has_ld; +typedef struct +{ + char n3:1; // N3 instructions present + char zArch:1; // z/Architecture mode installed + char zAct:1; // z/Architecture mode active + char date:1; // DAT enhancement facility + char idte1:1; // IDTE present (PST) + char idte2:1; // IDTE present (REG) + char asnlx:1; // ASN and LX reuse facility + char stfle:1; // STFLE installed + char zDATe:1; // Enhanced DAT in z mode + char srstat:1; // Sense running status facility + char cSSKE:1; // Conditional SSKE facility + char topo:1; // Configuration topology facility + char rv1:1; // Reserved + char xTrans2:1; // Extended translation facility 2 + char msgSec:1; // Message security facility + char longDsp:1; // Long displacement facility + char hiPerfLD:1; // High performance long displacement facility + char hfpMAS:1; // HFP multiply-and-add/subtrace facility + char xImm:1; // Extended immediate facility + char xTrans3:1; // Extended translation facility 3 + char hfpUnX:1; // HFP unnormalized extension facility + char etf2:1; // ETF2-enhancement facility + char stckf:1; // Store-clock-fast facility + char parse:1; // Parsing enhancement facility + char mvcos:1; // MVCOS facility + char todSteer:1; // TOD-clock steering facility + char etf3:1; // ETF3-enhancement facility + char xCPUtm:1; // Extract CPU time facility + char csst:1; // Compare-swap-and-store facility + char csst2:1; // Compare-swap-and-store facility 2 + char giX:1; // General instructions extension facility + char exX:1; // Execute extensions facility + char em:1; // Enhanced monitor + char rv2:1; // Reserved + char spp:1; // Set program parameters + char fps:1; // Floating point support enhancement + char dfp:1; // Decimal floating point facility + char hiDFP:1; // High Performance DFP facility + char pfpo:1; // PFPO instruction facility + char doclpkia:1; // DO/Fast BCR/CL/PK/IA + char rv3:1; // Reserved + char cmpsce:1; // CMPSC enhancement + char dfpzc:1; // DFP zoned-conversion + char eh:1; // Execution hint + char lt:1; // Load and trap + char mi:1; // Miscellaneous instruction enhancements + char pa:1; // Processor assist + char cx:1; // Constrained transactional execution + char ltlb:1; // Local TLB clearing + char ia2:1; // Interlocked access 2 + char rv4:1; // Reserved; + char rv5:1; // Reserved; + char rv6:1; // Reserved; + char rv7:1; // Reserved; + char rv8:1; // Reserved; + char rv9:1; // Reserved; + char rva:1; // Reserved; + char rvb:1; // Reserved; + char rvc:1; // Reserved; + char rvd:1; // Reserved; + char rve:1; // Reserved; + char rvf:1; // Reserved; + char rvg:1; // Reserved; + char rb:1; // RRB multiple + char cmc:1; // CPU measurement counter + char cms:1; // CPU measurement sampling + char rvh:4; // Reserved + char tx:1; // Transactional execution + char rvi:1; // Reserved + char axsi:1; // Access exception/store indication + char m3:1; // Message security extension 3 + char m4:1; // Message security extension 4 + char ed2:1; // Enhanced DAT 2 + int64_t end[0]; // End on a double word +} __attribute__((aligned(8))) facilityList_t; + +extern facilityList_t facs; #endif /* __MONO_UTILS_HWCAP_S390X_H__ */ diff --git a/mono/utils/mono-linked-list-set.c b/mono/utils/mono-linked-list-set.c index 3536d25d84..b7391962ea 100644 --- a/mono/utils/mono-linked-list-set.c +++ b/mono/utils/mono-linked-list-set.c @@ -188,7 +188,7 @@ mono_lls_remove (MonoLinkedListSet *list, MonoThreadHazardPointers *hp, MonoLink continue; /* The second CAS must happen before the first. */ mono_memory_write_barrier (); - if (InterlockedCompareExchangePointer ((volatile gpointer*)prev, next, cur) == cur) { + if (InterlockedCompareExchangePointer ((volatile gpointer*)prev, mono_lls_pointer_unmask (next), cur) == cur) { /* The CAS must happen before the hazard pointer clear. */ mono_memory_write_barrier (); mono_hazard_pointer_clear (hp, 1); diff --git a/mono/utils/mono-mmap.c b/mono/utils/mono-mmap.c index fe8a98079f..60ef156b15 100644 --- a/mono/utils/mono-mmap.c +++ b/mono/utils/mono-mmap.c @@ -65,8 +65,8 @@ malloc_shared_area (int pid) static char* aligned_address (char *mem, size_t size, size_t alignment) { - char *aligned = (char*)((gulong)(mem + (alignment - 1)) & ~(alignment - 1)); - g_assert (aligned >= mem && aligned + size <= mem + size + alignment && !((gulong)aligned & (alignment - 1))); + char *aligned = (char*)((size_t)(mem + (alignment - 1)) & ~(alignment - 1)); + g_assert (aligned >= mem && aligned + size <= mem + size + alignment && !((size_t)aligned & (alignment - 1))); return aligned; } @@ -308,13 +308,13 @@ mono_valloc (void *addr, size_t length, int flags) mflags |= MAP_PRIVATE; ptr = mmap (addr, length, prot, mflags, -1, 0); - if (ptr == (void*)-1) { + if (ptr == MAP_FAILED) { int fd = open ("/dev/zero", O_RDONLY); if (fd != -1) { ptr = mmap (addr, length, prot, mflags, fd, 0); close (fd); } - if (ptr == (void*)-1) + if (ptr == MAP_FAILED) return NULL; } return ptr; @@ -368,7 +368,7 @@ mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_hand mflags |= MAP_32BIT; ptr = mmap (0, length, prot, mflags, fd, offset); - if (ptr == (void*)-1) + if (ptr == MAP_FAILED) return NULL; *ret_handle = (void*)length; return ptr; @@ -483,6 +483,8 @@ mono_mprotect (void *addr, size_t length, int flags) } #endif // HAVE_MMAP +#if defined(HAVE_SHM_OPEN) && !defined (DISABLE_SHARED_PERFCOUNTERS) + static int use_shared_area; static gboolean @@ -497,8 +499,6 @@ shared_area_disabled (void) return use_shared_area == -1; } -#if defined(HAVE_SHM_OPEN) && !defined (DISABLE_SHARED_PERFCOUNTERS) - static int mono_shared_area_instances_slow (void **array, int count, gboolean cleanup) { diff --git a/mono/utils/mono-poll.h b/mono/utils/mono-poll.h index 835c36795a..bedef4c886 100644 --- a/mono/utils/mono-poll.h +++ b/mono/utils/mono-poll.h @@ -13,7 +13,11 @@ #endif #ifdef HAVE_POLL +#ifdef HAVE_POLL_H +#include +#elif defined(HAVE_SYS_POLL_H) #include +#endif #define MONO_POLLIN POLLIN #define MONO_POLLPRI POLLPRI diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c index 7971cb09cf..3f032f9d22 100644 --- a/mono/utils/mono-proclib.c +++ b/mono/utils/mono-proclib.c @@ -408,11 +408,17 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul struct task_basic_info t_info; mach_msg_type_number_t th_count = TASK_BASIC_INFO_COUNT; - if (task_for_pid (mach_task_self (), pid, &task) != KERN_SUCCESS) - RET_ERROR (MONO_PROCESS_ERROR_NOT_FOUND); + if (pid == getpid ()) { + /* task_for_pid () doesn't work on ios, even for the current process */ + task = mach_task_self (); + } else { + if (task_for_pid (mach_task_self (), pid, &task) != KERN_SUCCESS) + RET_ERROR (MONO_PROCESS_ERROR_NOT_FOUND); + } if (task_info (task, TASK_BASIC_INFO, (task_info_t)&t_info, &th_count) != KERN_SUCCESS) { - mach_port_deallocate (mach_task_self (), task); + if (pid != getpid ()) + mach_port_deallocate (mach_task_self (), task); RET_ERROR (MONO_PROCESS_ERROR_OTHER); } @@ -425,7 +431,8 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul else ret = 0; - mach_port_deallocate (mach_task_self (), task); + if (pid != getpid ()) + mach_port_deallocate (mach_task_self (), task); return ret; #else diff --git a/mono/utils/mono-threads-windows.c b/mono/utils/mono-threads-windows.c index 605ebf58a7..2ab2e6596e 100644 --- a/mono/utils/mono-threads-windows.c +++ b/mono/utils/mono-threads-windows.c @@ -40,19 +40,19 @@ mono_threads_core_needs_abort_syscall (void) void mono_threads_core_self_suspend (MonoThreadInfo *info) { - g_assert (0); + g_assert_not_reached (); } gboolean mono_threads_core_suspend (MonoThreadInfo *info) { - g_assert (0); + g_assert_not_reached (); } gboolean mono_threads_core_resume (MonoThreadInfo *info) { - g_assert (0); + g_assert_not_reached (); } void @@ -190,6 +190,7 @@ __readfsdword (unsigned long offset) void mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize) { + MEMORY_BASIC_INFORMATION meminfo; #ifdef TARGET_AMD64 /* win7 apis */ NT_TIB* tib = (NT_TIB*)NtCurrentTeb(); @@ -201,9 +202,17 @@ mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize) guint8 *stackTop = (guint8*)*(int*)((char*)tib + 4); guint8 *stackBottom = (guint8*)*(int*)((char*)tib + 8); #endif + /* + Windows stacks are expanded on demand, one page at time. The TIB reports + only the currently allocated amount. + VirtualQuery will return the actual limit for the bottom, which is what we want. + */ + if (VirtualQuery (&meminfo, &meminfo, sizeof (meminfo)) == sizeof (meminfo)) + stackBottom = MIN (stackBottom, (guint8*)meminfo.AllocationBase); *staddr = stackBottom; *stsize = stackTop - stackBottom; + } gboolean diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index dad8850711..0258e2aa28 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -38,7 +38,7 @@ when it is in fact not. */ static MonoSemType global_suspend_semaphore; -static int thread_info_size; +static size_t thread_info_size; static MonoThreadInfoCallbacks threads_callbacks; static MonoThreadInfoRuntimeCallbacks runtime_callbacks; static MonoNativeTlsKey thread_info_key, small_id_key; @@ -741,7 +741,7 @@ mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32 void mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize) { - return mono_threads_core_get_stack_bounds (staddr, stsize); + mono_threads_core_get_stack_bounds (staddr, stsize); } gboolean diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h index 457a268ad1..dbd25a8f77 100644 --- a/mono/utils/mono-threads.h +++ b/mono/utils/mono-threads.h @@ -28,7 +28,7 @@ typedef HANDLE MonoNativeThreadHandle; /* unused */ typedef DWORD mono_native_thread_return_t; #define MONO_NATIVE_THREAD_ID_TO_UINT(tid) (tid) -#define MONO_UINT_TO_NATIVE_THREAD_ID(tid) (tid) +#define MONO_UINT_TO_NATIVE_THREAD_ID(tid) ((MonoNativeThreadId)(tid)) #else diff --git a/msvc/Makefile.in b/msvc/Makefile.in index 5e25460252..fe798970f3 100644 --- a/msvc/Makefile.in +++ b/msvc/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/msvc/libmono.vcxproj b/msvc/libmono.vcxproj index 73d376b45b..26b243f2b6 100644 --- a/msvc/libmono.vcxproj +++ b/msvc/libmono.vcxproj @@ -414,9 +414,9 @@ false - libgc.lib;libmonoruntime.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies) + libgc.lib;libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies) $(Platform)\lib;%(AdditionalLibraryDirectories) - monosgen.def + monosgen64.def true $(Platform)\lib\$(TargetName).lib MachineX64 @@ -565,9 +565,9 @@ false - libgc.lib;libmonoruntime.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies) + libgc.lib;libmonoruntimesgen.lib;libmonoutils.lib;eglib.lib;%(AdditionalDependencies) $(Platform)\lib;%(AdditionalLibraryDirectories) - monosgen.def + monosgen64.def $(Platform)\lib\$(TargetName).lib MachineX64 true diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj index 2e012508f1..3635bdae2d 100644 --- a/msvc/libmonoruntime.vcxproj +++ b/msvc/libmonoruntime.vcxproj @@ -1,5 +1,5 @@  - + Debug_SGen @@ -103,7 +103,9 @@ + + @@ -112,6 +114,7 @@ + @@ -122,6 +125,7 @@ + @@ -379,7 +383,8 @@ Level3 Disabled WIN32;$(SGEN_DEFINES);_DEBUG;_LIB;%(PreprocessorDefinitions) - $(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE) + false + $(top_srcdir);$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE);$(top_srcdir)\mono Windows diff --git a/msvc/libmonoutils.vcxproj b/msvc/libmonoutils.vcxproj index b52f26a552..b760ab7697 100644 --- a/msvc/libmonoutils.vcxproj +++ b/msvc/libmonoutils.vcxproj @@ -128,6 +128,11 @@ + + + Document + + {8FC2B0C8-51AD-49DF-851F-5D01A77A75E4} Win32Proj @@ -160,6 +165,7 @@ + @@ -214,7 +220,7 @@ Level3 Disabled WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - $(top_srcdir);$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE) + $(top_srcdir);$(top_srcdir)/eglib/src;$(top_srcdir)/mono;$(LIBGC_CPPFLAGS_INCLUDE);$(GLIB_CFLAGS_INCLUDE) Windows @@ -223,6 +229,9 @@ winsetup.bat + + X64 + @@ -268,5 +277,6 @@ + \ No newline at end of file diff --git a/msvc/mono.def b/msvc/mono.def index 6a1f0d49d5..61d1779c33 100644 --- a/msvc/mono.def +++ b/msvc/mono.def @@ -243,6 +243,7 @@ mono_domain_has_type_resolve mono_domain_is_unloading mono_domain_owns_vtable_slot mono_domain_set +mono_domain_set_config mono_domain_set_internal mono_domain_try_type_resolve mono_domain_try_unload diff --git a/msvc/mono.props b/msvc/mono.props index b8f3c4fd16..7fe3206e24 100644 --- a/msvc/mono.props +++ b/msvc/mono.props @@ -1,9 +1,9 @@  - $(MSBuildProjectDirectory)/.. - $(top_srcdir)/libgc/include - $(top_srcdir)/eglib/src + $(MSBuildProjectDirectory)\.. + $(top_srcdir)\libgc\include + $(top_srcdir)\eglib\src HAVE_BOEHM_GC;HAVE_GC_H;USE_INCLUDED_LIBGC;HAVE_GC_GCJ_MALLOC;HAVE_GC_ENABLE HAVE_SGEN_GC;HAVE_MOVING_COLLECTOR;HAVE_WRITE_BARRIERS diff --git a/po/Makefile.in b/po/Makefile.in index de880720bd..fb439f9ea7 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -221,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -229,6 +230,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -295,6 +297,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -344,6 +347,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index e146fd3b67..7e8562c423 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po b/po/mcs/de.po index 1c011e2c12..a587f1309d 100644 --- a/po/mcs/de.po +++ b/po/mcs/de.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2014-08-12 18:27+0100\n" +"POT-Creation-Date: 2014-09-04 08:50+0100\n" "PO-Revision-Date: 2008-09-26 15:14+0100\n" "Last-Translator: Daniel Nauck \n" "Language-Team: http://www.mono-project.de\n" @@ -30,7 +30,7 @@ msgid "" "mismatch" msgstr "" -#: mcs/mcs/anonymous.cs:1054 mcs/mcs/ecore.cs:5492 +#: mcs/mcs/anonymous.cs:1054 mcs/mcs/ecore.cs:5515 #, csharp-format msgid "Delegate `{0}' does not take `{1}' arguments" msgstr "" @@ -71,23 +71,23 @@ msgid "" "context" msgstr "" -#: mcs/mcs/anonymous.cs:1363 +#: mcs/mcs/anonymous.cs:1378 #, csharp-format msgid "" "Local variable or parameter `{0}' cannot have their address taken and be " "used inside an anonymous method, lambda expression or query expression" msgstr "" -#: mcs/mcs/anonymous.cs:1383 +#: mcs/mcs/anonymous.cs:1398 #, fuzzy, csharp-format msgid "Cannot convert async {0} to delegate type `{1}'" msgstr "Kann Typ `{0}'<...> nicht finden" -#: mcs/mcs/anonymous.cs:1693 +#: mcs/mcs/anonymous.cs:1708 msgid "An expression tree cannot contain an anonymous method expression" msgstr "" -#: mcs/mcs/anonymous.cs:1995 +#: mcs/mcs/anonymous.cs:2023 #, csharp-format msgid "" "`{0}': An anonymous type cannot have multiple properties with the same name" @@ -102,20 +102,20 @@ msgstr "" msgid "An expression tree cannot contain named argument" msgstr "" -#: mcs/mcs/argument.cs:363 +#: mcs/mcs/argument.cs:373 #, csharp-format msgid "" "The method group `{0}' cannot be used as an argument of dynamic operation. " "Consider using parentheses to invoke the method" msgstr "" -#: mcs/mcs/argument.cs:367 +#: mcs/mcs/argument.cs:377 msgid "" "An anonymous method or lambda expression cannot be used as an argument of " "dynamic operation. Consider using a cast" msgstr "" -#: mcs/mcs/argument.cs:370 +#: mcs/mcs/argument.cs:380 #, csharp-format msgid "" "An expression of type `{0}' cannot be used as an argument of dynamic " @@ -126,59 +126,76 @@ msgstr "" msgid "An expression tree cannot contain an assignment operator" msgstr "" -#: mcs/mcs/assign.cs:779 +#: mcs/mcs/assign.cs:780 #, csharp-format msgid "Cannot assign to `{0}' because it is a `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:286 +#: mcs/mcs/assembly.cs:210 +msgid "" +"Executables cannot be satellite assemblies. Remove the attribute or keep it " +"empty" +msgstr "" + +#: mcs/mcs/assembly.cs:234 +#, csharp-format +msgid "" +"The specified version string `{0}' does not conform to the required format - " +"major[.minor[.build[.revision]]]" +msgstr "" + +#: mcs/mcs/assembly.cs:287 msgid "Invalid type specified as an argument for TypeForwardedTo attribute" msgstr "" -#: mcs/mcs/assembly.cs:294 +#: mcs/mcs/assembly.cs:295 #, csharp-format msgid "A duplicate type forward of type `{0}'" msgstr "" -#: mcs/mcs/assembly.cs:303 +#: mcs/mcs/assembly.cs:304 #, fuzzy, csharp-format msgid "Cannot forward type `{0}' because it is defined in this assembly" msgstr "" "NULL kann nicht in `{0}' konvertiert werden, da dies ein Werttyp ist, der " "nicht auf NULL festgelegt werden kann" -#: mcs/mcs/assembly.cs:309 +#: mcs/mcs/assembly.cs:310 #, fuzzy, csharp-format msgid "Cannot forward type `{0}' because it is a nested type" msgstr "" "NULL kann nicht in `{0}' konvertiert werden, da dies ein Werttyp ist, der " "nicht auf NULL festgelegt werden kann" -#: mcs/mcs/assembly.cs:338 +#: mcs/mcs/assembly.cs:327 +msgid "Friend assembly reference cannot have `null' value" +msgstr "" + +#: mcs/mcs/assembly.cs:344 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. InternalsVisibleTo declarations " "cannot have a version, culture or processor architecture specified" msgstr "" -#: mcs/mcs/assembly.cs:346 +#: mcs/mcs/assembly.cs:352 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. Strong named assemblies must " "specify a public key in their InternalsVisibleTo declarations" msgstr "" -#: mcs/mcs/assembly.cs:397 +#: mcs/mcs/assembly.cs:403 #, csharp-format msgid "Referenced assembly `{0}' does not have a strong name" msgstr "" -#: mcs/mcs/assembly.cs:403 +#: mcs/mcs/assembly.cs:409 #, csharp-format msgid "Referenced assembly `{0}' has different culture setting of `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:418 +#: mcs/mcs/assembly.cs:424 #, csharp-format msgid "" "Friend access was granted to `{0}', but the output assembly is named `{1}'. " @@ -186,156 +203,145 @@ msgid "" "it" msgstr "" -#: mcs/mcs/assembly.cs:432 +#: mcs/mcs/assembly.cs:438 msgid "" "Could not sign the assembly. ECMA key can only be used to delay-sign " "assemblies" msgstr "" -#: mcs/mcs/assembly.cs:686 +#: mcs/mcs/assembly.cs:692 msgid "" "Added modules must be marked with the CLSCompliant attribute to match the " "assembly" msgstr "" -#: mcs/mcs/assembly.cs:721 mcs/mcs/assembly.cs:736 +#: mcs/mcs/assembly.cs:727 mcs/mcs/assembly.cs:742 #, csharp-format msgid "" "Option `{0}' overrides attribute `{1}' given in a source file or added module" msgstr "" -#: mcs/mcs/assembly.cs:771 +#: mcs/mcs/assembly.cs:777 msgid "Delay signing was requested but no key file was given" msgstr "" -#: mcs/mcs/assembly.cs:792 +#: mcs/mcs/assembly.cs:798 msgid "Cannot link resource file when building a module" msgstr "" -#: mcs/mcs/assembly.cs:797 +#: mcs/mcs/assembly.cs:803 #, fuzzy, csharp-format msgid "Error reading resource file `{0}'" msgstr "Fehler beim erstellen der XML-Dokumentationsdatei `{0}' (`{1}')" -#: mcs/mcs/assembly.cs:867 +#: mcs/mcs/assembly.cs:873 msgid "Could not write to file `" msgstr "" -#: mcs/mcs/assembly.cs:911 +#: mcs/mcs/assembly.cs:917 msgid "Cannot specify -main if building a module or library" msgstr "" -#: mcs/mcs/assembly.cs:937 +#: mcs/mcs/assembly.cs:943 #, csharp-format msgid "Could not find `{0}' specified for Main method" msgstr "" -#: mcs/mcs/assembly.cs:943 +#: mcs/mcs/assembly.cs:949 #, fuzzy, csharp-format msgid "`{0}' specified for Main method must be a valid class or struct" msgstr "`{0}': Erweiterungsmethoden müssen statisch sein" -#: mcs/mcs/assembly.cs:947 +#: mcs/mcs/assembly.cs:953 #, csharp-format msgid "`{0}' does not have a suitable static Main method" msgstr "" -#: mcs/mcs/assembly.cs:950 +#: mcs/mcs/assembly.cs:956 #, csharp-format msgid "" "Program `{0}' does not contain a static `Main' method suitable for an entry " "point" msgstr "" -#: mcs/mcs/assembly.cs:969 +#: mcs/mcs/assembly.cs:975 msgid "Error during assembly signing. " msgstr "" -#: mcs/mcs/assembly.cs:1154 +#: mcs/mcs/assembly.cs:1160 #, csharp-format msgid "Metadata file `{0}' could not be found" msgstr "" -#: mcs/mcs/assembly.cs:1159 +#: mcs/mcs/assembly.cs:1165 #, csharp-format msgid "Metadata file `{0}' does not contain valid metadata" msgstr "" -#: mcs/mcs/assembly.cs:1165 +#: mcs/mcs/assembly.cs:1171 #, csharp-format msgid "" "Referenced assembly file `{0}' is a module. Consider using `-addmodule' " "option to add the module" msgstr "" -#: mcs/mcs/assembly.cs:1172 +#: mcs/mcs/assembly.cs:1178 #, csharp-format msgid "" "Added module file `{0}' is an assembly. Consider using `-r' option to " "reference the file" msgstr "" -#: mcs/mcs/async.cs:78 -msgid "The `await' operator cannot be used in the body of a finally clause" -msgstr "" - -#: mcs/mcs/async.cs:83 +#: mcs/mcs/async.cs:79 #, fuzzy msgid "The `await' operator cannot be used in the body of a lock statement" msgstr "" "Die `new()'-Einschränkung kann nicht mit der `struct'-Einschränkung genutzt " "werden" -#: mcs/mcs/async.cs:88 +#: mcs/mcs/async.cs:84 #, fuzzy msgid "The `await' operator cannot be used in an unsafe context" msgstr "" "Die `new()'-Einschränkung kann nicht mit der `struct'-Einschränkung genutzt " "werden" -#: mcs/mcs/async.cs:164 +#: mcs/mcs/async.cs:160 #, csharp-format msgid "" "Cannot await void method `{0}'. Consider changing method return type to " "`Task'" msgstr "" -#: mcs/mcs/async.cs:167 +#: mcs/mcs/async.cs:163 #, csharp-format msgid "Cannot await `{0}' expression" msgstr "" -#: mcs/mcs/async.cs:315 +#: mcs/mcs/async.cs:311 #, csharp-format msgid "" "The awaiter type `{0}' must have suitable IsCompleted and GetResult members" msgstr "" -#: mcs/mcs/async.cs:323 +#: mcs/mcs/async.cs:319 msgid "" "The `await' operator may only be used in a query expression within the first " "collection expression of the initial `from' clause or within the collection " "expression of a `join' clause" msgstr "" -#: mcs/mcs/async.cs:328 -#, fuzzy -msgid "The `await' operator cannot be used in a catch clause" -msgstr "" -"Die `new()'-Einschränkung kann nicht mit der `struct'-Einschränkung genutzt " -"werden" - -#: mcs/mcs/async.cs:360 +#: mcs/mcs/async.cs:352 #, csharp-format msgid "The `await' operand type `{0}' must have suitable GetAwaiter method" msgstr "" -#: mcs/mcs/async.cs:376 +#: mcs/mcs/async.cs:368 #, fuzzy, csharp-format msgid "The awaiter type `{0}' must implement interface `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/async.cs:658 +#: mcs/mcs/async.cs:667 msgid "" "Cannot find compiler required types for asynchronous functions support. Are " "you targeting the wrong framework version?" @@ -374,56 +380,86 @@ msgstr "" msgid "Do not use `{0}' directly. Use `dynamic' keyword instead" msgstr "" -#: mcs/mcs/attribute.cs:267 +#: mcs/mcs/attribute.cs:263 #, csharp-format msgid "Error during emitting `{0}' attribute. The reason is `{1}'" msgstr "" -#: mcs/mcs/attribute.cs:327 +#: mcs/mcs/attribute.cs:269 +#, csharp-format +msgid "Invalid value for argument to `{0}' attribute" +msgstr "" + +#: mcs/mcs/attribute.cs:275 +#, csharp-format +msgid "" +"Security attribute `{0}' is not valid on this declaration type. Security " +"attributes are only valid on assembly, type and method declarations" +msgstr "" + +#: mcs/mcs/attribute.cs:330 #, csharp-format msgid "" "`{0}' is ambiguous between `{1}' and `{2}'. Use either `@{0}' or `{0}" "Attribute'" msgstr "" -#: mcs/mcs/attribute.cs:353 mcs/mcs/attribute.cs:364 +#: mcs/mcs/attribute.cs:356 mcs/mcs/attribute.cs:367 #, csharp-format msgid "`{0}': is not an attribute class" msgstr "" -#: mcs/mcs/attribute.cs:473 +#: mcs/mcs/attribute.cs:476 #, csharp-format msgid "Cannot apply attribute class `{0}' because it is abstract" msgstr "" -#: mcs/mcs/attribute.cs:544 +#: mcs/mcs/attribute.cs:547 #, csharp-format msgid "Duplicate named attribute `{0}' argument" msgstr "" -#: mcs/mcs/attribute.cs:1003 +#: mcs/mcs/attribute.cs:860 +#, csharp-format +msgid "Security attribute `{0}' has an invalid SecurityAction value `{1}'" +msgstr "" + +#: mcs/mcs/attribute.cs:867 +#, csharp-format +msgid "" +"SecurityAction value `{0}' is invalid for security attributes applied to an " +"assembly" +msgstr "" + +#: mcs/mcs/attribute.cs:871 +#, csharp-format +msgid "" +"SecurityAction value `{0}' is invalid for security attributes applied to a " +"type or a method" +msgstr "" + +#: mcs/mcs/attribute.cs:1018 #, csharp-format msgid "" "The attribute `{0}' is not valid on this declaration type. It is valid on " "`{1}' declarations only" msgstr "" -#: mcs/mcs/attribute.cs:1025 +#: mcs/mcs/attribute.cs:1040 #, csharp-format msgid "The argument to the `{0}' attribute must be a valid identifier" msgstr "" -#: mcs/mcs/attribute.cs:1039 -#, csharp-format -msgid "Invalid value for argument to `{0}' attribute" +#: mcs/mcs/attribute.cs:1059 +msgid "Unmanaged type `ByValArray' is only valid for fields" msgstr "" -#: mcs/mcs/attribute.cs:1307 +#: mcs/mcs/attribute.cs:1320 #, csharp-format msgid "The attribute `{0}' cannot be applied multiple times" msgstr "" -#: mcs/mcs/attribute.cs:1613 +#: mcs/mcs/attribute.cs:1626 #, csharp-format msgid "`{0}' is obsolete: `{1}'" msgstr "`{0}' ist veraltet: `{1}'" @@ -434,114 +470,114 @@ msgid "" "`struct', `interface', or `void' keyword" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:1535 mcs/mcs/cs-tokenizer.cs:1598 +#: mcs/mcs/cs-tokenizer.cs:1553 mcs/mcs/cs-tokenizer.cs:1616 msgid "Invalid number" msgstr "Ungültige Zahl" -#: mcs/mcs/cs-tokenizer.cs:1813 +#: mcs/mcs/cs-tokenizer.cs:1831 #, csharp-format msgid "Unrecognized escape sequence `\\{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:1832 +#: mcs/mcs/cs-tokenizer.cs:1850 msgid "Unrecognized escape sequence" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2097 +#: mcs/mcs/cs-tokenizer.cs:2115 msgid "Filename, single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2145 +#: mcs/mcs/cs-tokenizer.cs:2163 #, fuzzy msgid "Missing identifier to pre-processor directive" msgstr "Ungültige Präprozessor Direktive" -#: mcs/mcs/cs-tokenizer.cs:2155 mcs/mcs/cs-tokenizer.cs:2159 +#: mcs/mcs/cs-tokenizer.cs:2173 mcs/mcs/cs-tokenizer.cs:2177 #, csharp-format msgid "Identifier expected: {0}" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2667 +#: mcs/mcs/cs-tokenizer.cs:2685 #, fuzzy msgid "Integral constant is too large" msgstr "Numerische Konstante ist zu lang" -#: mcs/mcs/cs-tokenizer.cs:2672 +#: mcs/mcs/cs-tokenizer.cs:2690 msgid "Invalid preprocessor directive" msgstr "Ungültige Präprozessor Direktive" -#: mcs/mcs/cs-tokenizer.cs:2679 +#: mcs/mcs/cs-tokenizer.cs:2697 #, csharp-format msgid "Unexpected processor directive ({0})" msgstr "Unerwartete Prozessor Direktive ({0})" -#: mcs/mcs/cs-tokenizer.cs:2685 +#: mcs/mcs/cs-tokenizer.cs:2703 msgid "" "Cannot define or undefine preprocessor symbols after first token in file" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2691 +#: mcs/mcs/cs-tokenizer.cs:2709 msgid "" "Preprocessor directives must appear as the first non-whitespace character on " "a line" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2696 +#: mcs/mcs/cs-tokenizer.cs:2714 msgid "Single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2741 mcs/mcs/cs-tokenizer.cs:3780 +#: mcs/mcs/cs-tokenizer.cs:2759 mcs/mcs/cs-tokenizer.cs:3798 msgid "Expected `#endif' directive" msgstr "`#endif' Direktive erwartet" -#: mcs/mcs/cs-tokenizer.cs:2774 mcs/mcs/cs-tokenizer.cs:2795 -#: mcs/mcs/cs-tokenizer.cs:2826 mcs/mcs/cs-tokenizer.cs:3778 +#: mcs/mcs/cs-tokenizer.cs:2792 mcs/mcs/cs-tokenizer.cs:2813 +#: mcs/mcs/cs-tokenizer.cs:2844 mcs/mcs/cs-tokenizer.cs:3796 msgid "#endregion directive expected" msgstr "`#endregion' Direktive erwartet" -#: mcs/mcs/cs-tokenizer.cs:2875 +#: mcs/mcs/cs-tokenizer.cs:2893 msgid "Wrong preprocessor directive" msgstr "Falsche Präprozessor Direktive" -#: mcs/mcs/cs-tokenizer.cs:2887 +#: mcs/mcs/cs-tokenizer.cs:2905 #, csharp-format msgid "#error: '{0}'" msgstr "#Fehler: '{0}'" -#: mcs/mcs/cs-tokenizer.cs:2905 +#: mcs/mcs/cs-tokenizer.cs:2923 msgid "The line number specified for #line directive is missing or invalid" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2967 mcs/mcs/cs-tokenizer.cs:3619 +#: mcs/mcs/cs-tokenizer.cs:2985 mcs/mcs/cs-tokenizer.cs:3637 msgid "Newline in constant" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2994 +#: mcs/mcs/cs-tokenizer.cs:3012 msgid "Unterminated string literal" msgstr "Nicht beendetes Zeichenfolgeliteral" -#: mcs/mcs/cs-tokenizer.cs:3071 +#: mcs/mcs/cs-tokenizer.cs:3089 msgid "Identifier too long (limit is 512 chars)" msgstr "Der Bezeichner ist zu lang. (Maximal 512 Zeichen)" -#: mcs/mcs/cs-tokenizer.cs:3457 +#: mcs/mcs/cs-tokenizer.cs:3475 msgid "End-of-file found, '*/' expected" msgstr "Dateiende gefunden. `*/' erwartet." -#: mcs/mcs/cs-tokenizer.cs:3568 +#: mcs/mcs/cs-tokenizer.cs:3586 msgid "Keyword, identifier, or string expected after verbatim specifier: @" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3589 +#: mcs/mcs/cs-tokenizer.cs:3607 #, fuzzy, csharp-format msgid "Unexpected character `{0}'" msgstr "`{0}' erwartet" -#: mcs/mcs/cs-tokenizer.cs:3614 +#: mcs/mcs/cs-tokenizer.cs:3632 msgid "Empty character literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3635 +#: mcs/mcs/cs-tokenizer.cs:3653 msgid "Too many characters in character literal" msgstr "" @@ -549,7 +585,7 @@ msgstr "" msgid "The operation overflows at compile time in checked mode" msgstr "" -#: mcs/mcs/cfold.cs:329 mcs/mcs/expression.cs:4178 +#: mcs/mcs/cfold.cs:329 mcs/mcs/expression.cs:4195 #, csharp-format msgid "Operator `{0}' is ambiguous on operands of type `{1}' and `{2}'" msgstr "" @@ -591,438 +627,452 @@ msgid "" "declaration of this type exists" msgstr "" -#: mcs/mcs/class.cs:759 +#: mcs/mcs/class.cs:764 #, csharp-format msgid "" "`{0}': explicit interface declaration can only be declared in a class or " "struct" msgstr "" -#: mcs/mcs/class.cs:814 +#: mcs/mcs/class.cs:819 #, csharp-format msgid "Duplicate type parameter `{0}'" msgstr "" -#: mcs/mcs/class.cs:816 -#, csharp-format -msgid "" -"Primary constructor of type `{0}' has parameter of same name as type " -"parameter `{1}'" -msgstr "" - -#: mcs/mcs/class.cs:820 +#: mcs/mcs/class.cs:822 #, csharp-format msgid "The type `{0}' already contains a definition for `{1}'" msgstr "" -#: mcs/mcs/class.cs:897 +#: mcs/mcs/class.cs:914 msgid "" "Cannot specify the `DefaultMember' attribute on type containing an indexer" msgstr "" -#: mcs/mcs/class.cs:902 +#: mcs/mcs/class.cs:919 msgid "The RequiredAttribute attribute is not permitted on C# types" msgstr "" -#: mcs/mcs/class.cs:1142 -#, csharp-format -msgid "Class `{0}' cannot derive from the dynamic type" -msgstr "" - #: mcs/mcs/class.cs:1159 #, csharp-format +msgid "Class `{0}' cannot derive from the dynamic type" +msgstr "" + +#: mcs/mcs/class.cs:1176 +#, csharp-format msgid "`{0}' is already listed in interface list" msgstr "" -#: mcs/mcs/class.cs:1167 +#: mcs/mcs/class.cs:1184 #, csharp-format msgid "" "Inconsistent accessibility: base interface `{0}' is less accessible than " "interface `{1}'" msgstr "" -#: mcs/mcs/class.cs:1173 +#: mcs/mcs/class.cs:1190 #, csharp-format msgid "Type `{0}' in interface list is not an interface" msgstr "" -#: mcs/mcs/class.cs:1175 +#: mcs/mcs/class.cs:1192 #, csharp-format msgid "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')" msgstr "" -#: mcs/mcs/class.cs:1178 +#: mcs/mcs/class.cs:1195 #, csharp-format msgid "`{0}': Base class `{1}' must be specified as first" msgstr "" -#: mcs/mcs/class.cs:1239 +#: mcs/mcs/class.cs:1256 #, csharp-format msgid "" "The operator `{0}' requires a matching operator `{1}' to also be defined" msgstr "" -#: mcs/mcs/class.cs:1494 +#: mcs/mcs/class.cs:1511 #, csharp-format msgid "Partial declarations of `{0}' must not specify different base classes" msgstr "" -#: mcs/mcs/class.cs:1529 +#: mcs/mcs/class.cs:1546 msgid "" "Only one part of a partial type can declare primary constructor parameters" msgstr "" -#: mcs/mcs/class.cs:1546 +#: mcs/mcs/class.cs:1563 #, csharp-format msgid "" "Inherited interface `{0}' causes a cycle in the interface hierarchy of `{1}'" msgstr "" -#: mcs/mcs/class.cs:1553 +#: mcs/mcs/class.cs:1570 #, csharp-format msgid "Circular base class dependency involving `{0}' and `{1}'" msgstr "" -#: mcs/mcs/class.cs:1870 +#: mcs/mcs/class.cs:1580 +#, fuzzy +msgid "Implemented interfaces cannot have arguments" +msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" + +#: mcs/mcs/class.cs:1909 #, fuzzy, csharp-format msgid "`{0}': cannot implement a dynamic interface `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/class.cs:1885 +#: mcs/mcs/class.cs:1924 #, csharp-format msgid "" "`{0}' cannot implement both `{1}' and `{2}' because they may unify for some " "type parameter substitutions" msgstr "" -#: mcs/mcs/class.cs:1909 +#: mcs/mcs/class.cs:1948 #, csharp-format msgid "" "A generic type cannot derive from `{0}' because it is an attribute class" msgstr "" -#: mcs/mcs/class.cs:2013 +#: mcs/mcs/class.cs:2052 msgid "" "Two indexers have different names; the IndexerName attribute must be used " "with the same name on every indexer within a type" msgstr "" -#: mcs/mcs/class.cs:2271 +#: mcs/mcs/class.cs:2310 #, csharp-format msgid "A static member `{0}' cannot be marked as override, virtual or abstract" msgstr "" -#: mcs/mcs/class.cs:2278 +#: mcs/mcs/class.cs:2317 #, csharp-format msgid "A member `{0}' marked as override cannot be marked as new or virtual" msgstr "" -#: mcs/mcs/class.cs:2290 +#: mcs/mcs/class.cs:2329 #, csharp-format msgid "`{0}' cannot be both extern and abstract" msgstr "" -#: mcs/mcs/class.cs:2295 +#: mcs/mcs/class.cs:2334 #, csharp-format msgid "`{0}' cannot be both abstract and sealed" msgstr "`{0}' Eine Klasse kann nicht gleichzeitig statisch und versiegelt sein" -#: mcs/mcs/class.cs:2300 +#: mcs/mcs/class.cs:2339 #, csharp-format msgid "The abstract method `{0}' cannot be marked virtual" msgstr "" -#: mcs/mcs/class.cs:2306 +#: mcs/mcs/class.cs:2345 #, csharp-format msgid "`{0}' is abstract but it is declared in the non-abstract class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2314 +#: mcs/mcs/class.cs:2353 #, csharp-format msgid "`{0}': virtual or abstract members cannot be private" msgstr "" -#: mcs/mcs/class.cs:2321 +#: mcs/mcs/class.cs:2360 #, csharp-format msgid "`{0}' cannot be sealed because it is not an override" msgstr "" -#: mcs/mcs/class.cs:2370 +#: mcs/mcs/class.cs:2409 #, csharp-format msgid "`{0}': containing type does not implement interface `{1}'" msgstr "" -#: mcs/mcs/class.cs:2567 +#: mcs/mcs/class.cs:2606 #, csharp-format msgid "Type parameter `{0}' has same name as containing type, or method" msgstr "" -#: mcs/mcs/class.cs:2573 +#: mcs/mcs/class.cs:2614 +#, csharp-format +msgid "`{0}': member names cannot be the same as their enclosing type" +msgstr "" + +#: mcs/mcs/class.cs:2689 #, csharp-format msgid "" "Primary constructor of type `{0}' has parameter of same name as containing " "type" msgstr "" -#: mcs/mcs/class.cs:2581 +#: mcs/mcs/class.cs:2697 #, csharp-format -msgid "`{0}': member names cannot be the same as their enclosing type" +msgid "" +"Primary constructor of type `{0}' has parameter of same name as type " +"parameter `{1}'" msgstr "" -#: mcs/mcs/class.cs:2717 +#: mcs/mcs/class.cs:2763 msgid "" "The class System.Object cannot have a base class or implement an interface." msgstr "" -#: mcs/mcs/class.cs:2726 +#: mcs/mcs/class.cs:2772 #, csharp-format msgid "Attribute `{0}' is only valid on classes derived from System.Attribute" msgstr "" -#: mcs/mcs/class.cs:2731 +#: mcs/mcs/class.cs:2777 msgid "" "Attribute `System.Diagnostics.ConditionalAttribute' is only valid on methods " "or attribute classes" msgstr "" -#: mcs/mcs/class.cs:2760 +#: mcs/mcs/class.cs:2806 #, csharp-format msgid "`{0}': an abstract class cannot be sealed or static" msgstr "`{0}': Eine abstrakte Klasse darf nicht versiegelt oder statisch sein" -#: mcs/mcs/class.cs:2764 +#: mcs/mcs/class.cs:2810 #, csharp-format msgid "`{0}': a class cannot be both static and sealed" msgstr "" -#: mcs/mcs/class.cs:2769 +#: mcs/mcs/class.cs:2815 #, fuzzy, csharp-format msgid "`{0}': Static classes cannot have primary constructor" msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/class.cs:2775 +#: mcs/mcs/class.cs:2821 #, csharp-format msgid "`{0}': Static classes cannot contain user-defined operators" msgstr "" "`{0}': Statische Klassen können keine benutzerdefinierten Operatoren " "beinhalten" -#: mcs/mcs/class.cs:2780 +#: mcs/mcs/class.cs:2826 #, csharp-format msgid "`{0}': Static classes cannot contain destructor" msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/class.cs:2785 +#: mcs/mcs/class.cs:2831 #, csharp-format msgid "`{0}': cannot declare indexers in a static class" msgstr "" -#: mcs/mcs/class.cs:2793 +#: mcs/mcs/class.cs:2839 #, csharp-format msgid "`{0}': Static classes cannot have instance constructors" msgstr "" -#: mcs/mcs/class.cs:2797 +#: mcs/mcs/class.cs:2843 #, csharp-format msgid "`{0}': cannot declare instance members in a static class" msgstr "" -#: mcs/mcs/class.cs:2839 +#: mcs/mcs/class.cs:2885 #, fuzzy, csharp-format msgid "`{0}': Cannot derive from type parameter `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/class.cs:2843 +#: mcs/mcs/class.cs:2889 #, csharp-format msgid "`{0}': Cannot derive from static class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2847 +#: mcs/mcs/class.cs:2893 #, csharp-format msgid "`{0}': cannot derive from sealed type `{1}'" msgstr "" -#: mcs/mcs/class.cs:2850 +#: mcs/mcs/class.cs:2896 #, csharp-format msgid "" "Static class `{0}' cannot derive from type `{1}'. Static classes must derive " "from object" msgstr "" -#: mcs/mcs/class.cs:2861 +#: mcs/mcs/class.cs:2907 #, csharp-format msgid "`{0}' cannot derive from special class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2871 +#: mcs/mcs/class.cs:2917 #, csharp-format msgid "" "Inconsistent accessibility: base class `{0}' is less accessible than class " "`{1}'" msgstr "" -#: mcs/mcs/class.cs:2879 +#: mcs/mcs/class.cs:2925 #, csharp-format msgid "Static class `{0}' cannot implement interfaces" msgstr "" -#: mcs/mcs/class.cs:2990 mcs/mcs/class.cs:3004 +#: mcs/mcs/class.cs:3036 mcs/mcs/class.cs:3050 #, csharp-format msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout" msgstr "" -#: mcs/mcs/class.cs:3094 -#, csharp-format -msgid "`{0}': Structs cannot have instance field initializers" -msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" +#: mcs/mcs/class.cs:3154 +#, fuzzy, csharp-format +msgid "" +"`{0}': Structs without explicit constructors cannot contain members with " +"initializers" +msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/class.cs:3282 +#: mcs/mcs/class.cs:3343 #, csharp-format msgid "Do not override `{0}'. Use destructor syntax instead" msgstr "" -#: mcs/mcs/class.cs:3285 +#: mcs/mcs/class.cs:3346 #, csharp-format msgid "`{0}' is marked as an override but no suitable {1} found to override" msgstr "" -#: mcs/mcs/class.cs:3291 +#: mcs/mcs/class.cs:3352 #, csharp-format msgid "`{0}': cannot override because `{1}' is not an event" msgstr "" -#: mcs/mcs/class.cs:3294 +#: mcs/mcs/class.cs:3355 #, csharp-format msgid "`{0}': cannot override because `{1}' is not a property" msgstr "" -#: mcs/mcs/class.cs:3297 +#: mcs/mcs/class.cs:3358 #, csharp-format msgid "`{0}': cannot override because `{1}' is not a method" msgstr "" -#: mcs/mcs/class.cs:3316 +#: mcs/mcs/class.cs:3377 #, csharp-format msgid "" "`{0}' cannot override inherited members `{1}' and `{2}' because they have " "the same signature when used in type `{3}'" msgstr "" -#: mcs/mcs/class.cs:3369 mcs/mcs/field.cs:203 +#: mcs/mcs/class.cs:3430 mcs/mcs/field.cs:203 #, csharp-format msgid "`{0}' hides inherited abstract member `{1}'" msgstr "" -#: mcs/mcs/class.cs:3393 +#: mcs/mcs/class.cs:3454 #, csharp-format msgid "" "`{0}': cannot override inherited member `{1}' because it is not marked " "virtual, abstract or override" msgstr "" -#: mcs/mcs/class.cs:3401 +#: mcs/mcs/class.cs:3462 #, csharp-format msgid "`{0}': cannot override inherited member `{1}' because it is sealed" msgstr "" -#: mcs/mcs/class.cs:3410 +#: mcs/mcs/class.cs:3471 #, csharp-format msgid "`{0}': type must be `{1}' to match overridden member `{2}'" msgstr "" -#: mcs/mcs/class.cs:3413 +#: mcs/mcs/class.cs:3474 #, csharp-format msgid "`{0}': return type must be `{1}' to match overridden member `{2}'" msgstr "" -#: mcs/mcs/class.cs:3481 +#: mcs/mcs/class.cs:3542 #, csharp-format msgid "A partial method `{0}' cannot explicitly implement an interface" msgstr "" -#: mcs/mcs/class.cs:3487 +#: mcs/mcs/class.cs:3548 #, csharp-format msgid "The type `{0}' in explicit interface declaration is not an interface" msgstr "" -#: mcs/mcs/class.cs:3522 +#: mcs/mcs/class.cs:3583 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "indexer `{1}'" msgstr "" -#: mcs/mcs/class.cs:3526 +#: mcs/mcs/class.cs:3587 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "operator `{1}'" msgstr "" -#: mcs/mcs/class.cs:3530 +#: mcs/mcs/class.cs:3591 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "method `{1}'" msgstr "" -#: mcs/mcs/class.cs:3590 +#: mcs/mcs/class.cs:3651 #, csharp-format msgid "" "`{0}': cannot change access modifiers when overriding `{1}' inherited member " "`{2}'" msgstr "" -#: mcs/mcs/class.cs:3599 +#: mcs/mcs/class.cs:3660 #, fuzzy, csharp-format msgid "`{0}': static types cannot be used as return types" msgstr "" "`{0}': Statische Klassen können keine benutzerdefinierten Operatoren " "beinhalten" -#: mcs/mcs/class.cs:3660 +#: mcs/mcs/class.cs:3721 #, csharp-format msgid "" "`{0}': Cannot specify constraints for overrides and explicit interface " "implementation methods" msgstr "" -#: mcs/mcs/class.cs:3724 +#: mcs/mcs/class.cs:3785 #, csharp-format msgid "New virtual member `{0}' is declared in a sealed class `{1}'" msgstr "" -#: mcs/mcs/class.cs:3739 +#: mcs/mcs/class.cs:3800 msgid "Inconsistent accessibility: property type `" msgstr "" -#: mcs/mcs/class.cs:3744 +#: mcs/mcs/class.cs:3805 msgid "Inconsistent accessibility: indexer return type `" msgstr "" -#: mcs/mcs/class.cs:3750 mcs/mcs/class.cs:3755 mcs/mcs/delegate.cs:171 +#: mcs/mcs/class.cs:3811 mcs/mcs/class.cs:3816 mcs/mcs/delegate.cs:171 msgid "Inconsistent accessibility: return type `" msgstr "" -#: mcs/mcs/class.cs:3760 +#: mcs/mcs/class.cs:3821 +#, csharp-format +msgid "" +"Inconsistent accessibility: event type `{0}' is less accessible than event " +"`{1}'" +msgstr "" + +#: mcs/mcs/class.cs:3825 msgid "Inconsistent accessibility: field type `" msgstr "" -#: mcs/mcs/class.cs:3772 +#: mcs/mcs/class.cs:3837 #, csharp-format msgid "" "Parameters or local variables of type `{0}' cannot be declared in async " "methods or iterators" msgstr "" -#: mcs/mcs/class.cs:3776 +#: mcs/mcs/class.cs:3841 #, csharp-format msgid "" "Local variables of type `{0}' cannot be used inside anonymous methods, " "lambda expressions or query expressions" msgstr "" -#: mcs/mcs/class.cs:3780 +#: mcs/mcs/class.cs:3845 #, csharp-format msgid "Field or property cannot be of type `{0}'" msgstr "" @@ -1055,7 +1105,7 @@ msgid "" "to override)" msgstr "" -#: mcs/mcs/convert.cs:1196 +#: mcs/mcs/convert.cs:1221 #, csharp-format msgid "" "Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' " @@ -1111,51 +1161,51 @@ msgid "" "delegate `{1}'" msgstr "" -#: mcs/mcs/delegate.cs:517 +#: mcs/mcs/delegate.cs:518 #, csharp-format msgid "" "Cannot create delegate from method `{0}' because it is a member of System." "Nullable type" msgstr "" -#: mcs/mcs/delegate.cs:530 +#: mcs/mcs/delegate.cs:531 #, csharp-format msgid "" "Extension method `{0}' of value type `{1}' cannot be used to create delegates" msgstr "" -#: mcs/mcs/delegate.cs:548 +#: mcs/mcs/delegate.cs:549 #, csharp-format msgid "Cannot create delegate from partial method declaration `{0}'" msgstr "" -#: mcs/mcs/delegate.cs:551 +#: mcs/mcs/delegate.cs:552 #, csharp-format msgid "" "Cannot create delegate with `{0}' because it has a Conditional attribute" msgstr "" -#: mcs/mcs/delegate.cs:599 +#: mcs/mcs/delegate.cs:600 #, csharp-format msgid "" "A method or delegate `{0} {1}' parameters and return type must be same as " "delegate `{2} {3}' parameters and return type" msgstr "" -#: mcs/mcs/delegate.cs:606 +#: mcs/mcs/delegate.cs:607 #, csharp-format msgid "" "A method or delegate `{0}' parameters do not match delegate `{1}' parameters" msgstr "" -#: mcs/mcs/delegate.cs:611 +#: mcs/mcs/delegate.cs:612 #, csharp-format msgid "" "A method or delegate `{0} {1}' return type does not match delegate `{2} {3}' " "return type" msgstr "" -#: mcs/mcs/delegate.cs:787 +#: mcs/mcs/delegate.cs:788 msgid "Method name expected" msgstr "Methodennamen erwartet" @@ -1256,50 +1306,57 @@ msgstr "" msgid "The operation in question is undefined on void pointers" msgstr "" -#: mcs/mcs/ecore.cs:473 mcs/mcs/statement.cs:3824 mcs/mcs/statement.cs:3826 +#: mcs/mcs/ecore.cs:473 mcs/mcs/statement.cs:3919 mcs/mcs/statement.cs:3921 #, csharp-format msgid "Internal compiler error: {0}" msgstr "" -#: mcs/mcs/ecore.cs:535 mcs/mcs/expression.cs:7074 mcs/mcs/expression.cs:7082 +#: mcs/mcs/ecore.cs:535 mcs/mcs/expression.cs:7113 mcs/mcs/expression.cs:7121 msgid "A constant value is expected" msgstr "" -#: mcs/mcs/ecore.cs:546 +#: mcs/mcs/ecore.cs:547 msgid "" "An attribute argument must be a constant expression, typeof expression or " "array creation expression" msgstr "" -#: mcs/mcs/ecore.cs:726 +#: mcs/mcs/ecore.cs:550 +#, csharp-format +msgid "" +"Attribute constructor parameter has type `{0}', which is not a valid " +"attribute parameter type" +msgstr "" + +#: mcs/mcs/ecore.cs:732 #, csharp-format msgid "The class `{0}' has no constructors defined" msgstr "" -#: mcs/mcs/ecore.cs:924 +#: mcs/mcs/ecore.cs:930 #, csharp-format msgid "The `{0}' operator cannot be applied to operand of type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:930 +#: mcs/mcs/ecore.cs:936 msgid "An expression tree cannot contain an unsafe pointer operation" msgstr "" -#: mcs/mcs/ecore.cs:1012 +#: mcs/mcs/ecore.cs:1018 #, csharp-format msgid "`{0}' is a `{1}' but a `{2}' was expected" msgstr "" -#: mcs/mcs/ecore.cs:1045 +#: mcs/mcs/ecore.cs:1051 #, csharp-format msgid "Expression denotes a `{0}', where a `{1}' was expected" msgstr "" -#: mcs/mcs/ecore.cs:1055 +#: mcs/mcs/ecore.cs:1061 msgid "Pointers and fixed size buffers may only be used in an unsafe context" msgstr "" -#: mcs/mcs/ecore.cs:2616 +#: mcs/mcs/ecore.cs:2622 #, fuzzy, csharp-format msgid "" "Dynamic keyword requires `{0}' to be defined. Are you missing System.Core." @@ -1308,40 +1365,33 @@ msgstr "" "Der Typ oder Namespacename `{0}' konnte nicht gefunden werden. Fehlt eine " "using-Direktive oder ein Assemblyverweis?" -#: mcs/mcs/ecore.cs:2692 +#: mcs/mcs/ecore.cs:2698 #, csharp-format msgid "" "A local variable `{0}' cannot be used before it is declared. Consider " "renaming the local variable when it hides the member `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:2707 mcs/mcs/ecore.cs:2750 +#: mcs/mcs/ecore.cs:2713 mcs/mcs/ecore.cs:2756 #, csharp-format msgid "`{0}' conflicts with a declaration in a child block" msgstr "" -#: mcs/mcs/ecore.cs:2759 +#: mcs/mcs/ecore.cs:2774 #, csharp-format msgid "A local variable `{0}' cannot be used before it is declared" msgstr "" -#: mcs/mcs/ecore.cs:2788 -#, csharp-format -msgid "" -"Primary constructor parameter `{0}' is not available in this context when " -"using ref or out modifier" -msgstr "" - -#: mcs/mcs/ecore.cs:2827 +#: mcs/mcs/ecore.cs:2831 #, csharp-format msgid "The name `{0}' does not exist in the current context" msgstr "" -#: mcs/mcs/ecore.cs:2923 +#: mcs/mcs/ecore.cs:2927 msgid "System.Void cannot be used from C#. Consider using `void'" msgstr "" -#: mcs/mcs/ecore.cs:3086 +#: mcs/mcs/ecore.cs:3090 #, fuzzy, csharp-format msgid "" "The type or namespace name `{0}' could not be found in the global namespace. " @@ -1350,7 +1400,7 @@ msgstr "" "Der Typ oder Namespacename `{0}' konnte im globalen Namesapce nicht gefunden " "werden. Fehlt ein Assemblyverweis?" -#: mcs/mcs/ecore.cs:3090 +#: mcs/mcs/ecore.cs:3094 #, fuzzy, csharp-format msgid "" "The type or namespace name `{0}' does not exist in the namespace `{1}'. Are " @@ -1359,128 +1409,128 @@ msgstr "" "Der Typ oder Namespacename `{0}' existiert nicht im Namespace `{1}'. Fehlt " "ein Assemblyverweis?" -#: mcs/mcs/ecore.cs:3330 +#: mcs/mcs/ecore.cs:3334 #, csharp-format msgid "Cannot call an abstract base member `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3337 +#: mcs/mcs/ecore.cs:3341 #, csharp-format msgid "" "Cannot access protected member `{0}' via a qualifier of type `{1}'. The " "qualifier must be of type `{2}' or derived from it" msgstr "" -#: mcs/mcs/ecore.cs:3362 +#: mcs/mcs/ecore.cs:3366 #, csharp-format msgid "" "Fields of static readonly field `{0}' cannot be assigned to (except in a " "static constructor or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:3365 +#: mcs/mcs/ecore.cs:3369 #, csharp-format msgid "" "Members of readonly field `{0}' cannot be modified (except in a constructor " "or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:3374 +#: mcs/mcs/ecore.cs:3378 #, csharp-format msgid "" "Members of value type `{0}' cannot be assigned using a property `{1}' object " "initializer" msgstr "" -#: mcs/mcs/ecore.cs:3378 +#: mcs/mcs/ecore.cs:3382 #, csharp-format msgid "" "Cannot modify a value type return value of `{0}'. Consider storing the value " "in a temporary variable" msgstr "" -#: mcs/mcs/ecore.cs:3391 +#: mcs/mcs/ecore.cs:3395 #, fuzzy, csharp-format msgid "Cannot assign to members of `{0}' because it is a `{1}'" msgstr "" "NULL kann nicht in `{0}' konvertiert werden, da dies ein Werttyp ist, der " "nicht auf NULL festgelegt werden kann" -#: mcs/mcs/ecore.cs:3417 +#: mcs/mcs/ecore.cs:3421 #, csharp-format msgid "" "Static member `{0}' cannot be accessed with an instance reference, qualify " "it with a type name instead" msgstr "" -#: mcs/mcs/ecore.cs:3432 +#: mcs/mcs/ecore.cs:3436 #, csharp-format msgid "" "A field initializer cannot reference the nonstatic field, method, or " "property `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3438 +#: mcs/mcs/ecore.cs:3442 msgid "Constructor initializer cannot access primary constructor parameters" msgstr "" -#: mcs/mcs/ecore.cs:3440 +#: mcs/mcs/ecore.cs:3444 #, csharp-format msgid "" "An object reference is required to access primary constructor parameter `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3445 +#: mcs/mcs/ecore.cs:3449 #, csharp-format msgid "An object reference is required to access non-static member `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3456 +#: mcs/mcs/ecore.cs:3460 #, csharp-format msgid "" "Cannot access a nonstatic member of outer type `{0}' via nested type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:3484 +#: mcs/mcs/ecore.cs:3488 msgid "Cannot modify the result of an unboxing conversion" msgstr "Das Ergebnis einer Unboxing-Konvertierung kann nicht geändert werden" -#: mcs/mcs/ecore.cs:3662 +#: mcs/mcs/ecore.cs:3666 #, csharp-format msgid "" "Type `{0}' does not contain a member `{1}' and the best extension method " "overload `{2}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:3667 +#: mcs/mcs/ecore.cs:3671 #, csharp-format msgid "Extension method instance type `{0}' cannot be converted to `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:3815 +#: mcs/mcs/ecore.cs:3819 msgid "An expression tree cannot contain an expression with method group" msgstr "" -#: mcs/mcs/ecore.cs:3821 +#: mcs/mcs/ecore.cs:3825 msgid "" "Partial methods with only a defining declaration or removed conditional " "methods cannot be used in an expression tree" msgstr "" -#: mcs/mcs/ecore.cs:3853 +#: mcs/mcs/ecore.cs:3857 #, csharp-format msgid "" "Cannot convert method group `{0}' to non-delegate type `{1}'. Consider using " "parentheses to invoke the method" msgstr "" -#: mcs/mcs/ecore.cs:4584 +#: mcs/mcs/ecore.cs:4596 #, csharp-format msgid "" "The type `{0}' does not contain a constructor that takes `{1}' arguments" msgstr "" -#: mcs/mcs/ecore.cs:5274 +#: mcs/mcs/ecore.cs:5297 #, csharp-format msgid "" "Type `{0}' does not contain a member `{1}' and the best extension method " @@ -1488,202 +1538,202 @@ msgid "" "without the extension method syntax" msgstr "" -#: mcs/mcs/ecore.cs:5313 +#: mcs/mcs/ecore.cs:5336 #, csharp-format msgid "" "The call is ambiguous between the following methods or properties: `{0}' and " "`{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5376 +#: mcs/mcs/ecore.cs:5399 #, csharp-format msgid "" "The best overloaded collection initalizer method `{0}' cannot have `ref' or " "`out' modifier" msgstr "" -#: mcs/mcs/ecore.cs:5380 +#: mcs/mcs/ecore.cs:5403 #, csharp-format msgid "" "The best overloaded collection initalizer method `{0}' has some invalid " "arguments" msgstr "" -#: mcs/mcs/ecore.cs:5383 +#: mcs/mcs/ecore.cs:5406 #, csharp-format msgid "Delegate `{0}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:5387 +#: mcs/mcs/ecore.cs:5410 #, csharp-format msgid "The best overloaded method match for `{0}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:5396 +#: mcs/mcs/ecore.cs:5419 #, csharp-format msgid "" "Argument `#{0}' does not require `{1}' modifier. Consider removing `{1}' " "modifier" msgstr "" -#: mcs/mcs/ecore.cs:5399 +#: mcs/mcs/ecore.cs:5422 #, csharp-format msgid "Argument `#{0}' is missing `{1}' modifier" msgstr "" -#: mcs/mcs/ecore.cs:5416 +#: mcs/mcs/ecore.cs:5439 #, csharp-format msgid "Argument `#{0}' cannot convert `{1}' expression to type `{2}'" msgstr "" -#: mcs/mcs/ecore.cs:5468 +#: mcs/mcs/ecore.cs:5491 #, csharp-format msgid "" "The type arguments for method `{0}' cannot be inferred from the usage. Try " "specifying the type arguments explicitly" msgstr "" -#: mcs/mcs/ecore.cs:5497 +#: mcs/mcs/ecore.cs:5520 #, csharp-format msgid "No overload for method `{0}' takes `{1}' arguments" msgstr "" -#: mcs/mcs/ecore.cs:5586 +#: mcs/mcs/ecore.cs:5613 #, csharp-format msgid "The delegate `{0}' does not contain a parameter named `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5591 +#: mcs/mcs/ecore.cs:5618 #, csharp-format msgid "" "The best overloaded method match for `{0}' does not contain a parameter " "named `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5601 +#: mcs/mcs/ecore.cs:5628 #, csharp-format msgid "" "Named argument `{0}' cannot be used for a parameter which has positional " "argument specified" msgstr "" -#: mcs/mcs/ecore.cs:5940 +#: mcs/mcs/ecore.cs:5967 msgid "" "You cannot use fixed size buffers contained in unfixed expressions. Try " "using the fixed statement" msgstr "" -#: mcs/mcs/ecore.cs:5945 +#: mcs/mcs/ecore.cs:5972 #, csharp-format msgid "`{0}': Fixed size buffers can only be accessed through locals or fields" msgstr "" -#: mcs/mcs/ecore.cs:6019 +#: mcs/mcs/ecore.cs:6046 #, csharp-format msgid "" "A static readonly field `{0}' cannot be passed ref or out (except in a " "static constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6022 +#: mcs/mcs/ecore.cs:6049 #, csharp-format msgid "" "A readonly field `{0}' cannot be passed ref or out (except in a constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6036 +#: mcs/mcs/ecore.cs:6063 #, csharp-format msgid "" "Fields of static readonly field `{0}' cannot be passed ref or out (except in " "a static constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6039 +#: mcs/mcs/ecore.cs:6066 #, csharp-format msgid "" "Members of readonly field `{0}' cannot be passed ref or out (except in a " "constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6046 +#: mcs/mcs/ecore.cs:6073 #, csharp-format msgid "" "A static readonly field `{0}' cannot be assigned to (except in a static " "constructor or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:6049 +#: mcs/mcs/ecore.cs:6076 #, csharp-format msgid "" "A readonly field `{0}' cannot be assigned to (except in a constructor or a " "variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:6113 +#: mcs/mcs/ecore.cs:6140 #, fuzzy, csharp-format msgid "Use of possibly unassigned field `{0}'" msgstr "Verwendung eines möglicherweise nicht zugewiesenen Feldes `" -#: mcs/mcs/ecore.cs:6470 +#: mcs/mcs/ecore.cs:6502 #, fuzzy, csharp-format msgid "Property or event `{0}' is not supported by the C# language" msgstr "" "Die Eigenschaft `{0}' wird von der C# Sprache nicht unterstützt. Rufen Sie " "die `{1}'-Accessormethode direkt auf." -#: mcs/mcs/ecore.cs:6666 +#: mcs/mcs/ecore.cs:6698 #, csharp-format msgid "A range variable `{0}' may not be passes as `ref' or `out' parameter" msgstr "" -#: mcs/mcs/ecore.cs:6741 +#: mcs/mcs/ecore.cs:6773 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because it " "lacks the `get' accessor" msgstr "" -#: mcs/mcs/ecore.cs:6748 +#: mcs/mcs/ecore.cs:6780 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because the get " "accessor is inaccessible" msgstr "" -#: mcs/mcs/ecore.cs:6767 +#: mcs/mcs/ecore.cs:6799 #, csharp-format msgid "Property or indexer `{0}' cannot be assigned to (it is read-only)" msgstr "" -#: mcs/mcs/ecore.cs:6775 +#: mcs/mcs/ecore.cs:6807 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because the set " "accessor is inaccessible" msgstr "" -#: mcs/mcs/ecore.cs:6943 +#: mcs/mcs/ecore.cs:6975 #, csharp-format msgid "" "The event `{0}' can only appear on the left hand side of `+=' or `-=' " "operator" msgstr "" -#: mcs/mcs/ecore.cs:6947 +#: mcs/mcs/ecore.cs:6979 #, csharp-format msgid "" "The event `{0}' can only appear on the left hand side of += or -= when used " "outside of the type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:7119 +#: mcs/mcs/ecore.cs:7151 #, csharp-format msgid "" "An implicitly typed local variable declaration cannot be initialized with " "`{0}'" msgstr "" -#: mcs/mcs/ecore.cs:7133 +#: mcs/mcs/ecore.cs:7165 msgid "" "The contextual keyword `var' may only appear within a local variable " "declaration" @@ -1705,294 +1755,301 @@ msgstr "" msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected" msgstr "Typ byte, sbyte, short, ushort, int, uint, long oder ulong erwartet" -#: mcs/mcs/eval.cs:587 +#: mcs/mcs/eval.cs:628 msgid "Detection Parsing Error" msgstr "" -#: mcs/mcs/expression.cs:605 +#: mcs/mcs/expression.cs:608 #, csharp-format msgid "Operator `{0}' is ambiguous on an operand of type `{1}'" msgstr "" -#: mcs/mcs/expression.cs:699 +#: mcs/mcs/expression.cs:702 msgid "Cannot take the address of the given expression" msgstr "" -#: mcs/mcs/expression.cs:722 +#: mcs/mcs/expression.cs:725 msgid "" "You can only take the address of unfixed expression inside of a fixed " "statement initializer" msgstr "" -#: mcs/mcs/expression.cs:966 +#: mcs/mcs/expression.cs:969 msgid "The * or -> operator must be applied to a pointer" msgstr "" -#: mcs/mcs/expression.cs:1189 +#: mcs/mcs/expression.cs:1192 msgid "" "The operand of an increment or decrement operator must be a variable, " "property or indexer" msgstr "" -#: mcs/mcs/expression.cs:1432 +#: mcs/mcs/expression.cs:1435 #, csharp-format -msgid "The `{0}' operator cannot be applied to an operand of a static type" +msgid "The second operand of `is' or `as' operator cannot be static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1437 +#: mcs/mcs/expression.cs:1441 #, csharp-format msgid "The `{0}' operator cannot be applied to an operand of pointer type" msgstr "" -#: mcs/mcs/expression.cs:1443 +#: mcs/mcs/expression.cs:1447 #, csharp-format msgid "" -"The `{0}' operator cannot be applied to a lambda expression or anonymous " -"method" +"The `{0}' operator cannot be applied to a lambda expression, anonymous " +"method, or method group" msgstr "" -#: mcs/mcs/expression.cs:1735 +#: mcs/mcs/expression.cs:1747 #, csharp-format msgid "" "The `as' operator cannot be used with a non-reference type parameter `{0}'. " "Consider adding `class' or a reference type constraint" msgstr "" -#: mcs/mcs/expression.cs:1739 +#: mcs/mcs/expression.cs:1751 #, csharp-format msgid "The `as' operator cannot be used with a non-nullable value type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1773 +#: mcs/mcs/expression.cs:1785 #, csharp-format msgid "Cannot convert type `{0}' to `{1}' via a built-in conversion" msgstr "" -#: mcs/mcs/expression.cs:1814 +#: mcs/mcs/expression.cs:1826 #, csharp-format msgid "Cannot convert to static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1924 +#: mcs/mcs/expression.cs:1936 msgid "" "The `default value' operator cannot be applied to an operand of a static type" msgstr "" -#: mcs/mcs/expression.cs:2601 +#: mcs/mcs/expression.cs:2613 #, csharp-format msgid "Operator `{0}' cannot be applied to operands of type `{1}' and `{2}'" msgstr "" -#: mcs/mcs/expression.cs:3396 +#: mcs/mcs/expression.cs:3408 msgid "To cast a negative value, you must enclose the value in parentheses" msgstr "" -#: mcs/mcs/expression.cs:5067 +#: mcs/mcs/expression.cs:3501 +#, csharp-format +msgid "" +"Expression must be implicitly convertible to Boolean or its type `{0}' must " +"define operator `{1}'" +msgstr "" + +#: mcs/mcs/expression.cs:5084 #, csharp-format msgid "" "A user-defined operator `{0}' must have each parameter type and return type " "of the same type in order to be applicable as a short circuit operator" msgstr "" -#: mcs/mcs/expression.cs:5077 +#: mcs/mcs/expression.cs:5094 #, csharp-format msgid "" "The type `{0}' must have operator `true' and operator `false' defined when " "`{1}' is used as a short circuit operator" msgstr "" -#: mcs/mcs/expression.cs:5452 +#: mcs/mcs/expression.cs:5469 #, csharp-format msgid "" "Type of conditional expression cannot be determined as `{0}' and `{1}' " "convert implicitly to each other" msgstr "" -#: mcs/mcs/expression.cs:5464 +#: mcs/mcs/expression.cs:5481 #, csharp-format msgid "" "Type of conditional expression cannot be determined because there is no " "implicit conversion between `{0}' and `{1}'" msgstr "" -#: mcs/mcs/expression.cs:5796 +#: mcs/mcs/expression.cs:5813 #, fuzzy, csharp-format msgid "Use of unassigned local variable `{0}'" msgstr "Verwendung der nicht zugewiesenen lokalen Variable `" -#: mcs/mcs/expression.cs:5816 +#: mcs/mcs/expression.cs:5833 #, csharp-format msgid "" "Cannot use fixed local `{0}' inside an anonymous method, lambda expression " "or query expression" msgstr "" -#: mcs/mcs/expression.cs:6001 +#: mcs/mcs/expression.cs:6018 #, csharp-format msgid "" "Parameter `{0}' cannot be used inside `{1}' when using `ref' or `out' " "modifier" msgstr "" -#: mcs/mcs/expression.cs:6071 +#: mcs/mcs/expression.cs:6088 #, csharp-format msgid "Use of unassigned out parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6233 +#: mcs/mcs/expression.cs:6271 #, fuzzy, csharp-format msgid "Cannot invoke a non-delegate type `{0}'" msgstr "Kann Typ `{0}'<...> nicht finden" -#: mcs/mcs/expression.cs:6244 +#: mcs/mcs/expression.cs:6282 #, csharp-format msgid "The member `{0}' cannot be used as method or delegate" msgstr "" -#: mcs/mcs/expression.cs:6264 +#: mcs/mcs/expression.cs:6302 msgid "" "Do not directly call your base class Finalize method. It is called " "automatically from your destructor" msgstr "" -#: mcs/mcs/expression.cs:6266 +#: mcs/mcs/expression.cs:6304 msgid "" "Destructors and object.Finalize cannot be called directly. Consider calling " "IDisposable.Dispose if available" msgstr "" -#: mcs/mcs/expression.cs:6295 +#: mcs/mcs/expression.cs:6333 #, csharp-format msgid "" "The base call to method `{0}' cannot be dynamically dispatched. Consider " "casting the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:6379 +#: mcs/mcs/expression.cs:6418 #, csharp-format msgid "`{0}': cannot explicitly call operator or accessor" msgstr "" -#: mcs/mcs/expression.cs:6566 +#: mcs/mcs/expression.cs:6605 #, csharp-format msgid "Unsafe type `{0}' cannot be used in an object creation expression" msgstr "" -#: mcs/mcs/expression.cs:6589 +#: mcs/mcs/expression.cs:6628 #, csharp-format msgid "" "Cannot create an instance of the variable type `{0}' because it does not " "have the new() constraint" msgstr "" -#: mcs/mcs/expression.cs:6595 +#: mcs/mcs/expression.cs:6634 #, csharp-format msgid "" "`{0}': cannot provide arguments when creating an instance of a variable type" msgstr "" -#: mcs/mcs/expression.cs:6604 +#: mcs/mcs/expression.cs:6643 #, csharp-format msgid "Cannot create an instance of the static class `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6616 +#: mcs/mcs/expression.cs:6655 #, csharp-format msgid "Cannot create an instance of the abstract class or interface `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6925 +#: mcs/mcs/expression.cs:6964 msgid "" "An implicitly typed local variable declarator cannot use an array initializer" msgstr "" -#: mcs/mcs/expression.cs:7088 mcs/mcs/expression.cs:7113 +#: mcs/mcs/expression.cs:7127 mcs/mcs/expression.cs:7152 #, csharp-format msgid "An array initializer of length `{0}' was expected" msgstr "" -#: mcs/mcs/expression.cs:7104 +#: mcs/mcs/expression.cs:7143 msgid "" "Array initializers can only be used in a variable or field initializer. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:7121 +#: mcs/mcs/expression.cs:7160 msgid "A nested array initializer was expected" msgstr "" -#: mcs/mcs/expression.cs:7168 +#: mcs/mcs/expression.cs:7207 msgid "An expression tree cannot contain a multidimensional array initializer" msgstr "" -#: mcs/mcs/expression.cs:7204 +#: mcs/mcs/expression.cs:7243 msgid "Cannot create an array with a negative size" msgstr "" -#: mcs/mcs/expression.cs:7296 +#: mcs/mcs/expression.cs:7335 msgid "" "Can only use array initializer expressions to assign to array types. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:7718 +#: mcs/mcs/expression.cs:7759 msgid "" "The type of an implicitly typed array cannot be inferred from the " "initializer. Try specifying array type explicitly" msgstr "" -#: mcs/mcs/expression.cs:7859 +#: mcs/mcs/expression.cs:7914 msgid "" "The `this' object cannot be used before all of its fields are assigned to" msgstr "" -#: mcs/mcs/expression.cs:7865 +#: mcs/mcs/expression.cs:7920 msgid "" "Keyword `this' is not valid in a static property, static method, or static " "field initializer" msgstr "" -#: mcs/mcs/expression.cs:7868 +#: mcs/mcs/expression.cs:7923 msgid "" "Anonymous methods inside structs cannot access instance members of `this'. " "Consider copying `this' to a local variable outside the anonymous method and " "using the local instead" msgstr "" -#: mcs/mcs/expression.cs:7871 +#: mcs/mcs/expression.cs:7926 msgid "Keyword `this' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:7947 +#: mcs/mcs/expression.cs:8002 msgid "Cannot take the address of `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:7949 +#: mcs/mcs/expression.cs:8004 msgid "Cannot pass `this' as a ref or out argument because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:7951 +#: mcs/mcs/expression.cs:8006 msgid "Cannot assign to `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:8019 +#: mcs/mcs/expression.cs:8074 msgid "The __arglist construct is valid only within a variable argument method" msgstr "" -#: mcs/mcs/expression.cs:8080 +#: mcs/mcs/expression.cs:8135 msgid "An expression tree cannot contain a method with variable arguments" msgstr "" -#: mcs/mcs/expression.cs:8348 +#: mcs/mcs/expression.cs:8403 msgid "The typeof operator cannot be used on the dynamic type" msgstr "" -#: mcs/mcs/expression.cs:8389 +#: mcs/mcs/expression.cs:8444 #, csharp-format msgid "`{0}': an attribute argument cannot use type parameters" msgstr "" -#: mcs/mcs/expression.cs:8604 +#: mcs/mcs/expression.cs:8659 #, csharp-format msgid "" "`{0}' does not have a predefined size, therefore sizeof can only be used in " @@ -2000,34 +2057,34 @@ msgid "" "SizeOf)" msgstr "" -#: mcs/mcs/expression.cs:8671 +#: mcs/mcs/expression.cs:8726 #, csharp-format msgid "Alias `{0}' not found" msgstr "Alias `{0}' wurde nicht gefunden" -#: mcs/mcs/expression.cs:8697 +#: mcs/mcs/expression.cs:8752 msgid "" "The namespace alias qualifier `::' cannot be used to invoke a method. " "Consider using `.' instead" msgstr "" -#: mcs/mcs/expression.cs:8787 +#: mcs/mcs/expression.cs:8842 msgid "Cannot perform member binding on `null' value" msgstr "" -#: mcs/mcs/expression.cs:8918 +#: mcs/mcs/expression.cs:8973 #, csharp-format msgid "" "`{0}': cannot reference a type through an expression. Consider using `{1}' " "instead" msgstr "" -#: mcs/mcs/expression.cs:8987 +#: mcs/mcs/expression.cs:9042 #, csharp-format msgid "A nested type cannot be specified through a type parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:8995 +#: mcs/mcs/expression.cs:9050 #, fuzzy, csharp-format msgid "" "Alias `{0}' cannot be used with `::' since it denotes a type. Consider " @@ -2036,124 +2093,124 @@ msgstr "" "Der Alias `{0}' kann nicht mit '::' verwendet werden, da der Alias auf einen " "Typ verweist. Verwenden Sie '.' stattdessen." -#: mcs/mcs/expression.cs:9060 +#: mcs/mcs/expression.cs:9117 #, csharp-format msgid "The nested type `{0}' does not exist in the type `{1}'" msgstr "" -#: mcs/mcs/expression.cs:9084 +#: mcs/mcs/expression.cs:9141 #, csharp-format msgid "" "Type `{0}' does not contain a definition for `{1}' and no extension method " "`{1}' of type `{0}' could be found. Are you missing {2}?" msgstr "" -#: mcs/mcs/expression.cs:9312 +#: mcs/mcs/expression.cs:9369 #, csharp-format msgid "Cannot apply indexing with [] to an expression of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:9330 +#: mcs/mcs/expression.cs:9387 msgid "A pointer must be indexed by only one value" msgstr "" -#: mcs/mcs/expression.cs:9386 +#: mcs/mcs/expression.cs:9443 msgid "An element access expression cannot use named argument" msgstr "" -#: mcs/mcs/expression.cs:9470 +#: mcs/mcs/expression.cs:9531 #, csharp-format msgid "Wrong number of indexes `{0}' inside [], expected `{1}'" msgstr "" -#: mcs/mcs/expression.cs:9870 +#: mcs/mcs/expression.cs:9932 msgid "" "The indexer base access cannot be dynamically dispatched. Consider casting " "the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:9955 +#: mcs/mcs/expression.cs:10017 msgid "An expression tree may not contain a base access" msgstr "" -#: mcs/mcs/expression.cs:9973 +#: mcs/mcs/expression.cs:10035 msgid "Keyword `base' is not available in a static method" msgstr "" -#: mcs/mcs/expression.cs:9975 +#: mcs/mcs/expression.cs:10037 msgid "Keyword `base' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:10013 +#: mcs/mcs/expression.cs:10075 msgid "" "A property, indexer or dynamic member access may not be passed as `ref' or " "`out' parameter" msgstr "" -#: mcs/mcs/expression.cs:10351 +#: mcs/mcs/expression.cs:10413 #, csharp-format msgid "Array elements cannot be of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:10354 +#: mcs/mcs/expression.cs:10416 #, csharp-format msgid "Array elements cannot be of static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:10530 +#: mcs/mcs/expression.cs:10592 msgid "Cannot use a negative size with stackalloc" msgstr "" -#: mcs/mcs/expression.cs:10534 +#: mcs/mcs/expression.cs:10596 msgid "Cannot use stackalloc in finally or catch" msgstr "" -#: mcs/mcs/expression.cs:10651 +#: mcs/mcs/expression.cs:10716 #, csharp-format msgid "" "Member `{0}' cannot be initialized. An object initializer may only be used " "for fields, or properties" msgstr "" -#: mcs/mcs/expression.cs:10660 +#: mcs/mcs/expression.cs:10724 #, csharp-format msgid "" "Static field or property `{0}' cannot be assigned in an object initializer" msgstr "" -#: mcs/mcs/expression.cs:10867 +#: mcs/mcs/expression.cs:10931 #, csharp-format msgid "" "A field or property `{0}' cannot be initialized with a collection object " "initializer because type `{1}' does not implement `{2}' interface" msgstr "" -#: mcs/mcs/expression.cs:10878 +#: mcs/mcs/expression.cs:10942 #, csharp-format msgid "Inconsistent `{0}' member declaration" msgstr "" -#: mcs/mcs/expression.cs:10886 +#: mcs/mcs/expression.cs:10950 #, csharp-format msgid "" "An object initializer includes more than one member `{0}' initialization" msgstr "" -#: mcs/mcs/expression.cs:10904 +#: mcs/mcs/expression.cs:10968 #, csharp-format msgid "Cannot initialize object of type `{0}' with a collection initializer" msgstr "" -#: mcs/mcs/expression.cs:11047 +#: mcs/mcs/expression.cs:11113 msgid "" "Object and collection initializers cannot be used to instantiate a delegate" msgstr "" -#: mcs/mcs/expression.cs:11219 +#: mcs/mcs/expression.cs:11301 msgid "Anonymous types cannot be used in this expression" msgstr "" -#: mcs/mcs/expression.cs:11313 +#: mcs/mcs/expression.cs:11395 #, csharp-format msgid "An anonymous type property `{0}' cannot be initialized with `{1}'" msgstr "" @@ -2224,7 +2281,7 @@ msgstr "" msgid "`{0}': A field cannot be both volatile and readonly" msgstr "`{0}' Eine Klasse kann nicht gleichzeitig statisch und versiegelt sein" -#: mcs/mcs/flowanalysis.cs:144 +#: mcs/mcs/flowanalysis.cs:148 #, csharp-format msgid "" "An automatically implemented property `{0}' must be fully assigned before " @@ -2232,7 +2289,7 @@ msgid "" "contructor from a constructor initializer" msgstr "" -#: mcs/mcs/flowanalysis.cs:148 +#: mcs/mcs/flowanalysis.cs:156 #, csharp-format msgid "" "Field `{0}' must be fully assigned before control leaves the constructor" @@ -2312,40 +2369,40 @@ msgid "" "`{0}' is not a valid constraint. Static classes cannot be used as constraints" msgstr "" -#: mcs/mcs/generic.cs:689 +#: mcs/mcs/generic.cs:694 #, csharp-format msgid "The {2} type parameter `{0}' must be {3} valid on `{1}{4}'" msgstr "" -#: mcs/mcs/generic.cs:2188 +#: mcs/mcs/generic.cs:2205 #, csharp-format msgid "`{0}': static classes cannot be used as generic arguments" msgstr "" -#: mcs/mcs/generic.cs:2195 +#: mcs/mcs/generic.cs:2212 #, csharp-format msgid "The type `{0}' may not be used as a type argument" msgstr "" -#: mcs/mcs/generic.cs:2289 +#: mcs/mcs/generic.cs:2306 msgid "Variant type parameters can only be used with interfaces and delegates" msgstr "" -#: mcs/mcs/generic.cs:2358 +#: mcs/mcs/generic.cs:2375 #, csharp-format msgid "" "Partial method declarations of `{0}' have inconsistent constraints for type " "parameter `{1}'" msgstr "" -#: mcs/mcs/generic.cs:2374 +#: mcs/mcs/generic.cs:2391 #, csharp-format msgid "" "Partial declarations of `{0}' have inconsistent constraints for type " "parameter `{1}'" msgstr "" -#: mcs/mcs/generic.cs:2558 +#: mcs/mcs/generic.cs:2575 #, fuzzy, csharp-format msgid "" "The type `{0}' must be a reference type in order to use it as type parameter " @@ -2354,7 +2411,7 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/generic.cs:2568 +#: mcs/mcs/generic.cs:2585 #, fuzzy, csharp-format msgid "" "The type `{0}' must be a non-nullable value type in order to use it as type " @@ -2363,14 +2420,14 @@ msgstr "" "Der Typ `{0}' darf keine NULL-Werte zulassen, wenn er als `{1}'-Parameter im " "generischen Typ oder in der generischen Methode `{2}' verwendet werden soll." -#: mcs/mcs/generic.cs:2629 +#: mcs/mcs/generic.cs:2646 #, csharp-format msgid "" "The type `{0}' must have a public parameterless constructor in order to use " "it as parameter `{1}' in the generic type or method `{2}'" msgstr "" -#: mcs/mcs/generic.cs:2685 +#: mcs/mcs/generic.cs:2702 #, fuzzy, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2380,7 +2437,7 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/generic.cs:2691 +#: mcs/mcs/generic.cs:2708 #, fuzzy, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2390,7 +2447,7 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/generic.cs:2695 +#: mcs/mcs/generic.cs:2712 #, fuzzy, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2399,7 +2456,7 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/generic.cs:2700 +#: mcs/mcs/generic.cs:2717 #, fuzzy, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2408,7 +2465,7 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/generic.cs:2705 +#: mcs/mcs/generic.cs:2722 #, fuzzy, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2417,42 +2474,42 @@ msgstr "" "Der Typ `{0}' muss ein Referenztyp sein, damit er als `{1}'-Parameter in " "generischen Typ oder in der generischen Methode `{2}' verwendet werden kann." -#: mcs/mcs/iterators.cs:98 +#: mcs/mcs/iterators.cs:101 msgid "The yield statement cannot be used inside anonymous method blocks" msgstr "" -#: mcs/mcs/iterators.cs:103 +#: mcs/mcs/iterators.cs:106 msgid "Cannot yield in the body of a finally clause" msgstr "" -#: mcs/mcs/iterators.cs:116 +#: mcs/mcs/iterators.cs:119 msgid "Cannot yield a value in the body of a try block with a catch clause" msgstr "" -#: mcs/mcs/iterators.cs:120 +#: mcs/mcs/iterators.cs:123 msgid "Cannot yield a value in the body of a catch clause" msgstr "" -#: mcs/mcs/iterators.cs:1188 +#: mcs/mcs/iterators.cs:1183 #, csharp-format msgid "" "The body of `{0}' cannot be an iterator block because `{1}' is not an " "iterator interface type" msgstr "" -#: mcs/mcs/iterators.cs:1201 +#: mcs/mcs/iterators.cs:1196 msgid "Iterators cannot have ref or out parameters" msgstr "" -#: mcs/mcs/iterators.cs:1207 +#: mcs/mcs/iterators.cs:1202 msgid "__arglist is not allowed in parameter list of iterators" msgstr "" -#: mcs/mcs/iterators.cs:1213 +#: mcs/mcs/iterators.cs:1208 msgid "Iterators cannot have unsafe parameters or yield types" msgstr "" -#: mcs/mcs/iterators.cs:1219 mcs/mcs/statement.cs:5931 +#: mcs/mcs/iterators.cs:1214 mcs/mcs/statement.cs:6093 msgid "Unsafe code may not appear in iterators" msgstr "" @@ -2577,63 +2634,63 @@ msgid "" "suffix `{1}' to create a literal of this type" msgstr "" -#: mcs/mcs/membercache.cs:1409 +#: mcs/mcs/membercache.cs:1412 msgid "" "A partial method declaration and partial method implementation cannot differ " "on use of `params' modifier" msgstr "" -#: mcs/mcs/membercache.cs:1412 +#: mcs/mcs/membercache.cs:1415 msgid "" "A partial method declaration and partial method implementation must be both " "an extension method or neither" msgstr "" -#: mcs/mcs/membercache.cs:1416 +#: mcs/mcs/membercache.cs:1419 #, csharp-format msgid "" "Overloaded contructor `{0}' cannot differ on use of parameter modifiers only" msgstr "" -#: mcs/mcs/membercache.cs:1420 +#: mcs/mcs/membercache.cs:1423 #, csharp-format msgid "" "Overloaded method `{0}' cannot differ on use of parameter modifiers only" msgstr "" -#: mcs/mcs/membercache.cs:1452 +#: mcs/mcs/membercache.cs:1455 msgid "" "A partial method declaration and partial method implementation must be both " "`static' or neither" msgstr "" -#: mcs/mcs/membercache.cs:1458 +#: mcs/mcs/membercache.cs:1461 msgid "" "A partial method declaration and partial method implementation must be both " "`unsafe' or neither" msgstr "" -#: mcs/mcs/membercache.cs:1466 +#: mcs/mcs/membercache.cs:1469 #, csharp-format msgid "A partial method `{0}' declaration is already defined" msgstr "" -#: mcs/mcs/membercache.cs:1470 +#: mcs/mcs/membercache.cs:1473 #, csharp-format msgid "A partial method `{0}' implementation is already defined" msgstr "" -#: mcs/mcs/membercache.cs:1481 mcs/mcs/property.cs:81 +#: mcs/mcs/membercache.cs:1484 mcs/mcs/property.cs:81 #, csharp-format msgid "A member `{0}' is already reserved" msgstr "" -#: mcs/mcs/membercache.cs:1492 +#: mcs/mcs/membercache.cs:1495 #, csharp-format msgid "Duplicate user-defined conversion in type `{0}'" msgstr "" -#: mcs/mcs/membercache.cs:1498 +#: mcs/mcs/membercache.cs:1501 #, csharp-format msgid "" "A member `{0}' is already defined. Rename this member or use different " @@ -2651,12 +2708,18 @@ msgid "" "`extern'" msgstr "" -#: mcs/mcs/method.cs:665 +#: mcs/mcs/method.cs:569 +msgid "" +"The DllImport attribute cannot be applied to a method that is generic or " +"contained in a generic type" +msgstr "" + +#: mcs/mcs/method.cs:671 #, csharp-format msgid "`{0}': A partial method parameters cannot use `out' modifier" msgstr "" -#: mcs/mcs/method.cs:729 +#: mcs/mcs/method.cs:740 #, csharp-format msgid "" "Conditional not valid on `{0}' because it is a constructor, destructor, " @@ -2665,56 +2728,56 @@ msgstr "" "Das Conditional-Attribut ist für `{0}' ungültig, weil dies ein Konstruktor, " "Destruktor, Operator oder eine explizite Schnittstellenimplementierung ist" -#: mcs/mcs/method.cs:899 +#: mcs/mcs/method.cs:910 msgid "" "A partial method cannot define access modifier or any of abstract, extern, " "new, override, sealed, or virtual modifiers" msgstr "" -#: mcs/mcs/method.cs:905 +#: mcs/mcs/method.cs:916 msgid "" "A partial method must be declared within a partial class or partial struct" msgstr "" -#: mcs/mcs/method.cs:910 +#: mcs/mcs/method.cs:921 #, csharp-format msgid "`{0}': Extension methods must be declared static" msgstr "`{0}': Erweiterungsmethoden müssen statisch sein" -#: mcs/mcs/method.cs:926 +#: mcs/mcs/method.cs:937 #, csharp-format msgid "Program `{0}' has more than one entry point defined: `{1}'" msgstr "" -#: mcs/mcs/method.cs:969 +#: mcs/mcs/method.cs:980 #, csharp-format msgid "Conditional not valid on `{0}' because it is an override method" msgstr "" "Das Conditional-Attribut ist für `{0}' ungültig, da es eine überschriebene " "Funktion ist" -#: mcs/mcs/method.cs:974 +#: mcs/mcs/method.cs:985 #, csharp-format msgid "Conditional not valid on `{0}' because its return type is not void" msgstr "" "Das Conditional-Attribut ist für `{0}' ungültig, da der Rückgabetyp nicht " "leer ist" -#: mcs/mcs/method.cs:979 +#: mcs/mcs/method.cs:990 msgid "Conditional not valid on interface members" msgstr "Das Conditional-Attribut ist für Schnittstellenmember ungültig" -#: mcs/mcs/method.cs:985 +#: mcs/mcs/method.cs:996 #, fuzzy, csharp-format msgid "Conditional member `{0}' cannot implement interface member `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/method.cs:992 +#: mcs/mcs/method.cs:1003 #, csharp-format msgid "Conditional method `{0}' cannot have an out parameter" msgstr "" -#: mcs/mcs/method.cs:1180 +#: mcs/mcs/method.cs:1191 #, csharp-format msgid "" "The constraints for type parameter `{0}' of method `{1}' must match the " @@ -2722,18 +2785,18 @@ msgid "" "using an explicit interface implementation instead" msgstr "" -#: mcs/mcs/method.cs:1235 +#: mcs/mcs/method.cs:1246 msgid "The return type of an async method must be void, Task, or Task" msgstr "" -#: mcs/mcs/method.cs:1252 +#: mcs/mcs/method.cs:1263 #, fuzzy, csharp-format msgid "`{0}': Extension methods cannot be defined in a nested class" msgstr "" "`{0}': Erweiterungsmethoden müssen in einer nicht generischen statischen " "Klasse definiert werden" -#: mcs/mcs/method.cs:1258 +#: mcs/mcs/method.cs:1269 #, csharp-format msgid "" "`{0}': Extension methods require `System.Runtime.CompilerServices." @@ -2741,168 +2804,169 @@ msgid "" "reference?" msgstr "" -#: mcs/mcs/method.cs:1267 +#: mcs/mcs/method.cs:1278 #, csharp-format msgid "`{0}': Extension methods must be defined in a non-generic static class" msgstr "" "`{0}': Erweiterungsmethoden müssen in einer nicht generischen statischen " "Klasse definiert werden" -#: mcs/mcs/method.cs:1283 +#: mcs/mcs/method.cs:1294 #, fuzzy, csharp-format msgid "`{0}': an entry point cannot be async method" msgstr "`{0}': Abstrakte Eigenschaften können keine privaten-Accessoren haben" -#: mcs/mcs/method.cs:1333 +#: mcs/mcs/method.cs:1350 #, csharp-format msgid "" "A partial method `{0}' implementation is missing a partial method declaration" msgstr "" -#: mcs/mcs/method.cs:1371 +#: mcs/mcs/method.cs:1382 #, csharp-format msgid "Method or delegate cannot return type `{0}'" msgstr "" -#: mcs/mcs/method.cs:1449 +#: mcs/mcs/method.cs:1483 msgid "" "The constructor call cannot be dynamically dispatched within constructor " "initializer" msgstr "" -#: mcs/mcs/method.cs:1463 +#: mcs/mcs/method.cs:1497 #, fuzzy, csharp-format msgid "`{0}': Struct constructors cannot call base constructors" msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/method.cs:1481 +#: mcs/mcs/method.cs:1515 #, csharp-format msgid "Constructor `{0}' cannot call itself" msgstr "" -#: mcs/mcs/method.cs:1633 +#: mcs/mcs/method.cs:1666 #, csharp-format msgid "`{0}': The static constructor must be parameterless" msgstr "" -#: mcs/mcs/method.cs:1654 +#: mcs/mcs/method.cs:1687 msgid "Structs cannot contain explicit parameterless constructors" msgstr "" -#: mcs/mcs/method.cs:1680 +#: mcs/mcs/method.cs:1713 #, fuzzy, csharp-format msgid "" -"`{0}': Structs with primary constructor cannot have explicit constructor" +"`{0}': Structs with primary constructor cannot specify default constructor " +"initializer" msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/method.cs:1683 +#: mcs/mcs/method.cs:1716 #, fuzzy, csharp-format msgid "" "`{0}': Instance constructor of type with primary constructor must specify " "`this' constructor initializer" msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#: mcs/mcs/method.cs:1719 +#: mcs/mcs/method.cs:1752 #, csharp-format msgid "" "`{0}': A class with the ComImport attribute cannot have a user-defined " "constructor" msgstr "" -#: mcs/mcs/method.cs:1971 +#: mcs/mcs/method.cs:2004 #, fuzzy, csharp-format msgid "`{0}' is an accessor not found in interface member `{1}{2}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/method.cs:1977 +#: mcs/mcs/method.cs:2010 #, csharp-format msgid "" "`{0}.{1}' in explicit interface declaration is not a member of interface" msgstr "" -#: mcs/mcs/method.cs:1985 +#: mcs/mcs/method.cs:2018 #, csharp-format msgid "" "`{0}' explicit method implementation cannot implement `{1}' because it is an " "accessor" msgstr "" -#: mcs/mcs/method.cs:1995 +#: mcs/mcs/method.cs:2028 #, fuzzy, csharp-format msgid "Method `{0}' cannot implement interface accessor `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/method.cs:2002 +#: mcs/mcs/method.cs:2035 #, csharp-format msgid "" "Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use " "an explicit interface implementation" msgstr "" -#: mcs/mcs/method.cs:2009 +#: mcs/mcs/method.cs:2042 #, fuzzy, csharp-format msgid "" "Accessor `{0}' must be declared public to implement interface member `{1}'" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/method.cs:2029 +#: mcs/mcs/method.cs:2062 #, csharp-format msgid "" "`{0}': the explicit interface implementation cannot introduce the params " "modifier" msgstr "" -#: mcs/mcs/method.cs:2370 +#: mcs/mcs/method.cs:2403 #, csharp-format msgid "" "Attribute `{0}' is not valid on property or event accessors. It is valid on " "`{1}' declarations only" msgstr "" -#: mcs/mcs/method.cs:2603 +#: mcs/mcs/method.cs:2636 #, csharp-format msgid "User-defined operator `{0}' must be declared static and public" msgstr "" -#: mcs/mcs/method.cs:2647 +#: mcs/mcs/method.cs:2680 msgid "" "User-defined operator cannot take an object of the enclosing type and " "convert to an object of the enclosing type" msgstr "" -#: mcs/mcs/method.cs:2658 +#: mcs/mcs/method.cs:2691 msgid "User-defined conversion must convert to or from the enclosing type" msgstr "" -#: mcs/mcs/method.cs:2664 +#: mcs/mcs/method.cs:2697 #, csharp-format msgid "" "User-defined conversion `{0}' cannot convert to or from the dynamic type" msgstr "" -#: mcs/mcs/method.cs:2671 +#: mcs/mcs/method.cs:2704 #, csharp-format msgid "" "User-defined conversion `{0}' cannot convert to or from an interface type" msgstr "" -#: mcs/mcs/method.cs:2678 +#: mcs/mcs/method.cs:2711 #, csharp-format msgid "User-defined conversion `{0}' cannot convert to or from a base class" msgstr "" -#: mcs/mcs/method.cs:2684 +#: mcs/mcs/method.cs:2717 #, csharp-format msgid "User-defined conversion `{0}' cannot convert to or from a derived class" msgstr "" -#: mcs/mcs/method.cs:2691 +#: mcs/mcs/method.cs:2724 msgid "" "Overloaded shift operator must have the type of the first operand be the " "containing type, and the type of the second operand must be int" msgstr "" -#: mcs/mcs/method.cs:2700 +#: mcs/mcs/method.cs:2733 msgid "" "The return type for ++ or -- operator must be the containing type or derived " "from the containing type" @@ -2910,20 +2974,20 @@ msgstr "" "Der Rückgabetyp für die Operatoren ++ und -- muss der enthaltene Typ sein " "oder vom enthaltenen Typ abgeleitet sein" -#: mcs/mcs/method.cs:2705 +#: mcs/mcs/method.cs:2738 msgid "The parameter type for ++ or -- operator must be the containing type" msgstr "Der Parameter für den ++ oder -- Operator muss der enthaltene Typ sein" -#: mcs/mcs/method.cs:2712 +#: mcs/mcs/method.cs:2745 #, fuzzy msgid "The parameter type of a unary operator must be the containing type" msgstr "Der Parameter für den ++ oder -- Operator muss der enthaltene Typ sein" -#: mcs/mcs/method.cs:2720 +#: mcs/mcs/method.cs:2753 msgid "The return type of operator True or False must be bool" msgstr "" -#: mcs/mcs/method.cs:2735 +#: mcs/mcs/method.cs:2768 #, fuzzy msgid "One of the parameters of a binary operator must be the containing type" msgstr "Der Parameter für den ++ oder -- Operator muss der enthaltene Typ sein" @@ -2938,46 +3002,53 @@ msgstr "" msgid "The imported type `{0}' is defined multiple times" msgstr "" -#: mcs/mcs/namespace.cs:741 mcs/mcs/namespace.cs:753 +#: mcs/mcs/namespace.cs:742 mcs/mcs/namespace.cs:754 msgid "" "A using clause must precede all other namespace elements except extern alias " "declarations" msgstr "" -#: mcs/mcs/namespace.cs:769 +#: mcs/mcs/namespace.cs:770 #, csharp-format msgid "The using alias `{0}' appeared previously in this namespace" msgstr "" -#: mcs/mcs/namespace.cs:807 mcs/mcs/namespace.cs:830 +#: mcs/mcs/namespace.cs:808 mcs/mcs/namespace.cs:831 #, csharp-format msgid "The namespace `{0}' already contains a definition for `{1}'" msgstr "" -#: mcs/mcs/namespace.cs:1052 +#: mcs/mcs/namespace.cs:1071 #, csharp-format msgid "Namespace `{0}' contains a definition with same name as alias `{1}'" msgstr "" -#: mcs/mcs/namespace.cs:1105 +#: mcs/mcs/namespace.cs:1124 #, csharp-format msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'" msgstr "" -#: mcs/mcs/namespace.cs:1301 +#: mcs/mcs/namespace.cs:1386 +#, csharp-format +msgid "" +"`{0}' is not a static class. A using namespace directive can only be applied " +"to static classes or namespace" +msgstr "" + +#: mcs/mcs/namespace.cs:1395 #, csharp-format msgid "" "`{0}' is a type not a namespace. A using namespace directive can only be " "applied to namespaces" msgstr "" -#: mcs/mcs/namespace.cs:1325 +#: mcs/mcs/namespace.cs:1418 #, csharp-format msgid "The extern alias `{0}' was not specified in -reference option" msgstr "" "Der externe Alias `{0}' wurde nicht in der -reference-Option angegeben." -#: mcs/mcs/nullable.cs:1082 +#: mcs/mcs/nullable.cs:1087 msgid "" "An expression tree cannot contain a coalescing operator with null left side" msgstr "" @@ -2986,121 +3057,128 @@ msgstr "" msgid "The params parameter must be a single dimensional array" msgstr "" -#: mcs/mcs/parameter.cs:327 +#: mcs/mcs/parameter.cs:319 msgid "An out parameter cannot have the `In' attribute" msgstr "" -#: mcs/mcs/parameter.cs:332 +#: mcs/mcs/parameter.cs:324 msgid "" "Do not use `System.ParamArrayAttribute'. Use the `params' keyword instead" msgstr "" -#: mcs/mcs/parameter.cs:339 +#: mcs/mcs/parameter.cs:331 msgid "" "Cannot specify only `Out' attribute on a ref parameter. Use both `In' and " "`Out' attributes or neither" msgstr "" -#: mcs/mcs/parameter.cs:348 +#: mcs/mcs/parameter.cs:340 #, csharp-format msgid "Cannot specify `{0}' attribute on optional parameter `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:357 +#: mcs/mcs/parameter.cs:349 msgid "" "The CallerMemberName attribute can only be applied to parameters with " "default value" msgstr "" -#: mcs/mcs/parameter.cs:362 +#: mcs/mcs/parameter.cs:354 msgid "" "The CallerLineNumber attribute can only be applied to parameters with " "default value" msgstr "" -#: mcs/mcs/parameter.cs:367 +#: mcs/mcs/parameter.cs:359 msgid "" "The CallerFilePath attribute can only be applied to parameters with default " "value" msgstr "" -#: mcs/mcs/parameter.cs:404 +#: mcs/mcs/parameter.cs:401 #, csharp-format msgid "Method or delegate parameter cannot be of type `{0}'" msgstr "" -#: mcs/mcs/parameter.cs:414 +#: mcs/mcs/parameter.cs:411 #, csharp-format msgid "`{0}': static types cannot be used as parameters" msgstr "" -#: mcs/mcs/parameter.cs:420 +#: mcs/mcs/parameter.cs:417 #, csharp-format msgid "The extension method cannot be of type `{0}'" msgstr "" -#: mcs/mcs/parameter.cs:441 mcs/mcs/parameter.cs:453 +#: mcs/mcs/parameter.cs:439 #, csharp-format msgid "" "The CallerMemberName attribute cannot be applied because there is no " "standard conversion from `{0}' to `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:465 +#: mcs/mcs/parameter.cs:458 +#, csharp-format +msgid "" +"The CallerLineNumberAttribute attribute cannot be applied because there is " +"no standard conversion from `{0}' to `{1}'" +msgstr "" + +#: mcs/mcs/parameter.cs:476 #, csharp-format msgid "" "The CallerFilePath attribute cannot be applied because there is no standard " "conversion from `{0}' to `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:511 +#: mcs/mcs/parameter.cs:552 #, csharp-format msgid "" "Argument of type `{0}' is not applicable for the DefaultParameterValue " "attribute" msgstr "" -#: mcs/mcs/parameter.cs:515 +#: mcs/mcs/parameter.cs:556 #, csharp-format msgid "" "The DefaultParameterValue attribute is not applicable on parameters of type " "`{0}'" msgstr "" -#: mcs/mcs/parameter.cs:543 +#: mcs/mcs/parameter.cs:584 msgid "The type of the default value should match the type of the parameter" msgstr "" -#: mcs/mcs/parameter.cs:694 +#: mcs/mcs/parameter.cs:735 msgid "An expression tree parameter cannot use `ref' or `out' modifier" msgstr "" -#: mcs/mcs/parameter.cs:1203 +#: mcs/mcs/parameter.cs:1266 #, csharp-format msgid "The parameter name `{0}' conflicts with a compiler generated name" msgstr "" -#: mcs/mcs/parameter.cs:1360 +#: mcs/mcs/parameter.cs:1424 #, csharp-format msgid "" "The expression being assigned to optional parameter `{0}' must be a constant " "or default value" msgstr "" -#: mcs/mcs/parameter.cs:1377 +#: mcs/mcs/parameter.cs:1442 #, csharp-format msgid "" "The expression being assigned to nullable optional parameter `{0}' must be " "default value" msgstr "" -#: mcs/mcs/parameter.cs:1385 +#: mcs/mcs/parameter.cs:1450 #, csharp-format msgid "" "Optional parameter `{0}' of type `{1}' can only be initialized with `null'" msgstr "" -#: mcs/mcs/parameter.cs:1396 +#: mcs/mcs/parameter.cs:1461 #, csharp-format msgid "" "Optional parameter expression of type `{0}' cannot be converted to parameter " @@ -3209,26 +3287,46 @@ msgid "" "or indexer has both a get and a set accessor" msgstr "" -#: mcs/mcs/property.cs:853 +#: mcs/mcs/property.cs:838 +#, fuzzy, csharp-format +msgid "`{0}': Only auto-implemented properties can have initializers" +msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" + +#: mcs/mcs/property.cs:842 +#, fuzzy, csharp-format +msgid "`{0}': Properties inside interfaces cannot have initializers" +msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" + +#: mcs/mcs/property.cs:851 +#, csharp-format +msgid "Auto-implemented property `{0}' must have get accessor" +msgstr "" + +#: mcs/mcs/property.cs:857 +#, csharp-format +msgid "Auto-implemented property `{0}' must have set accessor or initializer" +msgstr "" + +#: mcs/mcs/property.cs:891 #, csharp-format msgid "" "Automatically implemented property `{0}' cannot be used inside a type with " "an explicit StructLayout attribute" msgstr "" -#: mcs/mcs/property.cs:1348 +#: mcs/mcs/property.cs:1386 #, csharp-format msgid "`{0}': event must be of a delegate type" msgstr "" -#: mcs/mcs/property.cs:1626 +#: mcs/mcs/property.cs:1664 #, csharp-format msgid "" "The `{0}' attribute is valid only on an indexer that is not an explicit " "interface member declaration" msgstr "" -#: mcs/mcs/property.cs:1630 +#: mcs/mcs/property.cs:1668 msgid "Cannot set the `IndexerName' attribute on an indexer marked override" msgstr "" @@ -3251,109 +3349,111 @@ msgstr "" msgid "Control cannot leave the body of a finally clause" msgstr "" -#: mcs/mcs/statement.cs:1170 +#: mcs/mcs/statement.cs:1174 #, csharp-format msgid "" "An object of a type convertible to `{0}' is required for the return statement" msgstr "" -#: mcs/mcs/statement.cs:1183 mcs/mcs/statement.cs:1207 +#: mcs/mcs/statement.cs:1187 #, csharp-format msgid "" "`{0}': A return keyword must not be followed by any expression when method " "returns void" msgstr "" -#: mcs/mcs/statement.cs:1220 -#, csharp-format +#: mcs/mcs/statement.cs:1206 +msgid "Cannot return an expression of type `void'" +msgstr "" + +#: mcs/mcs/statement.cs:1214 mcs/mcs/statement.cs:1247 msgid "" -"`{0}': A return keyword must not be followed by an expression when async " -"delegate returns `Task'. Consider using `Task' return type" +"Anonymous function or lambda expression converted to a void returning " +"delegate cannot return a value" msgstr "" #: mcs/mcs/statement.cs:1224 +msgid "" +"Async lambda expression or anonymous method converted to a `Task' cannot " +"return a value. Consider returning `Task'" +msgstr "" + +#: mcs/mcs/statement.cs:1227 #, csharp-format msgid "" "`{0}': A return keyword must not be followed by an expression when async " "method returns `Task'. Consider using `Task' return type" msgstr "" -#: mcs/mcs/statement.cs:1237 +#: mcs/mcs/statement.cs:1238 #, csharp-format msgid "" "`{0}': The return expression type of async method must be `{1}' rather than " "`Task<{1}>'" msgstr "" -#: mcs/mcs/statement.cs:1247 -#, csharp-format -msgid "" -"`{0}': A return keyword must not be followed by any expression when delegate " -"returns void" -msgstr "" - -#: mcs/mcs/statement.cs:1280 +#: mcs/mcs/statement.cs:1278 #, csharp-format msgid "" "Cannot convert `{0}' to delegate type `{1}' because some of the return types " "in the block are not implicitly convertible to the delegate return type" msgstr "" -#: mcs/mcs/statement.cs:1337 +#: mcs/mcs/statement.cs:1354 msgid "" "Cannot return a value from iterators. Use the yield return statement to " "return a value, or yield break to end the iteration" msgstr "" -#: mcs/mcs/statement.cs:1399 +#: mcs/mcs/statement.cs:1416 #, csharp-format msgid "" "The label `{0}:' could not be found within the scope of the goto statement" msgstr "" -#: mcs/mcs/statement.cs:1737 +#: mcs/mcs/statement.cs:1771 msgid "A goto case is only valid inside a switch statement" msgstr "" -#: mcs/mcs/statement.cs:1760 +#: mcs/mcs/statement.cs:1794 msgid "" "A throw statement with no arguments is not allowed outside of a catch clause" msgstr "" -#: mcs/mcs/statement.cs:1765 +#: mcs/mcs/statement.cs:1799 msgid "" "A throw statement with no arguments is not allowed inside of a finally " "clause nested inside of the innermost catch clause" msgstr "" -#: mcs/mcs/statement.cs:1783 mcs/mcs/statement.cs:6436 +#: mcs/mcs/statement.cs:1817 mcs/mcs/statement.cs:6626 msgid "The type caught or thrown must be derived from System.Exception" msgstr "" -#: mcs/mcs/statement.cs:1925 +#: mcs/mcs/statement.cs:1984 msgid "No enclosing loop out of which to break or continue" msgstr "" -#: mcs/mcs/statement.cs:2094 +#: mcs/mcs/statement.cs:2153 msgid "A fixed statement cannot use an implicitly typed local variable" msgstr "" -#: mcs/mcs/statement.cs:2099 +#: mcs/mcs/statement.cs:2158 msgid "An implicitly typed local variable cannot be a constant" msgstr "" -#: mcs/mcs/statement.cs:2104 +#: mcs/mcs/statement.cs:2163 msgid "" "An implicitly typed local variable declarator must include an initializer" msgstr "" -#: mcs/mcs/statement.cs:2109 +#: mcs/mcs/statement.cs:2168 msgid "" "An implicitly typed local variable declaration cannot include multiple " "declarators" msgstr "" -#: mcs/mcs/statement.cs:2750 +#: mcs/mcs/statement.cs:2814 #, csharp-format msgid "" "A local variable named `{0}' cannot be declared in this scope because it " @@ -3361,114 +3461,123 @@ msgid "" "scope to denote something else" msgstr "" -#: mcs/mcs/statement.cs:2762 +#: mcs/mcs/statement.cs:2826 #, csharp-format msgid "A local variable named `{0}' is already defined in this scope" msgstr "" -#: mcs/mcs/statement.cs:2769 +#: mcs/mcs/statement.cs:2833 #, csharp-format msgid "" "The type parameter name `{0}' is the same as local variable or parameter name" msgstr "" -#: mcs/mcs/statement.cs:3617 +#: mcs/mcs/statement.cs:3712 #, csharp-format msgid "" "The out parameter `{0}' must be assigned to before control leaves the " "current method" msgstr "" -#: mcs/mcs/statement.cs:3880 +#: mcs/mcs/statement.cs:3975 #, fuzzy msgid "Async methods cannot have ref or out parameters" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/statement.cs:3886 +#: mcs/mcs/statement.cs:3981 msgid "__arglist is not allowed in parameter list of async methods" msgstr "" -#: mcs/mcs/statement.cs:3892 +#: mcs/mcs/statement.cs:3987 #, fuzzy msgid "Async methods cannot have unsafe parameters" msgstr "`{0}' implementiert den Schnittstellenmember `{1}' nicht" -#: mcs/mcs/statement.cs:4089 +#: mcs/mcs/statement.cs:4184 #, csharp-format msgid "The label `{0}' is a duplicate" msgstr "" -#: mcs/mcs/statement.cs:4098 mcs/mcs/statement.cs:4109 +#: mcs/mcs/statement.cs:4193 mcs/mcs/statement.cs:4204 #, csharp-format msgid "" "The label `{0}' shadows another label by the same name in a contained scope" msgstr "" -#: mcs/mcs/statement.cs:4312 +#: mcs/mcs/statement.cs:4425 #, csharp-format msgid "`{0}': not all code paths return a value" msgstr "" -#: mcs/mcs/statement.cs:4430 +#: mcs/mcs/statement.cs:4543 #, csharp-format msgid "The label `{0}' already occurs in this switch statement" msgstr "" -#: mcs/mcs/statement.cs:4554 +#: mcs/mcs/statement.cs:4667 #, csharp-format msgid "Control cannot fall through from one case label `{0}' to another" msgstr "" -#: mcs/mcs/statement.cs:4933 +#: mcs/mcs/statement.cs:5077 #, csharp-format msgid "" "A switch expression of type `{0}' cannot be converted to an integral type, " "bool, char, string, enum or nullable type" msgstr "" -#: mcs/mcs/statement.cs:5697 +#: mcs/mcs/statement.cs:5859 #, csharp-format msgid "`{0}' is not a reference type as required by the lock statement" msgstr "" -#: mcs/mcs/statement.cs:6078 +#: mcs/mcs/statement.cs:6240 msgid "The type of locals declared in a fixed statement must be a pointer type" msgstr "" -#: mcs/mcs/statement.cs:6094 +#: mcs/mcs/statement.cs:6256 msgid "" "The right hand side of a fixed statement assignment may not be a cast " "expression" msgstr "" -#: mcs/mcs/statement.cs:6164 +#: mcs/mcs/statement.cs:6326 msgid "" "You cannot use the fixed statement to take the address of an already fixed " "expression" msgstr "" -#: mcs/mcs/statement.cs:6688 +#: mcs/mcs/statement.cs:6487 +#, fuzzy +msgid "" +"The `await' operator cannot be used in the filter expression of a catch " +"clause" +msgstr "" +"Die `new()'-Einschränkung kann nicht mit der `struct'-Einschränkung genutzt " +"werden" + +#: mcs/mcs/statement.cs:7059 #, csharp-format msgid "" "A previous catch clause already catches all exceptions of this or a super " "type `{0}'" msgstr "" -#: mcs/mcs/statement.cs:6866 +#: mcs/mcs/statement.cs:7288 #, csharp-format msgid "" "`{0}': type used in a using statement must be implicitly convertible to " "`System.IDisposable'" msgstr "" -#: mcs/mcs/statement.cs:7277 +#: mcs/mcs/statement.cs:7700 #, csharp-format msgid "" "foreach statement requires that the return type `{0}' of `{1}' must have a " "suitable public MoveNext method and public Current property" msgstr "" -#: mcs/mcs/statement.cs:7321 +#: mcs/mcs/statement.cs:7744 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it " @@ -3476,60 +3585,63 @@ msgid "" "implementation" msgstr "" -#: mcs/mcs/statement.cs:7343 +#: mcs/mcs/statement.cs:7766 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it does " "not contain a definition for `{1}' or is inaccessible" msgstr "" -#: mcs/mcs/statement.cs:7578 +#: mcs/mcs/statement.cs:8001 msgid "Use of null is not valid in this context" msgstr "" -#: mcs/mcs/statement.cs:7590 +#: mcs/mcs/statement.cs:8013 #, csharp-format msgid "Foreach statement cannot operate on a `{0}'" msgstr "" -#: mcs/mcs/typemanager.cs:796 +#: mcs/mcs/typemanager.cs:797 #, csharp-format msgid "The predefined type `{0}.{1}' is not defined or imported" msgstr "" -#: mcs/mcs/typemanager.cs:841 +#: mcs/mcs/typemanager.cs:842 #, csharp-format msgid "" "The predefined type `{0}.{1}' is defined multiple times. Using definition " "from `{2}'" msgstr "" -#: mcs/mcs/typemanager.cs:852 +#: mcs/mcs/typemanager.cs:853 #, csharp-format msgid "" "The predefined type `{0}.{1}' is defined in an assembly that is not " "referenced." msgstr "" -#: mcs/mcs/typemanager.cs:862 +#: mcs/mcs/typemanager.cs:863 #, csharp-format msgid "The predefined type `{0}.{1}' is not declared correctly" msgstr "" -#: mcs/mcs/typemanager.cs:988 +#: mcs/mcs/typemanager.cs:989 #, csharp-format msgid "" "The compiler required member `{0}.{1}{2}' could not be found or is " "inaccessible" msgstr "" -#: mcs/mcs/typemanager.cs:1107 +#: mcs/mcs/typemanager.cs:1108 #, csharp-format msgid "" "Cannot take the address of, get the size of, or declare a pointer to a " "managed type `{0}'" msgstr "" +#~ msgid "`{0}': Structs cannot have instance field initializers" +#~ msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" + #~ msgid "" #~ "The type or namespace name `{0}' could not be found. Are you missing a " #~ "using directive or an assembly reference?" @@ -3582,10 +3694,6 @@ msgstr "" #~ msgid "Only class types can contain destructor" #~ msgstr "`{0}': Statische Klassen können keinen Destruktor enthalten" -#, fuzzy -#~ msgid "`{0}': event in interface cannot have an initializer" -#~ msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" - #, fuzzy #~ msgid "`{0}': abstract event cannot have an initializer" #~ msgstr "`{0}': Instanzfeldinitialisierungen können nicht in Strukturen sein" diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index d937a45f2d..37be0e7331 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 6da6220a87..5f0410a5b7 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -bfa9b0f159ce1f7e52f254ed0aa870aa395c434d \ No newline at end of file +7f73c5e0dd3a3b0bfa94219123173809a01fd19d \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 253c8852a4..5e01efe9bc 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index bde90cd288..6edd1a3620 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -65d794831c7fe269f0a497156db142e9a76e36d6 \ No newline at end of file +ad3ce5b2c15d87aeddb34b56ad1a1f6f7da36f63 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index ed2a9080db..944ce27e14 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 3.6.0\n" +"Project-Id-Version: mono 3.8.0\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2014-08-12 18:27+0100\n" +"POT-Creation-Date: 2014-09-04 08:50+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -34,7 +34,7 @@ msgid "" "mismatch" msgstr "" -#: mcs/mcs/anonymous.cs:1054 mcs/mcs/ecore.cs:5492 +#: mcs/mcs/anonymous.cs:1054 mcs/mcs/ecore.cs:5515 #, csharp-format msgid "Delegate `{0}' does not take `{1}' arguments" msgstr "" @@ -75,23 +75,23 @@ msgid "" "context" msgstr "" -#: mcs/mcs/anonymous.cs:1363 +#: mcs/mcs/anonymous.cs:1378 #, csharp-format msgid "" "Local variable or parameter `{0}' cannot have their address taken and be " "used inside an anonymous method, lambda expression or query expression" msgstr "" -#: mcs/mcs/anonymous.cs:1383 +#: mcs/mcs/anonymous.cs:1398 #, csharp-format msgid "Cannot convert async {0} to delegate type `{1}'" msgstr "" -#: mcs/mcs/anonymous.cs:1693 +#: mcs/mcs/anonymous.cs:1708 msgid "An expression tree cannot contain an anonymous method expression" msgstr "" -#: mcs/mcs/anonymous.cs:1995 +#: mcs/mcs/anonymous.cs:2023 #, csharp-format msgid "" "`{0}': An anonymous type cannot have multiple properties with the same name" @@ -106,20 +106,20 @@ msgstr "" msgid "An expression tree cannot contain named argument" msgstr "" -#: mcs/mcs/argument.cs:363 +#: mcs/mcs/argument.cs:373 #, csharp-format msgid "" "The method group `{0}' cannot be used as an argument of dynamic operation. " "Consider using parentheses to invoke the method" msgstr "" -#: mcs/mcs/argument.cs:367 +#: mcs/mcs/argument.cs:377 msgid "" "An anonymous method or lambda expression cannot be used as an argument of " "dynamic operation. Consider using a cast" msgstr "" -#: mcs/mcs/argument.cs:370 +#: mcs/mcs/argument.cs:380 #, csharp-format msgid "" "An expression of type `{0}' cannot be used as an argument of dynamic " @@ -130,55 +130,72 @@ msgstr "" msgid "An expression tree cannot contain an assignment operator" msgstr "" -#: mcs/mcs/assign.cs:779 +#: mcs/mcs/assign.cs:780 #, csharp-format msgid "Cannot assign to `{0}' because it is a `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:286 +#: mcs/mcs/assembly.cs:210 +msgid "" +"Executables cannot be satellite assemblies. Remove the attribute or keep it " +"empty" +msgstr "" + +#: mcs/mcs/assembly.cs:234 +#, csharp-format +msgid "" +"The specified version string `{0}' does not conform to the required format - " +"major[.minor[.build[.revision]]]" +msgstr "" + +#: mcs/mcs/assembly.cs:287 msgid "Invalid type specified as an argument for TypeForwardedTo attribute" msgstr "" -#: mcs/mcs/assembly.cs:294 +#: mcs/mcs/assembly.cs:295 #, csharp-format msgid "A duplicate type forward of type `{0}'" msgstr "" -#: mcs/mcs/assembly.cs:303 +#: mcs/mcs/assembly.cs:304 #, csharp-format msgid "Cannot forward type `{0}' because it is defined in this assembly" msgstr "" -#: mcs/mcs/assembly.cs:309 +#: mcs/mcs/assembly.cs:310 #, csharp-format msgid "Cannot forward type `{0}' because it is a nested type" msgstr "" -#: mcs/mcs/assembly.cs:338 +#: mcs/mcs/assembly.cs:327 +msgid "Friend assembly reference cannot have `null' value" +msgstr "" + +#: mcs/mcs/assembly.cs:344 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. InternalsVisibleTo declarations " "cannot have a version, culture or processor architecture specified" msgstr "" -#: mcs/mcs/assembly.cs:346 +#: mcs/mcs/assembly.cs:352 #, csharp-format msgid "" "Friend assembly reference `{0}' is invalid. Strong named assemblies must " "specify a public key in their InternalsVisibleTo declarations" msgstr "" -#: mcs/mcs/assembly.cs:397 +#: mcs/mcs/assembly.cs:403 #, csharp-format msgid "Referenced assembly `{0}' does not have a strong name" msgstr "" -#: mcs/mcs/assembly.cs:403 +#: mcs/mcs/assembly.cs:409 #, csharp-format msgid "Referenced assembly `{0}' has different culture setting of `{1}'" msgstr "" -#: mcs/mcs/assembly.cs:418 +#: mcs/mcs/assembly.cs:424 #, csharp-format msgid "" "Friend access was granted to `{0}', but the output assembly is named `{1}'. " @@ -186,147 +203,139 @@ msgid "" "it" msgstr "" -#: mcs/mcs/assembly.cs:432 +#: mcs/mcs/assembly.cs:438 msgid "" "Could not sign the assembly. ECMA key can only be used to delay-sign " "assemblies" msgstr "" -#: mcs/mcs/assembly.cs:686 +#: mcs/mcs/assembly.cs:692 msgid "" "Added modules must be marked with the CLSCompliant attribute to match the " "assembly" msgstr "" -#: mcs/mcs/assembly.cs:721 mcs/mcs/assembly.cs:736 +#: mcs/mcs/assembly.cs:727 mcs/mcs/assembly.cs:742 #, csharp-format msgid "" "Option `{0}' overrides attribute `{1}' given in a source file or added module" msgstr "" -#: mcs/mcs/assembly.cs:771 +#: mcs/mcs/assembly.cs:777 msgid "Delay signing was requested but no key file was given" msgstr "" -#: mcs/mcs/assembly.cs:792 +#: mcs/mcs/assembly.cs:798 msgid "Cannot link resource file when building a module" msgstr "" -#: mcs/mcs/assembly.cs:797 +#: mcs/mcs/assembly.cs:803 #, csharp-format msgid "Error reading resource file `{0}'" msgstr "" -#: mcs/mcs/assembly.cs:867 +#: mcs/mcs/assembly.cs:873 msgid "Could not write to file `" msgstr "" -#: mcs/mcs/assembly.cs:911 +#: mcs/mcs/assembly.cs:917 msgid "Cannot specify -main if building a module or library" msgstr "" -#: mcs/mcs/assembly.cs:937 -#, csharp-format -msgid "Could not find `{0}' specified for Main method" -msgstr "" - #: mcs/mcs/assembly.cs:943 #, csharp-format +msgid "Could not find `{0}' specified for Main method" +msgstr "" + +#: mcs/mcs/assembly.cs:949 +#, csharp-format msgid "`{0}' specified for Main method must be a valid class or struct" msgstr "" -#: mcs/mcs/assembly.cs:947 +#: mcs/mcs/assembly.cs:953 #, csharp-format msgid "`{0}' does not have a suitable static Main method" msgstr "" -#: mcs/mcs/assembly.cs:950 +#: mcs/mcs/assembly.cs:956 #, csharp-format msgid "" "Program `{0}' does not contain a static `Main' method suitable for an entry " "point" msgstr "" -#: mcs/mcs/assembly.cs:969 +#: mcs/mcs/assembly.cs:975 msgid "Error during assembly signing. " msgstr "" -#: mcs/mcs/assembly.cs:1154 +#: mcs/mcs/assembly.cs:1160 #, csharp-format msgid "Metadata file `{0}' could not be found" msgstr "" -#: mcs/mcs/assembly.cs:1159 +#: mcs/mcs/assembly.cs:1165 #, csharp-format msgid "Metadata file `{0}' does not contain valid metadata" msgstr "" -#: mcs/mcs/assembly.cs:1165 +#: mcs/mcs/assembly.cs:1171 #, csharp-format msgid "" "Referenced assembly file `{0}' is a module. Consider using `-addmodule' " "option to add the module" msgstr "" -#: mcs/mcs/assembly.cs:1172 +#: mcs/mcs/assembly.cs:1178 #, csharp-format msgid "" "Added module file `{0}' is an assembly. Consider using `-r' option to " "reference the file" msgstr "" -#: mcs/mcs/async.cs:78 -msgid "The `await' operator cannot be used in the body of a finally clause" -msgstr "" - -#: mcs/mcs/async.cs:83 +#: mcs/mcs/async.cs:79 msgid "The `await' operator cannot be used in the body of a lock statement" msgstr "" -#: mcs/mcs/async.cs:88 +#: mcs/mcs/async.cs:84 msgid "The `await' operator cannot be used in an unsafe context" msgstr "" -#: mcs/mcs/async.cs:164 +#: mcs/mcs/async.cs:160 #, csharp-format msgid "" "Cannot await void method `{0}'. Consider changing method return type to " "`Task'" msgstr "" -#: mcs/mcs/async.cs:167 +#: mcs/mcs/async.cs:163 #, csharp-format msgid "Cannot await `{0}' expression" msgstr "" -#: mcs/mcs/async.cs:315 +#: mcs/mcs/async.cs:311 #, csharp-format msgid "" "The awaiter type `{0}' must have suitable IsCompleted and GetResult members" msgstr "" -#: mcs/mcs/async.cs:323 +#: mcs/mcs/async.cs:319 msgid "" "The `await' operator may only be used in a query expression within the first " "collection expression of the initial `from' clause or within the collection " "expression of a `join' clause" msgstr "" -#: mcs/mcs/async.cs:328 -msgid "The `await' operator cannot be used in a catch clause" -msgstr "" - -#: mcs/mcs/async.cs:360 +#: mcs/mcs/async.cs:352 #, csharp-format msgid "The `await' operand type `{0}' must have suitable GetAwaiter method" msgstr "" -#: mcs/mcs/async.cs:376 +#: mcs/mcs/async.cs:368 #, csharp-format msgid "The awaiter type `{0}' must implement interface `{1}'" msgstr "" -#: mcs/mcs/async.cs:658 +#: mcs/mcs/async.cs:667 msgid "" "Cannot find compiler required types for asynchronous functions support. Are " "you targeting the wrong framework version?" @@ -365,56 +374,86 @@ msgstr "" msgid "Do not use `{0}' directly. Use `dynamic' keyword instead" msgstr "" -#: mcs/mcs/attribute.cs:267 +#: mcs/mcs/attribute.cs:263 #, csharp-format msgid "Error during emitting `{0}' attribute. The reason is `{1}'" msgstr "" -#: mcs/mcs/attribute.cs:327 +#: mcs/mcs/attribute.cs:269 +#, csharp-format +msgid "Invalid value for argument to `{0}' attribute" +msgstr "" + +#: mcs/mcs/attribute.cs:275 +#, csharp-format +msgid "" +"Security attribute `{0}' is not valid on this declaration type. Security " +"attributes are only valid on assembly, type and method declarations" +msgstr "" + +#: mcs/mcs/attribute.cs:330 #, csharp-format msgid "" "`{0}' is ambiguous between `{1}' and `{2}'. Use either `@{0}' or `{0}" "Attribute'" msgstr "" -#: mcs/mcs/attribute.cs:353 mcs/mcs/attribute.cs:364 +#: mcs/mcs/attribute.cs:356 mcs/mcs/attribute.cs:367 #, csharp-format msgid "`{0}': is not an attribute class" msgstr "" -#: mcs/mcs/attribute.cs:473 +#: mcs/mcs/attribute.cs:476 #, csharp-format msgid "Cannot apply attribute class `{0}' because it is abstract" msgstr "" -#: mcs/mcs/attribute.cs:544 +#: mcs/mcs/attribute.cs:547 #, csharp-format msgid "Duplicate named attribute `{0}' argument" msgstr "" -#: mcs/mcs/attribute.cs:1003 +#: mcs/mcs/attribute.cs:860 +#, csharp-format +msgid "Security attribute `{0}' has an invalid SecurityAction value `{1}'" +msgstr "" + +#: mcs/mcs/attribute.cs:867 +#, csharp-format +msgid "" +"SecurityAction value `{0}' is invalid for security attributes applied to an " +"assembly" +msgstr "" + +#: mcs/mcs/attribute.cs:871 +#, csharp-format +msgid "" +"SecurityAction value `{0}' is invalid for security attributes applied to a " +"type or a method" +msgstr "" + +#: mcs/mcs/attribute.cs:1018 #, csharp-format msgid "" "The attribute `{0}' is not valid on this declaration type. It is valid on " "`{1}' declarations only" msgstr "" -#: mcs/mcs/attribute.cs:1025 +#: mcs/mcs/attribute.cs:1040 #, csharp-format msgid "The argument to the `{0}' attribute must be a valid identifier" msgstr "" -#: mcs/mcs/attribute.cs:1039 -#, csharp-format -msgid "Invalid value for argument to `{0}' attribute" +#: mcs/mcs/attribute.cs:1059 +msgid "Unmanaged type `ByValArray' is only valid for fields" msgstr "" -#: mcs/mcs/attribute.cs:1307 +#: mcs/mcs/attribute.cs:1320 #, csharp-format msgid "The attribute `{0}' cannot be applied multiple times" msgstr "" -#: mcs/mcs/attribute.cs:1613 +#: mcs/mcs/attribute.cs:1626 #, csharp-format msgid "`{0}' is obsolete: `{1}'" msgstr "" @@ -425,112 +464,112 @@ msgid "" "`struct', `interface', or `void' keyword" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:1535 mcs/mcs/cs-tokenizer.cs:1598 +#: mcs/mcs/cs-tokenizer.cs:1553 mcs/mcs/cs-tokenizer.cs:1616 msgid "Invalid number" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:1813 +#: mcs/mcs/cs-tokenizer.cs:1831 #, csharp-format msgid "Unrecognized escape sequence `\\{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:1832 +#: mcs/mcs/cs-tokenizer.cs:1850 msgid "Unrecognized escape sequence" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2097 +#: mcs/mcs/cs-tokenizer.cs:2115 msgid "Filename, single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2145 +#: mcs/mcs/cs-tokenizer.cs:2163 msgid "Missing identifier to pre-processor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2155 mcs/mcs/cs-tokenizer.cs:2159 +#: mcs/mcs/cs-tokenizer.cs:2173 mcs/mcs/cs-tokenizer.cs:2177 #, csharp-format msgid "Identifier expected: {0}" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2667 +#: mcs/mcs/cs-tokenizer.cs:2685 msgid "Integral constant is too large" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2672 +#: mcs/mcs/cs-tokenizer.cs:2690 msgid "Invalid preprocessor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2679 +#: mcs/mcs/cs-tokenizer.cs:2697 #, csharp-format msgid "Unexpected processor directive ({0})" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2685 +#: mcs/mcs/cs-tokenizer.cs:2703 msgid "" "Cannot define or undefine preprocessor symbols after first token in file" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2691 +#: mcs/mcs/cs-tokenizer.cs:2709 msgid "" "Preprocessor directives must appear as the first non-whitespace character on " "a line" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2696 +#: mcs/mcs/cs-tokenizer.cs:2714 msgid "Single-line comment or end-of-line expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2741 mcs/mcs/cs-tokenizer.cs:3780 +#: mcs/mcs/cs-tokenizer.cs:2759 mcs/mcs/cs-tokenizer.cs:3798 msgid "Expected `#endif' directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2774 mcs/mcs/cs-tokenizer.cs:2795 -#: mcs/mcs/cs-tokenizer.cs:2826 mcs/mcs/cs-tokenizer.cs:3778 +#: mcs/mcs/cs-tokenizer.cs:2792 mcs/mcs/cs-tokenizer.cs:2813 +#: mcs/mcs/cs-tokenizer.cs:2844 mcs/mcs/cs-tokenizer.cs:3796 msgid "#endregion directive expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2875 +#: mcs/mcs/cs-tokenizer.cs:2893 msgid "Wrong preprocessor directive" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2887 +#: mcs/mcs/cs-tokenizer.cs:2905 #, csharp-format msgid "#error: '{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2905 +#: mcs/mcs/cs-tokenizer.cs:2923 msgid "The line number specified for #line directive is missing or invalid" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2967 mcs/mcs/cs-tokenizer.cs:3619 +#: mcs/mcs/cs-tokenizer.cs:2985 mcs/mcs/cs-tokenizer.cs:3637 msgid "Newline in constant" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:2994 +#: mcs/mcs/cs-tokenizer.cs:3012 msgid "Unterminated string literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3071 +#: mcs/mcs/cs-tokenizer.cs:3089 msgid "Identifier too long (limit is 512 chars)" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3457 +#: mcs/mcs/cs-tokenizer.cs:3475 msgid "End-of-file found, '*/' expected" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3568 +#: mcs/mcs/cs-tokenizer.cs:3586 msgid "Keyword, identifier, or string expected after verbatim specifier: @" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3589 +#: mcs/mcs/cs-tokenizer.cs:3607 #, csharp-format msgid "Unexpected character `{0}'" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3614 +#: mcs/mcs/cs-tokenizer.cs:3632 msgid "Empty character literal" msgstr "" -#: mcs/mcs/cs-tokenizer.cs:3635 +#: mcs/mcs/cs-tokenizer.cs:3653 msgid "Too many characters in character literal" msgstr "" @@ -538,7 +577,7 @@ msgstr "" msgid "The operation overflows at compile time in checked mode" msgstr "" -#: mcs/mcs/cfold.cs:329 mcs/mcs/expression.cs:4178 +#: mcs/mcs/cfold.cs:329 mcs/mcs/expression.cs:4195 #, csharp-format msgid "Operator `{0}' is ambiguous on operands of type `{1}' and `{2}'" msgstr "" @@ -580,434 +619,447 @@ msgid "" "declaration of this type exists" msgstr "" -#: mcs/mcs/class.cs:759 +#: mcs/mcs/class.cs:764 #, csharp-format msgid "" "`{0}': explicit interface declaration can only be declared in a class or " "struct" msgstr "" -#: mcs/mcs/class.cs:814 +#: mcs/mcs/class.cs:819 #, csharp-format msgid "Duplicate type parameter `{0}'" msgstr "" -#: mcs/mcs/class.cs:816 -#, csharp-format -msgid "" -"Primary constructor of type `{0}' has parameter of same name as type " -"parameter `{1}'" -msgstr "" - -#: mcs/mcs/class.cs:820 +#: mcs/mcs/class.cs:822 #, csharp-format msgid "The type `{0}' already contains a definition for `{1}'" msgstr "" -#: mcs/mcs/class.cs:897 +#: mcs/mcs/class.cs:914 msgid "" "Cannot specify the `DefaultMember' attribute on type containing an indexer" msgstr "" -#: mcs/mcs/class.cs:902 +#: mcs/mcs/class.cs:919 msgid "The RequiredAttribute attribute is not permitted on C# types" msgstr "" -#: mcs/mcs/class.cs:1142 -#, csharp-format -msgid "Class `{0}' cannot derive from the dynamic type" -msgstr "" - #: mcs/mcs/class.cs:1159 #, csharp-format +msgid "Class `{0}' cannot derive from the dynamic type" +msgstr "" + +#: mcs/mcs/class.cs:1176 +#, csharp-format msgid "`{0}' is already listed in interface list" msgstr "" -#: mcs/mcs/class.cs:1167 +#: mcs/mcs/class.cs:1184 #, csharp-format msgid "" "Inconsistent accessibility: base interface `{0}' is less accessible than " "interface `{1}'" msgstr "" -#: mcs/mcs/class.cs:1173 +#: mcs/mcs/class.cs:1190 #, csharp-format msgid "Type `{0}' in interface list is not an interface" msgstr "" -#: mcs/mcs/class.cs:1175 +#: mcs/mcs/class.cs:1192 #, csharp-format msgid "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')" msgstr "" -#: mcs/mcs/class.cs:1178 +#: mcs/mcs/class.cs:1195 #, csharp-format msgid "`{0}': Base class `{1}' must be specified as first" msgstr "" -#: mcs/mcs/class.cs:1239 +#: mcs/mcs/class.cs:1256 #, csharp-format msgid "" "The operator `{0}' requires a matching operator `{1}' to also be defined" msgstr "" -#: mcs/mcs/class.cs:1494 +#: mcs/mcs/class.cs:1511 #, csharp-format msgid "Partial declarations of `{0}' must not specify different base classes" msgstr "" -#: mcs/mcs/class.cs:1529 +#: mcs/mcs/class.cs:1546 msgid "" "Only one part of a partial type can declare primary constructor parameters" msgstr "" -#: mcs/mcs/class.cs:1546 +#: mcs/mcs/class.cs:1563 #, csharp-format msgid "" "Inherited interface `{0}' causes a cycle in the interface hierarchy of `{1}'" msgstr "" -#: mcs/mcs/class.cs:1553 +#: mcs/mcs/class.cs:1570 #, csharp-format msgid "Circular base class dependency involving `{0}' and `{1}'" msgstr "" -#: mcs/mcs/class.cs:1870 +#: mcs/mcs/class.cs:1580 +msgid "Implemented interfaces cannot have arguments" +msgstr "" + +#: mcs/mcs/class.cs:1909 #, csharp-format msgid "`{0}': cannot implement a dynamic interface `{1}'" msgstr "" -#: mcs/mcs/class.cs:1885 +#: mcs/mcs/class.cs:1924 #, csharp-format msgid "" "`{0}' cannot implement both `{1}' and `{2}' because they may unify for some " "type parameter substitutions" msgstr "" -#: mcs/mcs/class.cs:1909 +#: mcs/mcs/class.cs:1948 #, csharp-format msgid "" "A generic type cannot derive from `{0}' because it is an attribute class" msgstr "" -#: mcs/mcs/class.cs:2013 +#: mcs/mcs/class.cs:2052 msgid "" "Two indexers have different names; the IndexerName attribute must be used " "with the same name on every indexer within a type" msgstr "" -#: mcs/mcs/class.cs:2271 +#: mcs/mcs/class.cs:2310 #, csharp-format msgid "A static member `{0}' cannot be marked as override, virtual or abstract" msgstr "" -#: mcs/mcs/class.cs:2278 +#: mcs/mcs/class.cs:2317 #, csharp-format msgid "A member `{0}' marked as override cannot be marked as new or virtual" msgstr "" -#: mcs/mcs/class.cs:2290 +#: mcs/mcs/class.cs:2329 #, csharp-format msgid "`{0}' cannot be both extern and abstract" msgstr "" -#: mcs/mcs/class.cs:2295 +#: mcs/mcs/class.cs:2334 #, csharp-format msgid "`{0}' cannot be both abstract and sealed" msgstr "" -#: mcs/mcs/class.cs:2300 +#: mcs/mcs/class.cs:2339 #, csharp-format msgid "The abstract method `{0}' cannot be marked virtual" msgstr "" -#: mcs/mcs/class.cs:2306 +#: mcs/mcs/class.cs:2345 #, csharp-format msgid "`{0}' is abstract but it is declared in the non-abstract class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2314 +#: mcs/mcs/class.cs:2353 #, csharp-format msgid "`{0}': virtual or abstract members cannot be private" msgstr "" -#: mcs/mcs/class.cs:2321 +#: mcs/mcs/class.cs:2360 #, csharp-format msgid "`{0}' cannot be sealed because it is not an override" msgstr "" -#: mcs/mcs/class.cs:2370 +#: mcs/mcs/class.cs:2409 #, csharp-format msgid "`{0}': containing type does not implement interface `{1}'" msgstr "" -#: mcs/mcs/class.cs:2567 +#: mcs/mcs/class.cs:2606 #, csharp-format msgid "Type parameter `{0}' has same name as containing type, or method" msgstr "" -#: mcs/mcs/class.cs:2573 +#: mcs/mcs/class.cs:2614 +#, csharp-format +msgid "`{0}': member names cannot be the same as their enclosing type" +msgstr "" + +#: mcs/mcs/class.cs:2689 #, csharp-format msgid "" "Primary constructor of type `{0}' has parameter of same name as containing " "type" msgstr "" -#: mcs/mcs/class.cs:2581 +#: mcs/mcs/class.cs:2697 #, csharp-format -msgid "`{0}': member names cannot be the same as their enclosing type" +msgid "" +"Primary constructor of type `{0}' has parameter of same name as type " +"parameter `{1}'" msgstr "" -#: mcs/mcs/class.cs:2717 +#: mcs/mcs/class.cs:2763 msgid "" "The class System.Object cannot have a base class or implement an interface." msgstr "" -#: mcs/mcs/class.cs:2726 +#: mcs/mcs/class.cs:2772 #, csharp-format msgid "Attribute `{0}' is only valid on classes derived from System.Attribute" msgstr "" -#: mcs/mcs/class.cs:2731 +#: mcs/mcs/class.cs:2777 msgid "" "Attribute `System.Diagnostics.ConditionalAttribute' is only valid on methods " "or attribute classes" msgstr "" -#: mcs/mcs/class.cs:2760 +#: mcs/mcs/class.cs:2806 #, csharp-format msgid "`{0}': an abstract class cannot be sealed or static" msgstr "" -#: mcs/mcs/class.cs:2764 +#: mcs/mcs/class.cs:2810 #, csharp-format msgid "`{0}': a class cannot be both static and sealed" msgstr "" -#: mcs/mcs/class.cs:2769 +#: mcs/mcs/class.cs:2815 #, csharp-format msgid "`{0}': Static classes cannot have primary constructor" msgstr "" -#: mcs/mcs/class.cs:2775 +#: mcs/mcs/class.cs:2821 #, csharp-format msgid "`{0}': Static classes cannot contain user-defined operators" msgstr "" -#: mcs/mcs/class.cs:2780 +#: mcs/mcs/class.cs:2826 #, csharp-format msgid "`{0}': Static classes cannot contain destructor" msgstr "" -#: mcs/mcs/class.cs:2785 +#: mcs/mcs/class.cs:2831 #, csharp-format msgid "`{0}': cannot declare indexers in a static class" msgstr "" -#: mcs/mcs/class.cs:2793 +#: mcs/mcs/class.cs:2839 #, csharp-format msgid "`{0}': Static classes cannot have instance constructors" msgstr "" -#: mcs/mcs/class.cs:2797 +#: mcs/mcs/class.cs:2843 #, csharp-format msgid "`{0}': cannot declare instance members in a static class" msgstr "" -#: mcs/mcs/class.cs:2839 +#: mcs/mcs/class.cs:2885 #, csharp-format msgid "`{0}': Cannot derive from type parameter `{1}'" msgstr "" -#: mcs/mcs/class.cs:2843 +#: mcs/mcs/class.cs:2889 #, csharp-format msgid "`{0}': Cannot derive from static class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2847 +#: mcs/mcs/class.cs:2893 #, csharp-format msgid "`{0}': cannot derive from sealed type `{1}'" msgstr "" -#: mcs/mcs/class.cs:2850 +#: mcs/mcs/class.cs:2896 #, csharp-format msgid "" "Static class `{0}' cannot derive from type `{1}'. Static classes must derive " "from object" msgstr "" -#: mcs/mcs/class.cs:2861 +#: mcs/mcs/class.cs:2907 #, csharp-format msgid "`{0}' cannot derive from special class `{1}'" msgstr "" -#: mcs/mcs/class.cs:2871 +#: mcs/mcs/class.cs:2917 #, csharp-format msgid "" "Inconsistent accessibility: base class `{0}' is less accessible than class " "`{1}'" msgstr "" -#: mcs/mcs/class.cs:2879 +#: mcs/mcs/class.cs:2925 #, csharp-format msgid "Static class `{0}' cannot implement interfaces" msgstr "" -#: mcs/mcs/class.cs:2990 mcs/mcs/class.cs:3004 +#: mcs/mcs/class.cs:3036 mcs/mcs/class.cs:3050 #, csharp-format msgid "Struct member `{0}' of type `{1}' causes a cycle in the struct layout" msgstr "" -#: mcs/mcs/class.cs:3094 +#: mcs/mcs/class.cs:3154 #, csharp-format -msgid "`{0}': Structs cannot have instance field initializers" +msgid "" +"`{0}': Structs without explicit constructors cannot contain members with " +"initializers" msgstr "" -#: mcs/mcs/class.cs:3282 +#: mcs/mcs/class.cs:3343 #, csharp-format msgid "Do not override `{0}'. Use destructor syntax instead" msgstr "" -#: mcs/mcs/class.cs:3285 +#: mcs/mcs/class.cs:3346 #, csharp-format msgid "`{0}' is marked as an override but no suitable {1} found to override" msgstr "" -#: mcs/mcs/class.cs:3291 +#: mcs/mcs/class.cs:3352 #, csharp-format msgid "`{0}': cannot override because `{1}' is not an event" msgstr "" -#: mcs/mcs/class.cs:3294 +#: mcs/mcs/class.cs:3355 #, csharp-format msgid "`{0}': cannot override because `{1}' is not a property" msgstr "" -#: mcs/mcs/class.cs:3297 +#: mcs/mcs/class.cs:3358 #, csharp-format msgid "`{0}': cannot override because `{1}' is not a method" msgstr "" -#: mcs/mcs/class.cs:3316 +#: mcs/mcs/class.cs:3377 #, csharp-format msgid "" "`{0}' cannot override inherited members `{1}' and `{2}' because they have " "the same signature when used in type `{3}'" msgstr "" -#: mcs/mcs/class.cs:3369 mcs/mcs/field.cs:203 +#: mcs/mcs/class.cs:3430 mcs/mcs/field.cs:203 #, csharp-format msgid "`{0}' hides inherited abstract member `{1}'" msgstr "" -#: mcs/mcs/class.cs:3393 +#: mcs/mcs/class.cs:3454 #, csharp-format msgid "" "`{0}': cannot override inherited member `{1}' because it is not marked " "virtual, abstract or override" msgstr "" -#: mcs/mcs/class.cs:3401 +#: mcs/mcs/class.cs:3462 #, csharp-format msgid "`{0}': cannot override inherited member `{1}' because it is sealed" msgstr "" -#: mcs/mcs/class.cs:3410 +#: mcs/mcs/class.cs:3471 #, csharp-format msgid "`{0}': type must be `{1}' to match overridden member `{2}'" msgstr "" -#: mcs/mcs/class.cs:3413 +#: mcs/mcs/class.cs:3474 #, csharp-format msgid "`{0}': return type must be `{1}' to match overridden member `{2}'" msgstr "" -#: mcs/mcs/class.cs:3481 +#: mcs/mcs/class.cs:3542 #, csharp-format msgid "A partial method `{0}' cannot explicitly implement an interface" msgstr "" -#: mcs/mcs/class.cs:3487 +#: mcs/mcs/class.cs:3548 #, csharp-format msgid "The type `{0}' in explicit interface declaration is not an interface" msgstr "" -#: mcs/mcs/class.cs:3522 +#: mcs/mcs/class.cs:3583 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "indexer `{1}'" msgstr "" -#: mcs/mcs/class.cs:3526 +#: mcs/mcs/class.cs:3587 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "operator `{1}'" msgstr "" -#: mcs/mcs/class.cs:3530 +#: mcs/mcs/class.cs:3591 #, csharp-format msgid "" "Inconsistent accessibility: parameter type `{0}' is less accessible than " "method `{1}'" msgstr "" -#: mcs/mcs/class.cs:3590 +#: mcs/mcs/class.cs:3651 #, csharp-format msgid "" "`{0}': cannot change access modifiers when overriding `{1}' inherited member " "`{2}'" msgstr "" -#: mcs/mcs/class.cs:3599 +#: mcs/mcs/class.cs:3660 #, csharp-format msgid "`{0}': static types cannot be used as return types" msgstr "" -#: mcs/mcs/class.cs:3660 +#: mcs/mcs/class.cs:3721 #, csharp-format msgid "" "`{0}': Cannot specify constraints for overrides and explicit interface " "implementation methods" msgstr "" -#: mcs/mcs/class.cs:3724 +#: mcs/mcs/class.cs:3785 #, csharp-format msgid "New virtual member `{0}' is declared in a sealed class `{1}'" msgstr "" -#: mcs/mcs/class.cs:3739 +#: mcs/mcs/class.cs:3800 msgid "Inconsistent accessibility: property type `" msgstr "" -#: mcs/mcs/class.cs:3744 +#: mcs/mcs/class.cs:3805 msgid "Inconsistent accessibility: indexer return type `" msgstr "" -#: mcs/mcs/class.cs:3750 mcs/mcs/class.cs:3755 mcs/mcs/delegate.cs:171 +#: mcs/mcs/class.cs:3811 mcs/mcs/class.cs:3816 mcs/mcs/delegate.cs:171 msgid "Inconsistent accessibility: return type `" msgstr "" -#: mcs/mcs/class.cs:3760 +#: mcs/mcs/class.cs:3821 +#, csharp-format +msgid "" +"Inconsistent accessibility: event type `{0}' is less accessible than event " +"`{1}'" +msgstr "" + +#: mcs/mcs/class.cs:3825 msgid "Inconsistent accessibility: field type `" msgstr "" -#: mcs/mcs/class.cs:3772 +#: mcs/mcs/class.cs:3837 #, csharp-format msgid "" "Parameters or local variables of type `{0}' cannot be declared in async " "methods or iterators" msgstr "" -#: mcs/mcs/class.cs:3776 +#: mcs/mcs/class.cs:3841 #, csharp-format msgid "" "Local variables of type `{0}' cannot be used inside anonymous methods, " "lambda expressions or query expressions" msgstr "" -#: mcs/mcs/class.cs:3780 +#: mcs/mcs/class.cs:3845 #, csharp-format msgid "Field or property cannot be of type `{0}'" msgstr "" @@ -1040,7 +1092,7 @@ msgid "" "to override)" msgstr "" -#: mcs/mcs/convert.cs:1196 +#: mcs/mcs/convert.cs:1221 #, csharp-format msgid "" "Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' " @@ -1096,51 +1148,51 @@ msgid "" "delegate `{1}'" msgstr "" -#: mcs/mcs/delegate.cs:517 +#: mcs/mcs/delegate.cs:518 #, csharp-format msgid "" "Cannot create delegate from method `{0}' because it is a member of System." "Nullable type" msgstr "" -#: mcs/mcs/delegate.cs:530 +#: mcs/mcs/delegate.cs:531 #, csharp-format msgid "" "Extension method `{0}' of value type `{1}' cannot be used to create delegates" msgstr "" -#: mcs/mcs/delegate.cs:548 +#: mcs/mcs/delegate.cs:549 #, csharp-format msgid "Cannot create delegate from partial method declaration `{0}'" msgstr "" -#: mcs/mcs/delegate.cs:551 +#: mcs/mcs/delegate.cs:552 #, csharp-format msgid "" "Cannot create delegate with `{0}' because it has a Conditional attribute" msgstr "" -#: mcs/mcs/delegate.cs:599 +#: mcs/mcs/delegate.cs:600 #, csharp-format msgid "" "A method or delegate `{0} {1}' parameters and return type must be same as " "delegate `{2} {3}' parameters and return type" msgstr "" -#: mcs/mcs/delegate.cs:606 +#: mcs/mcs/delegate.cs:607 #, csharp-format msgid "" "A method or delegate `{0}' parameters do not match delegate `{1}' parameters" msgstr "" -#: mcs/mcs/delegate.cs:611 +#: mcs/mcs/delegate.cs:612 #, csharp-format msgid "" "A method or delegate `{0} {1}' return type does not match delegate `{2} {3}' " "return type" msgstr "" -#: mcs/mcs/delegate.cs:787 +#: mcs/mcs/delegate.cs:788 msgid "Method name expected" msgstr "" @@ -1241,223 +1293,223 @@ msgstr "" msgid "The operation in question is undefined on void pointers" msgstr "" -#: mcs/mcs/ecore.cs:473 mcs/mcs/statement.cs:3824 mcs/mcs/statement.cs:3826 +#: mcs/mcs/ecore.cs:473 mcs/mcs/statement.cs:3919 mcs/mcs/statement.cs:3921 #, csharp-format msgid "Internal compiler error: {0}" msgstr "" -#: mcs/mcs/ecore.cs:535 mcs/mcs/expression.cs:7074 mcs/mcs/expression.cs:7082 +#: mcs/mcs/ecore.cs:535 mcs/mcs/expression.cs:7113 mcs/mcs/expression.cs:7121 msgid "A constant value is expected" msgstr "" -#: mcs/mcs/ecore.cs:546 +#: mcs/mcs/ecore.cs:547 msgid "" "An attribute argument must be a constant expression, typeof expression or " "array creation expression" msgstr "" -#: mcs/mcs/ecore.cs:726 +#: mcs/mcs/ecore.cs:550 +#, csharp-format +msgid "" +"Attribute constructor parameter has type `{0}', which is not a valid " +"attribute parameter type" +msgstr "" + +#: mcs/mcs/ecore.cs:732 #, csharp-format msgid "The class `{0}' has no constructors defined" msgstr "" -#: mcs/mcs/ecore.cs:924 +#: mcs/mcs/ecore.cs:930 #, csharp-format msgid "The `{0}' operator cannot be applied to operand of type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:930 +#: mcs/mcs/ecore.cs:936 msgid "An expression tree cannot contain an unsafe pointer operation" msgstr "" -#: mcs/mcs/ecore.cs:1012 +#: mcs/mcs/ecore.cs:1018 #, csharp-format msgid "`{0}' is a `{1}' but a `{2}' was expected" msgstr "" -#: mcs/mcs/ecore.cs:1045 +#: mcs/mcs/ecore.cs:1051 #, csharp-format msgid "Expression denotes a `{0}', where a `{1}' was expected" msgstr "" -#: mcs/mcs/ecore.cs:1055 +#: mcs/mcs/ecore.cs:1061 msgid "Pointers and fixed size buffers may only be used in an unsafe context" msgstr "" -#: mcs/mcs/ecore.cs:2616 +#: mcs/mcs/ecore.cs:2622 #, csharp-format msgid "" "Dynamic keyword requires `{0}' to be defined. Are you missing System.Core." "dll assembly reference?" msgstr "" -#: mcs/mcs/ecore.cs:2692 +#: mcs/mcs/ecore.cs:2698 #, csharp-format msgid "" "A local variable `{0}' cannot be used before it is declared. Consider " "renaming the local variable when it hides the member `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:2707 mcs/mcs/ecore.cs:2750 +#: mcs/mcs/ecore.cs:2713 mcs/mcs/ecore.cs:2756 #, csharp-format msgid "`{0}' conflicts with a declaration in a child block" msgstr "" -#: mcs/mcs/ecore.cs:2759 +#: mcs/mcs/ecore.cs:2774 #, csharp-format msgid "A local variable `{0}' cannot be used before it is declared" msgstr "" -#: mcs/mcs/ecore.cs:2788 -#, csharp-format -msgid "" -"Primary constructor parameter `{0}' is not available in this context when " -"using ref or out modifier" -msgstr "" - -#: mcs/mcs/ecore.cs:2827 +#: mcs/mcs/ecore.cs:2831 #, csharp-format msgid "The name `{0}' does not exist in the current context" msgstr "" -#: mcs/mcs/ecore.cs:2923 +#: mcs/mcs/ecore.cs:2927 msgid "System.Void cannot be used from C#. Consider using `void'" msgstr "" -#: mcs/mcs/ecore.cs:3086 +#: mcs/mcs/ecore.cs:3090 #, csharp-format msgid "" "The type or namespace name `{0}' could not be found in the global namespace. " "Are you missing {1} assembly reference?" msgstr "" -#: mcs/mcs/ecore.cs:3090 +#: mcs/mcs/ecore.cs:3094 #, csharp-format msgid "" "The type or namespace name `{0}' does not exist in the namespace `{1}'. Are " "you missing {2} assembly reference?" msgstr "" -#: mcs/mcs/ecore.cs:3330 +#: mcs/mcs/ecore.cs:3334 #, csharp-format msgid "Cannot call an abstract base member `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3337 +#: mcs/mcs/ecore.cs:3341 #, csharp-format msgid "" "Cannot access protected member `{0}' via a qualifier of type `{1}'. The " "qualifier must be of type `{2}' or derived from it" msgstr "" -#: mcs/mcs/ecore.cs:3362 +#: mcs/mcs/ecore.cs:3366 #, csharp-format msgid "" "Fields of static readonly field `{0}' cannot be assigned to (except in a " "static constructor or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:3365 +#: mcs/mcs/ecore.cs:3369 #, csharp-format msgid "" "Members of readonly field `{0}' cannot be modified (except in a constructor " "or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:3374 +#: mcs/mcs/ecore.cs:3378 #, csharp-format msgid "" "Members of value type `{0}' cannot be assigned using a property `{1}' object " "initializer" msgstr "" -#: mcs/mcs/ecore.cs:3378 +#: mcs/mcs/ecore.cs:3382 #, csharp-format msgid "" "Cannot modify a value type return value of `{0}'. Consider storing the value " "in a temporary variable" msgstr "" -#: mcs/mcs/ecore.cs:3391 +#: mcs/mcs/ecore.cs:3395 #, csharp-format msgid "Cannot assign to members of `{0}' because it is a `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:3417 +#: mcs/mcs/ecore.cs:3421 #, csharp-format msgid "" "Static member `{0}' cannot be accessed with an instance reference, qualify " "it with a type name instead" msgstr "" -#: mcs/mcs/ecore.cs:3432 +#: mcs/mcs/ecore.cs:3436 #, csharp-format msgid "" "A field initializer cannot reference the nonstatic field, method, or " "property `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3438 +#: mcs/mcs/ecore.cs:3442 msgid "Constructor initializer cannot access primary constructor parameters" msgstr "" -#: mcs/mcs/ecore.cs:3440 +#: mcs/mcs/ecore.cs:3444 #, csharp-format msgid "" "An object reference is required to access primary constructor parameter `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3445 +#: mcs/mcs/ecore.cs:3449 #, csharp-format msgid "An object reference is required to access non-static member `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:3456 +#: mcs/mcs/ecore.cs:3460 #, csharp-format msgid "" "Cannot access a nonstatic member of outer type `{0}' via nested type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:3484 +#: mcs/mcs/ecore.cs:3488 msgid "Cannot modify the result of an unboxing conversion" msgstr "" -#: mcs/mcs/ecore.cs:3662 +#: mcs/mcs/ecore.cs:3666 #, csharp-format msgid "" "Type `{0}' does not contain a member `{1}' and the best extension method " "overload `{2}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:3667 +#: mcs/mcs/ecore.cs:3671 #, csharp-format msgid "Extension method instance type `{0}' cannot be converted to `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:3815 +#: mcs/mcs/ecore.cs:3819 msgid "An expression tree cannot contain an expression with method group" msgstr "" -#: mcs/mcs/ecore.cs:3821 +#: mcs/mcs/ecore.cs:3825 msgid "" "Partial methods with only a defining declaration or removed conditional " "methods cannot be used in an expression tree" msgstr "" -#: mcs/mcs/ecore.cs:3853 +#: mcs/mcs/ecore.cs:3857 #, csharp-format msgid "" "Cannot convert method group `{0}' to non-delegate type `{1}'. Consider using " "parentheses to invoke the method" msgstr "" -#: mcs/mcs/ecore.cs:4584 +#: mcs/mcs/ecore.cs:4596 #, csharp-format msgid "" "The type `{0}' does not contain a constructor that takes `{1}' arguments" msgstr "" -#: mcs/mcs/ecore.cs:5274 +#: mcs/mcs/ecore.cs:5297 #, csharp-format msgid "" "Type `{0}' does not contain a member `{1}' and the best extension method " @@ -1465,200 +1517,200 @@ msgid "" "without the extension method syntax" msgstr "" -#: mcs/mcs/ecore.cs:5313 +#: mcs/mcs/ecore.cs:5336 #, csharp-format msgid "" "The call is ambiguous between the following methods or properties: `{0}' and " "`{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5376 +#: mcs/mcs/ecore.cs:5399 #, csharp-format msgid "" "The best overloaded collection initalizer method `{0}' cannot have `ref' or " "`out' modifier" msgstr "" -#: mcs/mcs/ecore.cs:5380 +#: mcs/mcs/ecore.cs:5403 #, csharp-format msgid "" "The best overloaded collection initalizer method `{0}' has some invalid " "arguments" msgstr "" -#: mcs/mcs/ecore.cs:5383 +#: mcs/mcs/ecore.cs:5406 #, csharp-format msgid "Delegate `{0}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:5387 +#: mcs/mcs/ecore.cs:5410 #, csharp-format msgid "The best overloaded method match for `{0}' has some invalid arguments" msgstr "" -#: mcs/mcs/ecore.cs:5396 +#: mcs/mcs/ecore.cs:5419 #, csharp-format msgid "" "Argument `#{0}' does not require `{1}' modifier. Consider removing `{1}' " "modifier" msgstr "" -#: mcs/mcs/ecore.cs:5399 +#: mcs/mcs/ecore.cs:5422 #, csharp-format msgid "Argument `#{0}' is missing `{1}' modifier" msgstr "" -#: mcs/mcs/ecore.cs:5416 +#: mcs/mcs/ecore.cs:5439 #, csharp-format msgid "Argument `#{0}' cannot convert `{1}' expression to type `{2}'" msgstr "" -#: mcs/mcs/ecore.cs:5468 +#: mcs/mcs/ecore.cs:5491 #, csharp-format msgid "" "The type arguments for method `{0}' cannot be inferred from the usage. Try " "specifying the type arguments explicitly" msgstr "" -#: mcs/mcs/ecore.cs:5497 +#: mcs/mcs/ecore.cs:5520 #, csharp-format msgid "No overload for method `{0}' takes `{1}' arguments" msgstr "" -#: mcs/mcs/ecore.cs:5586 +#: mcs/mcs/ecore.cs:5613 #, csharp-format msgid "The delegate `{0}' does not contain a parameter named `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5591 +#: mcs/mcs/ecore.cs:5618 #, csharp-format msgid "" "The best overloaded method match for `{0}' does not contain a parameter " "named `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:5601 +#: mcs/mcs/ecore.cs:5628 #, csharp-format msgid "" "Named argument `{0}' cannot be used for a parameter which has positional " "argument specified" msgstr "" -#: mcs/mcs/ecore.cs:5940 +#: mcs/mcs/ecore.cs:5967 msgid "" "You cannot use fixed size buffers contained in unfixed expressions. Try " "using the fixed statement" msgstr "" -#: mcs/mcs/ecore.cs:5945 +#: mcs/mcs/ecore.cs:5972 #, csharp-format msgid "`{0}': Fixed size buffers can only be accessed through locals or fields" msgstr "" -#: mcs/mcs/ecore.cs:6019 +#: mcs/mcs/ecore.cs:6046 #, csharp-format msgid "" "A static readonly field `{0}' cannot be passed ref or out (except in a " "static constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6022 +#: mcs/mcs/ecore.cs:6049 #, csharp-format msgid "" "A readonly field `{0}' cannot be passed ref or out (except in a constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6036 +#: mcs/mcs/ecore.cs:6063 #, csharp-format msgid "" "Fields of static readonly field `{0}' cannot be passed ref or out (except in " "a static constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6039 +#: mcs/mcs/ecore.cs:6066 #, csharp-format msgid "" "Members of readonly field `{0}' cannot be passed ref or out (except in a " "constructor)" msgstr "" -#: mcs/mcs/ecore.cs:6046 +#: mcs/mcs/ecore.cs:6073 #, csharp-format msgid "" "A static readonly field `{0}' cannot be assigned to (except in a static " "constructor or a variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:6049 +#: mcs/mcs/ecore.cs:6076 #, csharp-format msgid "" "A readonly field `{0}' cannot be assigned to (except in a constructor or a " "variable initializer)" msgstr "" -#: mcs/mcs/ecore.cs:6113 +#: mcs/mcs/ecore.cs:6140 #, csharp-format msgid "Use of possibly unassigned field `{0}'" msgstr "" -#: mcs/mcs/ecore.cs:6470 +#: mcs/mcs/ecore.cs:6502 #, csharp-format msgid "Property or event `{0}' is not supported by the C# language" msgstr "" -#: mcs/mcs/ecore.cs:6666 +#: mcs/mcs/ecore.cs:6698 #, csharp-format msgid "A range variable `{0}' may not be passes as `ref' or `out' parameter" msgstr "" -#: mcs/mcs/ecore.cs:6741 +#: mcs/mcs/ecore.cs:6773 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because it " "lacks the `get' accessor" msgstr "" -#: mcs/mcs/ecore.cs:6748 +#: mcs/mcs/ecore.cs:6780 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because the get " "accessor is inaccessible" msgstr "" -#: mcs/mcs/ecore.cs:6767 +#: mcs/mcs/ecore.cs:6799 #, csharp-format msgid "Property or indexer `{0}' cannot be assigned to (it is read-only)" msgstr "" -#: mcs/mcs/ecore.cs:6775 +#: mcs/mcs/ecore.cs:6807 #, csharp-format msgid "" "The property or indexer `{0}' cannot be used in this context because the set " "accessor is inaccessible" msgstr "" -#: mcs/mcs/ecore.cs:6943 +#: mcs/mcs/ecore.cs:6975 #, csharp-format msgid "" "The event `{0}' can only appear on the left hand side of `+=' or `-=' " "operator" msgstr "" -#: mcs/mcs/ecore.cs:6947 +#: mcs/mcs/ecore.cs:6979 #, csharp-format msgid "" "The event `{0}' can only appear on the left hand side of += or -= when used " "outside of the type `{1}'" msgstr "" -#: mcs/mcs/ecore.cs:7119 +#: mcs/mcs/ecore.cs:7151 #, csharp-format msgid "" "An implicitly typed local variable declaration cannot be initialized with " "`{0}'" msgstr "" -#: mcs/mcs/ecore.cs:7133 +#: mcs/mcs/ecore.cs:7165 msgid "" "The contextual keyword `var' may only appear within a local variable " "declaration" @@ -1680,294 +1732,301 @@ msgstr "" msgid "Type byte, sbyte, short, ushort, int, uint, long or ulong expected" msgstr "" -#: mcs/mcs/eval.cs:587 +#: mcs/mcs/eval.cs:628 msgid "Detection Parsing Error" msgstr "" -#: mcs/mcs/expression.cs:605 +#: mcs/mcs/expression.cs:608 #, csharp-format msgid "Operator `{0}' is ambiguous on an operand of type `{1}'" msgstr "" -#: mcs/mcs/expression.cs:699 +#: mcs/mcs/expression.cs:702 msgid "Cannot take the address of the given expression" msgstr "" -#: mcs/mcs/expression.cs:722 +#: mcs/mcs/expression.cs:725 msgid "" "You can only take the address of unfixed expression inside of a fixed " "statement initializer" msgstr "" -#: mcs/mcs/expression.cs:966 +#: mcs/mcs/expression.cs:969 msgid "The * or -> operator must be applied to a pointer" msgstr "" -#: mcs/mcs/expression.cs:1189 +#: mcs/mcs/expression.cs:1192 msgid "" "The operand of an increment or decrement operator must be a variable, " "property or indexer" msgstr "" -#: mcs/mcs/expression.cs:1432 +#: mcs/mcs/expression.cs:1435 #, csharp-format -msgid "The `{0}' operator cannot be applied to an operand of a static type" +msgid "The second operand of `is' or `as' operator cannot be static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1437 +#: mcs/mcs/expression.cs:1441 #, csharp-format msgid "The `{0}' operator cannot be applied to an operand of pointer type" msgstr "" -#: mcs/mcs/expression.cs:1443 +#: mcs/mcs/expression.cs:1447 #, csharp-format msgid "" -"The `{0}' operator cannot be applied to a lambda expression or anonymous " -"method" +"The `{0}' operator cannot be applied to a lambda expression, anonymous " +"method, or method group" msgstr "" -#: mcs/mcs/expression.cs:1735 +#: mcs/mcs/expression.cs:1747 #, csharp-format msgid "" "The `as' operator cannot be used with a non-reference type parameter `{0}'. " "Consider adding `class' or a reference type constraint" msgstr "" -#: mcs/mcs/expression.cs:1739 +#: mcs/mcs/expression.cs:1751 #, csharp-format msgid "The `as' operator cannot be used with a non-nullable value type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1773 +#: mcs/mcs/expression.cs:1785 #, csharp-format msgid "Cannot convert type `{0}' to `{1}' via a built-in conversion" msgstr "" -#: mcs/mcs/expression.cs:1814 +#: mcs/mcs/expression.cs:1826 #, csharp-format msgid "Cannot convert to static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:1924 +#: mcs/mcs/expression.cs:1936 msgid "" "The `default value' operator cannot be applied to an operand of a static type" msgstr "" -#: mcs/mcs/expression.cs:2601 +#: mcs/mcs/expression.cs:2613 #, csharp-format msgid "Operator `{0}' cannot be applied to operands of type `{1}' and `{2}'" msgstr "" -#: mcs/mcs/expression.cs:3396 +#: mcs/mcs/expression.cs:3408 msgid "To cast a negative value, you must enclose the value in parentheses" msgstr "" -#: mcs/mcs/expression.cs:5067 +#: mcs/mcs/expression.cs:3501 +#, csharp-format +msgid "" +"Expression must be implicitly convertible to Boolean or its type `{0}' must " +"define operator `{1}'" +msgstr "" + +#: mcs/mcs/expression.cs:5084 #, csharp-format msgid "" "A user-defined operator `{0}' must have each parameter type and return type " "of the same type in order to be applicable as a short circuit operator" msgstr "" -#: mcs/mcs/expression.cs:5077 +#: mcs/mcs/expression.cs:5094 #, csharp-format msgid "" "The type `{0}' must have operator `true' and operator `false' defined when " "`{1}' is used as a short circuit operator" msgstr "" -#: mcs/mcs/expression.cs:5452 +#: mcs/mcs/expression.cs:5469 #, csharp-format msgid "" "Type of conditional expression cannot be determined as `{0}' and `{1}' " "convert implicitly to each other" msgstr "" -#: mcs/mcs/expression.cs:5464 +#: mcs/mcs/expression.cs:5481 #, csharp-format msgid "" "Type of conditional expression cannot be determined because there is no " "implicit conversion between `{0}' and `{1}'" msgstr "" -#: mcs/mcs/expression.cs:5796 +#: mcs/mcs/expression.cs:5813 #, csharp-format msgid "Use of unassigned local variable `{0}'" msgstr "" -#: mcs/mcs/expression.cs:5816 +#: mcs/mcs/expression.cs:5833 #, csharp-format msgid "" "Cannot use fixed local `{0}' inside an anonymous method, lambda expression " "or query expression" msgstr "" -#: mcs/mcs/expression.cs:6001 +#: mcs/mcs/expression.cs:6018 #, csharp-format msgid "" "Parameter `{0}' cannot be used inside `{1}' when using `ref' or `out' " "modifier" msgstr "" -#: mcs/mcs/expression.cs:6071 +#: mcs/mcs/expression.cs:6088 #, csharp-format msgid "Use of unassigned out parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6233 +#: mcs/mcs/expression.cs:6271 #, csharp-format msgid "Cannot invoke a non-delegate type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6244 +#: mcs/mcs/expression.cs:6282 #, csharp-format msgid "The member `{0}' cannot be used as method or delegate" msgstr "" -#: mcs/mcs/expression.cs:6264 +#: mcs/mcs/expression.cs:6302 msgid "" "Do not directly call your base class Finalize method. It is called " "automatically from your destructor" msgstr "" -#: mcs/mcs/expression.cs:6266 +#: mcs/mcs/expression.cs:6304 msgid "" "Destructors and object.Finalize cannot be called directly. Consider calling " "IDisposable.Dispose if available" msgstr "" -#: mcs/mcs/expression.cs:6295 +#: mcs/mcs/expression.cs:6333 #, csharp-format msgid "" "The base call to method `{0}' cannot be dynamically dispatched. Consider " "casting the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:6379 +#: mcs/mcs/expression.cs:6418 #, csharp-format msgid "`{0}': cannot explicitly call operator or accessor" msgstr "" -#: mcs/mcs/expression.cs:6566 +#: mcs/mcs/expression.cs:6605 #, csharp-format msgid "Unsafe type `{0}' cannot be used in an object creation expression" msgstr "" -#: mcs/mcs/expression.cs:6589 +#: mcs/mcs/expression.cs:6628 #, csharp-format msgid "" "Cannot create an instance of the variable type `{0}' because it does not " "have the new() constraint" msgstr "" -#: mcs/mcs/expression.cs:6595 +#: mcs/mcs/expression.cs:6634 #, csharp-format msgid "" "`{0}': cannot provide arguments when creating an instance of a variable type" msgstr "" -#: mcs/mcs/expression.cs:6604 +#: mcs/mcs/expression.cs:6643 #, csharp-format msgid "Cannot create an instance of the static class `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6616 +#: mcs/mcs/expression.cs:6655 #, csharp-format msgid "Cannot create an instance of the abstract class or interface `{0}'" msgstr "" -#: mcs/mcs/expression.cs:6925 +#: mcs/mcs/expression.cs:6964 msgid "" "An implicitly typed local variable declarator cannot use an array initializer" msgstr "" -#: mcs/mcs/expression.cs:7088 mcs/mcs/expression.cs:7113 +#: mcs/mcs/expression.cs:7127 mcs/mcs/expression.cs:7152 #, csharp-format msgid "An array initializer of length `{0}' was expected" msgstr "" -#: mcs/mcs/expression.cs:7104 +#: mcs/mcs/expression.cs:7143 msgid "" "Array initializers can only be used in a variable or field initializer. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:7121 +#: mcs/mcs/expression.cs:7160 msgid "A nested array initializer was expected" msgstr "" -#: mcs/mcs/expression.cs:7168 +#: mcs/mcs/expression.cs:7207 msgid "An expression tree cannot contain a multidimensional array initializer" msgstr "" -#: mcs/mcs/expression.cs:7204 +#: mcs/mcs/expression.cs:7243 msgid "Cannot create an array with a negative size" msgstr "" -#: mcs/mcs/expression.cs:7296 +#: mcs/mcs/expression.cs:7335 msgid "" "Can only use array initializer expressions to assign to array types. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:7718 +#: mcs/mcs/expression.cs:7759 msgid "" "The type of an implicitly typed array cannot be inferred from the " "initializer. Try specifying array type explicitly" msgstr "" -#: mcs/mcs/expression.cs:7859 +#: mcs/mcs/expression.cs:7914 msgid "" "The `this' object cannot be used before all of its fields are assigned to" msgstr "" -#: mcs/mcs/expression.cs:7865 +#: mcs/mcs/expression.cs:7920 msgid "" "Keyword `this' is not valid in a static property, static method, or static " "field initializer" msgstr "" -#: mcs/mcs/expression.cs:7868 +#: mcs/mcs/expression.cs:7923 msgid "" "Anonymous methods inside structs cannot access instance members of `this'. " "Consider copying `this' to a local variable outside the anonymous method and " "using the local instead" msgstr "" -#: mcs/mcs/expression.cs:7871 +#: mcs/mcs/expression.cs:7926 msgid "Keyword `this' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:7947 +#: mcs/mcs/expression.cs:8002 msgid "Cannot take the address of `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:7949 +#: mcs/mcs/expression.cs:8004 msgid "Cannot pass `this' as a ref or out argument because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:7951 +#: mcs/mcs/expression.cs:8006 msgid "Cannot assign to `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:8019 +#: mcs/mcs/expression.cs:8074 msgid "The __arglist construct is valid only within a variable argument method" msgstr "" -#: mcs/mcs/expression.cs:8080 +#: mcs/mcs/expression.cs:8135 msgid "An expression tree cannot contain a method with variable arguments" msgstr "" -#: mcs/mcs/expression.cs:8348 +#: mcs/mcs/expression.cs:8403 msgid "The typeof operator cannot be used on the dynamic type" msgstr "" -#: mcs/mcs/expression.cs:8389 +#: mcs/mcs/expression.cs:8444 #, csharp-format msgid "`{0}': an attribute argument cannot use type parameters" msgstr "" -#: mcs/mcs/expression.cs:8604 +#: mcs/mcs/expression.cs:8659 #, csharp-format msgid "" "`{0}' does not have a predefined size, therefore sizeof can only be used in " @@ -1975,158 +2034,158 @@ msgid "" "SizeOf)" msgstr "" -#: mcs/mcs/expression.cs:8671 +#: mcs/mcs/expression.cs:8726 #, csharp-format msgid "Alias `{0}' not found" msgstr "" -#: mcs/mcs/expression.cs:8697 +#: mcs/mcs/expression.cs:8752 msgid "" "The namespace alias qualifier `::' cannot be used to invoke a method. " "Consider using `.' instead" msgstr "" -#: mcs/mcs/expression.cs:8787 +#: mcs/mcs/expression.cs:8842 msgid "Cannot perform member binding on `null' value" msgstr "" -#: mcs/mcs/expression.cs:8918 +#: mcs/mcs/expression.cs:8973 #, csharp-format msgid "" "`{0}': cannot reference a type through an expression. Consider using `{1}' " "instead" msgstr "" -#: mcs/mcs/expression.cs:8987 +#: mcs/mcs/expression.cs:9042 #, csharp-format msgid "A nested type cannot be specified through a type parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:8995 +#: mcs/mcs/expression.cs:9050 #, csharp-format msgid "" "Alias `{0}' cannot be used with `::' since it denotes a type. Consider " "replacing `::' with `.'" msgstr "" -#: mcs/mcs/expression.cs:9060 +#: mcs/mcs/expression.cs:9117 #, csharp-format msgid "The nested type `{0}' does not exist in the type `{1}'" msgstr "" -#: mcs/mcs/expression.cs:9084 +#: mcs/mcs/expression.cs:9141 #, csharp-format msgid "" "Type `{0}' does not contain a definition for `{1}' and no extension method " "`{1}' of type `{0}' could be found. Are you missing {2}?" msgstr "" -#: mcs/mcs/expression.cs:9312 +#: mcs/mcs/expression.cs:9369 #, csharp-format msgid "Cannot apply indexing with [] to an expression of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:9330 +#: mcs/mcs/expression.cs:9387 msgid "A pointer must be indexed by only one value" msgstr "" -#: mcs/mcs/expression.cs:9386 +#: mcs/mcs/expression.cs:9443 msgid "An element access expression cannot use named argument" msgstr "" -#: mcs/mcs/expression.cs:9470 +#: mcs/mcs/expression.cs:9531 #, csharp-format msgid "Wrong number of indexes `{0}' inside [], expected `{1}'" msgstr "" -#: mcs/mcs/expression.cs:9870 +#: mcs/mcs/expression.cs:9932 msgid "" "The indexer base access cannot be dynamically dispatched. Consider casting " "the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:9955 +#: mcs/mcs/expression.cs:10017 msgid "An expression tree may not contain a base access" msgstr "" -#: mcs/mcs/expression.cs:9973 +#: mcs/mcs/expression.cs:10035 msgid "Keyword `base' is not available in a static method" msgstr "" -#: mcs/mcs/expression.cs:9975 +#: mcs/mcs/expression.cs:10037 msgid "Keyword `base' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:10013 +#: mcs/mcs/expression.cs:10075 msgid "" "A property, indexer or dynamic member access may not be passed as `ref' or " "`out' parameter" msgstr "" -#: mcs/mcs/expression.cs:10351 +#: mcs/mcs/expression.cs:10413 #, csharp-format msgid "Array elements cannot be of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:10354 +#: mcs/mcs/expression.cs:10416 #, csharp-format msgid "Array elements cannot be of static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:10530 +#: mcs/mcs/expression.cs:10592 msgid "Cannot use a negative size with stackalloc" msgstr "" -#: mcs/mcs/expression.cs:10534 +#: mcs/mcs/expression.cs:10596 msgid "Cannot use stackalloc in finally or catch" msgstr "" -#: mcs/mcs/expression.cs:10651 +#: mcs/mcs/expression.cs:10716 #, csharp-format msgid "" "Member `{0}' cannot be initialized. An object initializer may only be used " "for fields, or properties" msgstr "" -#: mcs/mcs/expression.cs:10660 +#: mcs/mcs/expression.cs:10724 #, csharp-format msgid "" "Static field or property `{0}' cannot be assigned in an object initializer" msgstr "" -#: mcs/mcs/expression.cs:10867 +#: mcs/mcs/expression.cs:10931 #, csharp-format msgid "" "A field or property `{0}' cannot be initialized with a collection object " "initializer because type `{1}' does not implement `{2}' interface" msgstr "" -#: mcs/mcs/expression.cs:10878 +#: mcs/mcs/expression.cs:10942 #, csharp-format msgid "Inconsistent `{0}' member declaration" msgstr "" -#: mcs/mcs/expression.cs:10886 +#: mcs/mcs/expression.cs:10950 #, csharp-format msgid "" "An object initializer includes more than one member `{0}' initialization" msgstr "" -#: mcs/mcs/expression.cs:10904 +#: mcs/mcs/expression.cs:10968 #, csharp-format msgid "Cannot initialize object of type `{0}' with a collection initializer" msgstr "" -#: mcs/mcs/expression.cs:11047 +#: mcs/mcs/expression.cs:11113 msgid "" "Object and collection initializers cannot be used to instantiate a delegate" msgstr "" -#: mcs/mcs/expression.cs:11219 +#: mcs/mcs/expression.cs:11301 msgid "Anonymous types cannot be used in this expression" msgstr "" -#: mcs/mcs/expression.cs:11313 +#: mcs/mcs/expression.cs:11395 #, csharp-format msgid "An anonymous type property `{0}' cannot be initialized with `{1}'" msgstr "" @@ -2197,7 +2256,7 @@ msgstr "" msgid "`{0}': A field cannot be both volatile and readonly" msgstr "" -#: mcs/mcs/flowanalysis.cs:144 +#: mcs/mcs/flowanalysis.cs:148 #, csharp-format msgid "" "An automatically implemented property `{0}' must be fully assigned before " @@ -2205,7 +2264,7 @@ msgid "" "contructor from a constructor initializer" msgstr "" -#: mcs/mcs/flowanalysis.cs:148 +#: mcs/mcs/flowanalysis.cs:156 #, csharp-format msgid "" "Field `{0}' must be fully assigned before control leaves the constructor" @@ -2281,61 +2340,61 @@ msgid "" "`{0}' is not a valid constraint. Static classes cannot be used as constraints" msgstr "" -#: mcs/mcs/generic.cs:689 +#: mcs/mcs/generic.cs:694 #, csharp-format msgid "The {2} type parameter `{0}' must be {3} valid on `{1}{4}'" msgstr "" -#: mcs/mcs/generic.cs:2188 +#: mcs/mcs/generic.cs:2205 #, csharp-format msgid "`{0}': static classes cannot be used as generic arguments" msgstr "" -#: mcs/mcs/generic.cs:2195 +#: mcs/mcs/generic.cs:2212 #, csharp-format msgid "The type `{0}' may not be used as a type argument" msgstr "" -#: mcs/mcs/generic.cs:2289 +#: mcs/mcs/generic.cs:2306 msgid "Variant type parameters can only be used with interfaces and delegates" msgstr "" -#: mcs/mcs/generic.cs:2358 +#: mcs/mcs/generic.cs:2375 #, csharp-format msgid "" "Partial method declarations of `{0}' have inconsistent constraints for type " "parameter `{1}'" msgstr "" -#: mcs/mcs/generic.cs:2374 +#: mcs/mcs/generic.cs:2391 #, csharp-format msgid "" "Partial declarations of `{0}' have inconsistent constraints for type " "parameter `{1}'" msgstr "" -#: mcs/mcs/generic.cs:2558 +#: mcs/mcs/generic.cs:2575 #, csharp-format msgid "" "The type `{0}' must be a reference type in order to use it as type parameter " "`{1}' in the generic type or method `{2}'" msgstr "" -#: mcs/mcs/generic.cs:2568 +#: mcs/mcs/generic.cs:2585 #, csharp-format msgid "" "The type `{0}' must be a non-nullable value type in order to use it as type " "parameter `{1}' in the generic type or method `{2}'" msgstr "" -#: mcs/mcs/generic.cs:2629 +#: mcs/mcs/generic.cs:2646 #, csharp-format msgid "" "The type `{0}' must have a public parameterless constructor in order to use " "it as parameter `{1}' in the generic type or method `{2}'" msgstr "" -#: mcs/mcs/generic.cs:2685 +#: mcs/mcs/generic.cs:2702 #, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2343,7 +2402,7 @@ msgid "" "`{3}'" msgstr "" -#: mcs/mcs/generic.cs:2691 +#: mcs/mcs/generic.cs:2708 #, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " @@ -2351,63 +2410,63 @@ msgid "" "`{3}'" msgstr "" -#: mcs/mcs/generic.cs:2695 +#: mcs/mcs/generic.cs:2712 #, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " "method `{2}'. The nullable type `{0}' does not satisfy constraint `{3}'" msgstr "" -#: mcs/mcs/generic.cs:2700 +#: mcs/mcs/generic.cs:2717 #, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " "method `{2}'. There is no boxing conversion from `{0}' to `{3}'" msgstr "" -#: mcs/mcs/generic.cs:2705 +#: mcs/mcs/generic.cs:2722 #, csharp-format msgid "" "The type `{0}' cannot be used as type parameter `{1}' in the generic type or " "method `{2}'. There is no implicit reference conversion from `{0}' to `{3}'" msgstr "" -#: mcs/mcs/iterators.cs:98 +#: mcs/mcs/iterators.cs:101 msgid "The yield statement cannot be used inside anonymous method blocks" msgstr "" -#: mcs/mcs/iterators.cs:103 +#: mcs/mcs/iterators.cs:106 msgid "Cannot yield in the body of a finally clause" msgstr "" -#: mcs/mcs/iterators.cs:116 +#: mcs/mcs/iterators.cs:119 msgid "Cannot yield a value in the body of a try block with a catch clause" msgstr "" -#: mcs/mcs/iterators.cs:120 +#: mcs/mcs/iterators.cs:123 msgid "Cannot yield a value in the body of a catch clause" msgstr "" -#: mcs/mcs/iterators.cs:1188 +#: mcs/mcs/iterators.cs:1183 #, csharp-format msgid "" "The body of `{0}' cannot be an iterator block because `{1}' is not an " "iterator interface type" msgstr "" -#: mcs/mcs/iterators.cs:1201 +#: mcs/mcs/iterators.cs:1196 msgid "Iterators cannot have ref or out parameters" msgstr "" -#: mcs/mcs/iterators.cs:1207 +#: mcs/mcs/iterators.cs:1202 msgid "__arglist is not allowed in parameter list of iterators" msgstr "" -#: mcs/mcs/iterators.cs:1213 +#: mcs/mcs/iterators.cs:1208 msgid "Iterators cannot have unsafe parameters or yield types" msgstr "" -#: mcs/mcs/iterators.cs:1219 mcs/mcs/statement.cs:5931 +#: mcs/mcs/iterators.cs:1214 mcs/mcs/statement.cs:6093 msgid "Unsafe code may not appear in iterators" msgstr "" @@ -2530,63 +2589,63 @@ msgid "" "suffix `{1}' to create a literal of this type" msgstr "" -#: mcs/mcs/membercache.cs:1409 +#: mcs/mcs/membercache.cs:1412 msgid "" "A partial method declaration and partial method implementation cannot differ " "on use of `params' modifier" msgstr "" -#: mcs/mcs/membercache.cs:1412 +#: mcs/mcs/membercache.cs:1415 msgid "" "A partial method declaration and partial method implementation must be both " "an extension method or neither" msgstr "" -#: mcs/mcs/membercache.cs:1416 +#: mcs/mcs/membercache.cs:1419 #, csharp-format msgid "" "Overloaded contructor `{0}' cannot differ on use of parameter modifiers only" msgstr "" -#: mcs/mcs/membercache.cs:1420 +#: mcs/mcs/membercache.cs:1423 #, csharp-format msgid "" "Overloaded method `{0}' cannot differ on use of parameter modifiers only" msgstr "" -#: mcs/mcs/membercache.cs:1452 +#: mcs/mcs/membercache.cs:1455 msgid "" "A partial method declaration and partial method implementation must be both " "`static' or neither" msgstr "" -#: mcs/mcs/membercache.cs:1458 +#: mcs/mcs/membercache.cs:1461 msgid "" "A partial method declaration and partial method implementation must be both " "`unsafe' or neither" msgstr "" -#: mcs/mcs/membercache.cs:1466 +#: mcs/mcs/membercache.cs:1469 #, csharp-format msgid "A partial method `{0}' declaration is already defined" msgstr "" -#: mcs/mcs/membercache.cs:1470 +#: mcs/mcs/membercache.cs:1473 #, csharp-format msgid "A partial method `{0}' implementation is already defined" msgstr "" -#: mcs/mcs/membercache.cs:1481 mcs/mcs/property.cs:81 +#: mcs/mcs/membercache.cs:1484 mcs/mcs/property.cs:81 #, csharp-format msgid "A member `{0}' is already reserved" msgstr "" -#: mcs/mcs/membercache.cs:1492 +#: mcs/mcs/membercache.cs:1495 #, csharp-format msgid "Duplicate user-defined conversion in type `{0}'" msgstr "" -#: mcs/mcs/membercache.cs:1498 +#: mcs/mcs/membercache.cs:1501 #, csharp-format msgid "" "A member `{0}' is already defined. Rename this member or use different " @@ -2604,64 +2663,70 @@ msgid "" "`extern'" msgstr "" -#: mcs/mcs/method.cs:665 +#: mcs/mcs/method.cs:569 +msgid "" +"The DllImport attribute cannot be applied to a method that is generic or " +"contained in a generic type" +msgstr "" + +#: mcs/mcs/method.cs:671 #, csharp-format msgid "`{0}': A partial method parameters cannot use `out' modifier" msgstr "" -#: mcs/mcs/method.cs:729 +#: mcs/mcs/method.cs:740 #, csharp-format msgid "" "Conditional not valid on `{0}' because it is a constructor, destructor, " "operator or explicit interface implementation" msgstr "" -#: mcs/mcs/method.cs:899 +#: mcs/mcs/method.cs:910 msgid "" "A partial method cannot define access modifier or any of abstract, extern, " "new, override, sealed, or virtual modifiers" msgstr "" -#: mcs/mcs/method.cs:905 +#: mcs/mcs/method.cs:916 msgid "" "A partial method must be declared within a partial class or partial struct" msgstr "" -#: mcs/mcs/method.cs:910 +#: mcs/mcs/method.cs:921 #, csharp-format msgid "`{0}': Extension methods must be declared static" msgstr "" -#: mcs/mcs/method.cs:926 +#: mcs/mcs/method.cs:937 #, csharp-format msgid "Program `{0}' has more than one entry point defined: `{1}'" msgstr "" -#: mcs/mcs/method.cs:969 +#: mcs/mcs/method.cs:980 #, csharp-format msgid "Conditional not valid on `{0}' because it is an override method" msgstr "" -#: mcs/mcs/method.cs:974 +#: mcs/mcs/method.cs:985 #, csharp-format msgid "Conditional not valid on `{0}' because its return type is not void" msgstr "" -#: mcs/mcs/method.cs:979 +#: mcs/mcs/method.cs:990 msgid "Conditional not valid on interface members" msgstr "" -#: mcs/mcs/method.cs:985 +#: mcs/mcs/method.cs:996 #, csharp-format msgid "Conditional member `{0}' cannot implement interface member `{1}'" msgstr "" -#: mcs/mcs/method.cs:992 +#: mcs/mcs/method.cs:1003 #, csharp-format msgid "Conditional method `{0}' cannot have an out parameter" msgstr "" -#: mcs/mcs/method.cs:1180 +#: mcs/mcs/method.cs:1191 #, csharp-format msgid "" "The constraints for type parameter `{0}' of method `{1}' must match the " @@ -2669,16 +2734,16 @@ msgid "" "using an explicit interface implementation instead" msgstr "" -#: mcs/mcs/method.cs:1235 +#: mcs/mcs/method.cs:1246 msgid "The return type of an async method must be void, Task, or Task" msgstr "" -#: mcs/mcs/method.cs:1252 +#: mcs/mcs/method.cs:1263 #, csharp-format msgid "`{0}': Extension methods cannot be defined in a nested class" msgstr "" -#: mcs/mcs/method.cs:1258 +#: mcs/mcs/method.cs:1269 #, csharp-format msgid "" "`{0}': Extension methods require `System.Runtime.CompilerServices." @@ -2686,184 +2751,185 @@ msgid "" "reference?" msgstr "" -#: mcs/mcs/method.cs:1267 +#: mcs/mcs/method.cs:1278 #, csharp-format msgid "`{0}': Extension methods must be defined in a non-generic static class" msgstr "" -#: mcs/mcs/method.cs:1283 +#: mcs/mcs/method.cs:1294 #, csharp-format msgid "`{0}': an entry point cannot be async method" msgstr "" -#: mcs/mcs/method.cs:1333 +#: mcs/mcs/method.cs:1350 #, csharp-format msgid "" "A partial method `{0}' implementation is missing a partial method declaration" msgstr "" -#: mcs/mcs/method.cs:1371 +#: mcs/mcs/method.cs:1382 #, csharp-format msgid "Method or delegate cannot return type `{0}'" msgstr "" -#: mcs/mcs/method.cs:1449 +#: mcs/mcs/method.cs:1483 msgid "" "The constructor call cannot be dynamically dispatched within constructor " "initializer" msgstr "" -#: mcs/mcs/method.cs:1463 +#: mcs/mcs/method.cs:1497 #, csharp-format msgid "`{0}': Struct constructors cannot call base constructors" msgstr "" -#: mcs/mcs/method.cs:1481 +#: mcs/mcs/method.cs:1515 #, csharp-format msgid "Constructor `{0}' cannot call itself" msgstr "" -#: mcs/mcs/method.cs:1633 +#: mcs/mcs/method.cs:1666 #, csharp-format msgid "`{0}': The static constructor must be parameterless" msgstr "" -#: mcs/mcs/method.cs:1654 +#: mcs/mcs/method.cs:1687 msgid "Structs cannot contain explicit parameterless constructors" msgstr "" -#: mcs/mcs/method.cs:1680 +#: mcs/mcs/method.cs:1713 #, csharp-format msgid "" -"`{0}': Structs with primary constructor cannot have explicit constructor" +"`{0}': Structs with primary constructor cannot specify default constructor " +"initializer" msgstr "" -#: mcs/mcs/method.cs:1683 +#: mcs/mcs/method.cs:1716 #, csharp-format msgid "" "`{0}': Instance constructor of type with primary constructor must specify " "`this' constructor initializer" msgstr "" -#: mcs/mcs/method.cs:1719 +#: mcs/mcs/method.cs:1752 #, csharp-format msgid "" "`{0}': A class with the ComImport attribute cannot have a user-defined " "constructor" msgstr "" -#: mcs/mcs/method.cs:1971 +#: mcs/mcs/method.cs:2004 #, csharp-format msgid "`{0}' is an accessor not found in interface member `{1}{2}'" msgstr "" -#: mcs/mcs/method.cs:1977 +#: mcs/mcs/method.cs:2010 #, csharp-format msgid "" "`{0}.{1}' in explicit interface declaration is not a member of interface" msgstr "" -#: mcs/mcs/method.cs:1985 +#: mcs/mcs/method.cs:2018 #, csharp-format msgid "" "`{0}' explicit method implementation cannot implement `{1}' because it is an " "accessor" msgstr "" -#: mcs/mcs/method.cs:1995 +#: mcs/mcs/method.cs:2028 #, csharp-format msgid "Method `{0}' cannot implement interface accessor `{1}'" msgstr "" -#: mcs/mcs/method.cs:2002 +#: mcs/mcs/method.cs:2035 #, csharp-format msgid "" "Accessor `{0}' cannot implement interface member `{1}' for type `{2}'. Use " "an explicit interface implementation" msgstr "" -#: mcs/mcs/method.cs:2009 +#: mcs/mcs/method.cs:2042 #, csharp-format msgid "" "Accessor `{0}' must be declared public to implement interface member `{1}'" msgstr "" -#: mcs/mcs/method.cs:2029 +#: mcs/mcs/method.cs:2062 #, csharp-format msgid "" "`{0}': the explicit interface implementation cannot introduce the params " "modifier" msgstr "" -#: mcs/mcs/method.cs:2370 +#: mcs/mcs/method.cs:2403 #, csharp-format msgid "" "Attribute `{0}' is not valid on property or event accessors. It is valid on " "`{1}' declarations only" msgstr "" -#: mcs/mcs/method.cs:2603 +#: mcs/mcs/method.cs:2636 #, csharp-format msgid "User-defined operator `{0}' must be declared static and public" msgstr "" -#: mcs/mcs/method.cs:2647 +#: mcs/mcs/method.cs:2680 msgid "" "User-defined operator cannot take an object of the enclosing type and " "convert to an object of the enclosing type" msgstr "" -#: mcs/mcs/method.cs:2658 +#: mcs/mcs/method.cs:2691 msgid "User-defined conversion must convert to or from the enclosing type" msgstr "" -#: mcs/mcs/method.cs:2664 +#: mcs/mcs/method.cs:2697 #, csharp-format msgid "" "User-defined conversion `{0}' cannot convert to or from the dynamic type" msgstr "" -#: mcs/mcs/method.cs:2671 +#: mcs/mcs/method.cs:2704 #, csharp-format msgid "" "User-defined conversion `{0}' cannot convert to or from an interface type" msgstr "" -#: mcs/mcs/method.cs:2678 +#: mcs/mcs/method.cs:2711 #, csharp-format msgid "User-defined conversion `{0}' cannot convert to or from a base class" msgstr "" -#: mcs/mcs/method.cs:2684 +#: mcs/mcs/method.cs:2717 #, csharp-format msgid "User-defined conversion `{0}' cannot convert to or from a derived class" msgstr "" -#: mcs/mcs/method.cs:2691 +#: mcs/mcs/method.cs:2724 msgid "" "Overloaded shift operator must have the type of the first operand be the " "containing type, and the type of the second operand must be int" msgstr "" -#: mcs/mcs/method.cs:2700 +#: mcs/mcs/method.cs:2733 msgid "" "The return type for ++ or -- operator must be the containing type or derived " "from the containing type" msgstr "" -#: mcs/mcs/method.cs:2705 +#: mcs/mcs/method.cs:2738 msgid "The parameter type for ++ or -- operator must be the containing type" msgstr "" -#: mcs/mcs/method.cs:2712 +#: mcs/mcs/method.cs:2745 msgid "The parameter type of a unary operator must be the containing type" msgstr "" -#: mcs/mcs/method.cs:2720 +#: mcs/mcs/method.cs:2753 msgid "The return type of operator True or False must be bool" msgstr "" -#: mcs/mcs/method.cs:2735 +#: mcs/mcs/method.cs:2768 msgid "One of the parameters of a binary operator must be the containing type" msgstr "" @@ -2877,45 +2943,52 @@ msgstr "" msgid "The imported type `{0}' is defined multiple times" msgstr "" -#: mcs/mcs/namespace.cs:741 mcs/mcs/namespace.cs:753 +#: mcs/mcs/namespace.cs:742 mcs/mcs/namespace.cs:754 msgid "" "A using clause must precede all other namespace elements except extern alias " "declarations" msgstr "" -#: mcs/mcs/namespace.cs:769 +#: mcs/mcs/namespace.cs:770 #, csharp-format msgid "The using alias `{0}' appeared previously in this namespace" msgstr "" -#: mcs/mcs/namespace.cs:807 mcs/mcs/namespace.cs:830 +#: mcs/mcs/namespace.cs:808 mcs/mcs/namespace.cs:831 #, csharp-format msgid "The namespace `{0}' already contains a definition for `{1}'" msgstr "" -#: mcs/mcs/namespace.cs:1052 +#: mcs/mcs/namespace.cs:1071 #, csharp-format msgid "Namespace `{0}' contains a definition with same name as alias `{1}'" msgstr "" -#: mcs/mcs/namespace.cs:1105 +#: mcs/mcs/namespace.cs:1124 #, csharp-format msgid "`{0}' is an ambiguous reference between `{1}' and `{2}'" msgstr "" -#: mcs/mcs/namespace.cs:1301 +#: mcs/mcs/namespace.cs:1386 +#, csharp-format +msgid "" +"`{0}' is not a static class. A using namespace directive can only be applied " +"to static classes or namespace" +msgstr "" + +#: mcs/mcs/namespace.cs:1395 #, csharp-format msgid "" "`{0}' is a type not a namespace. A using namespace directive can only be " "applied to namespaces" msgstr "" -#: mcs/mcs/namespace.cs:1325 +#: mcs/mcs/namespace.cs:1418 #, csharp-format msgid "The extern alias `{0}' was not specified in -reference option" msgstr "" -#: mcs/mcs/nullable.cs:1082 +#: mcs/mcs/nullable.cs:1087 msgid "" "An expression tree cannot contain a coalescing operator with null left side" msgstr "" @@ -2924,121 +2997,128 @@ msgstr "" msgid "The params parameter must be a single dimensional array" msgstr "" -#: mcs/mcs/parameter.cs:327 +#: mcs/mcs/parameter.cs:319 msgid "An out parameter cannot have the `In' attribute" msgstr "" -#: mcs/mcs/parameter.cs:332 +#: mcs/mcs/parameter.cs:324 msgid "" "Do not use `System.ParamArrayAttribute'. Use the `params' keyword instead" msgstr "" -#: mcs/mcs/parameter.cs:339 +#: mcs/mcs/parameter.cs:331 msgid "" "Cannot specify only `Out' attribute on a ref parameter. Use both `In' and " "`Out' attributes or neither" msgstr "" -#: mcs/mcs/parameter.cs:348 +#: mcs/mcs/parameter.cs:340 #, csharp-format msgid "Cannot specify `{0}' attribute on optional parameter `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:357 +#: mcs/mcs/parameter.cs:349 msgid "" "The CallerMemberName attribute can only be applied to parameters with " "default value" msgstr "" -#: mcs/mcs/parameter.cs:362 +#: mcs/mcs/parameter.cs:354 msgid "" "The CallerLineNumber attribute can only be applied to parameters with " "default value" msgstr "" -#: mcs/mcs/parameter.cs:367 +#: mcs/mcs/parameter.cs:359 msgid "" "The CallerFilePath attribute can only be applied to parameters with default " "value" msgstr "" -#: mcs/mcs/parameter.cs:404 +#: mcs/mcs/parameter.cs:401 #, csharp-format msgid "Method or delegate parameter cannot be of type `{0}'" msgstr "" -#: mcs/mcs/parameter.cs:414 +#: mcs/mcs/parameter.cs:411 #, csharp-format msgid "`{0}': static types cannot be used as parameters" msgstr "" -#: mcs/mcs/parameter.cs:420 +#: mcs/mcs/parameter.cs:417 #, csharp-format msgid "The extension method cannot be of type `{0}'" msgstr "" -#: mcs/mcs/parameter.cs:441 mcs/mcs/parameter.cs:453 +#: mcs/mcs/parameter.cs:439 #, csharp-format msgid "" "The CallerMemberName attribute cannot be applied because there is no " "standard conversion from `{0}' to `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:465 +#: mcs/mcs/parameter.cs:458 +#, csharp-format +msgid "" +"The CallerLineNumberAttribute attribute cannot be applied because there is " +"no standard conversion from `{0}' to `{1}'" +msgstr "" + +#: mcs/mcs/parameter.cs:476 #, csharp-format msgid "" "The CallerFilePath attribute cannot be applied because there is no standard " "conversion from `{0}' to `{1}'" msgstr "" -#: mcs/mcs/parameter.cs:511 +#: mcs/mcs/parameter.cs:552 #, csharp-format msgid "" "Argument of type `{0}' is not applicable for the DefaultParameterValue " "attribute" msgstr "" -#: mcs/mcs/parameter.cs:515 +#: mcs/mcs/parameter.cs:556 #, csharp-format msgid "" "The DefaultParameterValue attribute is not applicable on parameters of type " "`{0}'" msgstr "" -#: mcs/mcs/parameter.cs:543 +#: mcs/mcs/parameter.cs:584 msgid "The type of the default value should match the type of the parameter" msgstr "" -#: mcs/mcs/parameter.cs:694 +#: mcs/mcs/parameter.cs:735 msgid "An expression tree parameter cannot use `ref' or `out' modifier" msgstr "" -#: mcs/mcs/parameter.cs:1203 +#: mcs/mcs/parameter.cs:1266 #, csharp-format msgid "The parameter name `{0}' conflicts with a compiler generated name" msgstr "" -#: mcs/mcs/parameter.cs:1360 +#: mcs/mcs/parameter.cs:1424 #, csharp-format msgid "" "The expression being assigned to optional parameter `{0}' must be a constant " "or default value" msgstr "" -#: mcs/mcs/parameter.cs:1377 +#: mcs/mcs/parameter.cs:1442 #, csharp-format msgid "" "The expression being assigned to nullable optional parameter `{0}' must be " "default value" msgstr "" -#: mcs/mcs/parameter.cs:1385 +#: mcs/mcs/parameter.cs:1450 #, csharp-format msgid "" "Optional parameter `{0}' of type `{1}' can only be initialized with `null'" msgstr "" -#: mcs/mcs/parameter.cs:1396 +#: mcs/mcs/parameter.cs:1461 #, csharp-format msgid "" "Optional parameter expression of type `{0}' cannot be converted to parameter " @@ -3147,26 +3227,46 @@ msgid "" "or indexer has both a get and a set accessor" msgstr "" -#: mcs/mcs/property.cs:853 +#: mcs/mcs/property.cs:838 +#, csharp-format +msgid "`{0}': Only auto-implemented properties can have initializers" +msgstr "" + +#: mcs/mcs/property.cs:842 +#, csharp-format +msgid "`{0}': Properties inside interfaces cannot have initializers" +msgstr "" + +#: mcs/mcs/property.cs:851 +#, csharp-format +msgid "Auto-implemented property `{0}' must have get accessor" +msgstr "" + +#: mcs/mcs/property.cs:857 +#, csharp-format +msgid "Auto-implemented property `{0}' must have set accessor or initializer" +msgstr "" + +#: mcs/mcs/property.cs:891 #, csharp-format msgid "" "Automatically implemented property `{0}' cannot be used inside a type with " "an explicit StructLayout attribute" msgstr "" -#: mcs/mcs/property.cs:1348 +#: mcs/mcs/property.cs:1386 #, csharp-format msgid "`{0}': event must be of a delegate type" msgstr "" -#: mcs/mcs/property.cs:1626 +#: mcs/mcs/property.cs:1664 #, csharp-format msgid "" "The `{0}' attribute is valid only on an indexer that is not an explicit " "interface member declaration" msgstr "" -#: mcs/mcs/property.cs:1630 +#: mcs/mcs/property.cs:1668 msgid "Cannot set the `IndexerName' attribute on an indexer marked override" msgstr "" @@ -3189,109 +3289,111 @@ msgstr "" msgid "Control cannot leave the body of a finally clause" msgstr "" -#: mcs/mcs/statement.cs:1170 +#: mcs/mcs/statement.cs:1174 #, csharp-format msgid "" "An object of a type convertible to `{0}' is required for the return statement" msgstr "" -#: mcs/mcs/statement.cs:1183 mcs/mcs/statement.cs:1207 +#: mcs/mcs/statement.cs:1187 #, csharp-format msgid "" "`{0}': A return keyword must not be followed by any expression when method " "returns void" msgstr "" -#: mcs/mcs/statement.cs:1220 -#, csharp-format +#: mcs/mcs/statement.cs:1206 +msgid "Cannot return an expression of type `void'" +msgstr "" + +#: mcs/mcs/statement.cs:1214 mcs/mcs/statement.cs:1247 msgid "" -"`{0}': A return keyword must not be followed by an expression when async " -"delegate returns `Task'. Consider using `Task' return type" +"Anonymous function or lambda expression converted to a void returning " +"delegate cannot return a value" msgstr "" #: mcs/mcs/statement.cs:1224 +msgid "" +"Async lambda expression or anonymous method converted to a `Task' cannot " +"return a value. Consider returning `Task'" +msgstr "" + +#: mcs/mcs/statement.cs:1227 #, csharp-format msgid "" "`{0}': A return keyword must not be followed by an expression when async " "method returns `Task'. Consider using `Task' return type" msgstr "" -#: mcs/mcs/statement.cs:1237 +#: mcs/mcs/statement.cs:1238 #, csharp-format msgid "" "`{0}': The return expression type of async method must be `{1}' rather than " "`Task<{1}>'" msgstr "" -#: mcs/mcs/statement.cs:1247 -#, csharp-format -msgid "" -"`{0}': A return keyword must not be followed by any expression when delegate " -"returns void" -msgstr "" - -#: mcs/mcs/statement.cs:1280 +#: mcs/mcs/statement.cs:1278 #, csharp-format msgid "" "Cannot convert `{0}' to delegate type `{1}' because some of the return types " "in the block are not implicitly convertible to the delegate return type" msgstr "" -#: mcs/mcs/statement.cs:1337 +#: mcs/mcs/statement.cs:1354 msgid "" "Cannot return a value from iterators. Use the yield return statement to " "return a value, or yield break to end the iteration" msgstr "" -#: mcs/mcs/statement.cs:1399 +#: mcs/mcs/statement.cs:1416 #, csharp-format msgid "" "The label `{0}:' could not be found within the scope of the goto statement" msgstr "" -#: mcs/mcs/statement.cs:1737 +#: mcs/mcs/statement.cs:1771 msgid "A goto case is only valid inside a switch statement" msgstr "" -#: mcs/mcs/statement.cs:1760 +#: mcs/mcs/statement.cs:1794 msgid "" "A throw statement with no arguments is not allowed outside of a catch clause" msgstr "" -#: mcs/mcs/statement.cs:1765 +#: mcs/mcs/statement.cs:1799 msgid "" "A throw statement with no arguments is not allowed inside of a finally " "clause nested inside of the innermost catch clause" msgstr "" -#: mcs/mcs/statement.cs:1783 mcs/mcs/statement.cs:6436 +#: mcs/mcs/statement.cs:1817 mcs/mcs/statement.cs:6626 msgid "The type caught or thrown must be derived from System.Exception" msgstr "" -#: mcs/mcs/statement.cs:1925 +#: mcs/mcs/statement.cs:1984 msgid "No enclosing loop out of which to break or continue" msgstr "" -#: mcs/mcs/statement.cs:2094 +#: mcs/mcs/statement.cs:2153 msgid "A fixed statement cannot use an implicitly typed local variable" msgstr "" -#: mcs/mcs/statement.cs:2099 +#: mcs/mcs/statement.cs:2158 msgid "An implicitly typed local variable cannot be a constant" msgstr "" -#: mcs/mcs/statement.cs:2104 +#: mcs/mcs/statement.cs:2163 msgid "" "An implicitly typed local variable declarator must include an initializer" msgstr "" -#: mcs/mcs/statement.cs:2109 +#: mcs/mcs/statement.cs:2168 msgid "" "An implicitly typed local variable declaration cannot include multiple " "declarators" msgstr "" -#: mcs/mcs/statement.cs:2750 +#: mcs/mcs/statement.cs:2814 #, csharp-format msgid "" "A local variable named `{0}' cannot be declared in this scope because it " @@ -3299,112 +3401,118 @@ msgid "" "scope to denote something else" msgstr "" -#: mcs/mcs/statement.cs:2762 +#: mcs/mcs/statement.cs:2826 #, csharp-format msgid "A local variable named `{0}' is already defined in this scope" msgstr "" -#: mcs/mcs/statement.cs:2769 +#: mcs/mcs/statement.cs:2833 #, csharp-format msgid "" "The type parameter name `{0}' is the same as local variable or parameter name" msgstr "" -#: mcs/mcs/statement.cs:3617 +#: mcs/mcs/statement.cs:3712 #, csharp-format msgid "" "The out parameter `{0}' must be assigned to before control leaves the " "current method" msgstr "" -#: mcs/mcs/statement.cs:3880 +#: mcs/mcs/statement.cs:3975 msgid "Async methods cannot have ref or out parameters" msgstr "" -#: mcs/mcs/statement.cs:3886 +#: mcs/mcs/statement.cs:3981 msgid "__arglist is not allowed in parameter list of async methods" msgstr "" -#: mcs/mcs/statement.cs:3892 +#: mcs/mcs/statement.cs:3987 msgid "Async methods cannot have unsafe parameters" msgstr "" -#: mcs/mcs/statement.cs:4089 +#: mcs/mcs/statement.cs:4184 #, csharp-format msgid "The label `{0}' is a duplicate" msgstr "" -#: mcs/mcs/statement.cs:4098 mcs/mcs/statement.cs:4109 +#: mcs/mcs/statement.cs:4193 mcs/mcs/statement.cs:4204 #, csharp-format msgid "" "The label `{0}' shadows another label by the same name in a contained scope" msgstr "" -#: mcs/mcs/statement.cs:4312 +#: mcs/mcs/statement.cs:4425 #, csharp-format msgid "`{0}': not all code paths return a value" msgstr "" -#: mcs/mcs/statement.cs:4430 +#: mcs/mcs/statement.cs:4543 #, csharp-format msgid "The label `{0}' already occurs in this switch statement" msgstr "" -#: mcs/mcs/statement.cs:4554 +#: mcs/mcs/statement.cs:4667 #, csharp-format msgid "Control cannot fall through from one case label `{0}' to another" msgstr "" -#: mcs/mcs/statement.cs:4933 +#: mcs/mcs/statement.cs:5077 #, csharp-format msgid "" "A switch expression of type `{0}' cannot be converted to an integral type, " "bool, char, string, enum or nullable type" msgstr "" -#: mcs/mcs/statement.cs:5697 +#: mcs/mcs/statement.cs:5859 #, csharp-format msgid "`{0}' is not a reference type as required by the lock statement" msgstr "" -#: mcs/mcs/statement.cs:6078 +#: mcs/mcs/statement.cs:6240 msgid "The type of locals declared in a fixed statement must be a pointer type" msgstr "" -#: mcs/mcs/statement.cs:6094 +#: mcs/mcs/statement.cs:6256 msgid "" "The right hand side of a fixed statement assignment may not be a cast " "expression" msgstr "" -#: mcs/mcs/statement.cs:6164 +#: mcs/mcs/statement.cs:6326 msgid "" "You cannot use the fixed statement to take the address of an already fixed " "expression" msgstr "" -#: mcs/mcs/statement.cs:6688 +#: mcs/mcs/statement.cs:6487 +msgid "" +"The `await' operator cannot be used in the filter expression of a catch " +"clause" +msgstr "" + +#: mcs/mcs/statement.cs:7059 #, csharp-format msgid "" "A previous catch clause already catches all exceptions of this or a super " "type `{0}'" msgstr "" -#: mcs/mcs/statement.cs:6866 +#: mcs/mcs/statement.cs:7288 #, csharp-format msgid "" "`{0}': type used in a using statement must be implicitly convertible to " "`System.IDisposable'" msgstr "" -#: mcs/mcs/statement.cs:7277 +#: mcs/mcs/statement.cs:7700 #, csharp-format msgid "" "foreach statement requires that the return type `{0}' of `{1}' must have a " "suitable public MoveNext method and public Current property" msgstr "" -#: mcs/mcs/statement.cs:7321 +#: mcs/mcs/statement.cs:7744 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it " @@ -3412,54 +3520,54 @@ msgid "" "implementation" msgstr "" -#: mcs/mcs/statement.cs:7343 +#: mcs/mcs/statement.cs:7766 #, csharp-format msgid "" "foreach statement cannot operate on variables of type `{0}' because it does " "not contain a definition for `{1}' or is inaccessible" msgstr "" -#: mcs/mcs/statement.cs:7578 +#: mcs/mcs/statement.cs:8001 msgid "Use of null is not valid in this context" msgstr "" -#: mcs/mcs/statement.cs:7590 +#: mcs/mcs/statement.cs:8013 #, csharp-format msgid "Foreach statement cannot operate on a `{0}'" msgstr "" -#: mcs/mcs/typemanager.cs:796 +#: mcs/mcs/typemanager.cs:797 #, csharp-format msgid "The predefined type `{0}.{1}' is not defined or imported" msgstr "" -#: mcs/mcs/typemanager.cs:841 +#: mcs/mcs/typemanager.cs:842 #, csharp-format msgid "" "The predefined type `{0}.{1}' is defined multiple times. Using definition " "from `{2}'" msgstr "" -#: mcs/mcs/typemanager.cs:852 +#: mcs/mcs/typemanager.cs:853 #, csharp-format msgid "" "The predefined type `{0}.{1}' is defined in an assembly that is not " "referenced." msgstr "" -#: mcs/mcs/typemanager.cs:862 +#: mcs/mcs/typemanager.cs:863 #, csharp-format msgid "The predefined type `{0}.{1}' is not declared correctly" msgstr "" -#: mcs/mcs/typemanager.cs:988 +#: mcs/mcs/typemanager.cs:989 #, csharp-format msgid "" "The compiler required member `{0}.{1}{2}' could not be found or is " "inaccessible" msgstr "" -#: mcs/mcs/typemanager.cs:1107 +#: mcs/mcs/typemanager.cs:1108 #, csharp-format msgid "" "Cannot take the address of, get the size of, or declare a pointer to a " diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 6c8bb64600..a5cf87def7 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 26e35ecb40..abd51dff27 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -55604865cc8cb4c41a41514f745c25f474ecf326 \ No newline at end of file +60e7a40953ccc9779004c20ec0d6d8df99687897 \ No newline at end of file diff --git a/runtime/Makefile.am b/runtime/Makefile.am index 6b784a3d6e..2d9c2886db 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -168,9 +168,9 @@ CLEANFILES = etc/mono/config # depend on $(symlinks) to ensure 'etc/mono' directory exists etc/mono/config: ../data/config Makefile $(symlinks) d=`cd ../support && pwd`; \ - sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t + sed 's,target="$(prefix)/lib/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t if test -z "$(libgdiplus_loc)"; then :; else \ - sed 's,target="[^"]*libgdiplus[^"]*",target="$(libgdiplus_loc)",' $@t > $@tt; \ + sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \ mv -f $@tt $@t; fi mv -f $@t $@ diff --git a/runtime/Makefile.in b/runtime/Makefile.in index d5ccf607cf..f6d292b288 100644 --- a/runtime/Makefile.in +++ b/runtime/Makefile.in @@ -171,6 +171,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -179,6 +180,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -245,6 +247,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -294,6 +297,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ @@ -624,9 +628,9 @@ test: mcs-do-test-profiles # depend on $(symlinks) to ensure 'etc/mono' directory exists etc/mono/config: ../data/config Makefile $(symlinks) d=`cd ../support && pwd`; \ - sed 's,target="libMonoPosixHelper[^"]*",target="'$$d/libMonoPosixHelper.la'",' ../data/config > $@t + sed 's,target="$(prefix)/lib/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t if test -z "$(libgdiplus_loc)"; then :; else \ - sed 's,target="[^"]*libgdiplus[^"]*",target="$(libgdiplus_loc)",' $@t > $@tt; \ + sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \ mv -f $@tt $@t; fi mv -f $@t $@ diff --git a/samples/Makefile.in b/samples/Makefile.in index cb14b82bc6..427922a1e2 100644 --- a/samples/Makefile.in +++ b/samples/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index f9a5b87ff4..ba7bc6e642 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -194,6 +194,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -202,6 +203,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -268,6 +270,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -317,6 +320,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/support/Makefile.in b/support/Makefile.in index 0be467358a..2a4d315ec5 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -282,6 +282,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -290,6 +291,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -356,6 +358,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -405,6 +408,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/support/grp.c b/support/grp.c index 09aff34327..827bc550d9 100644 --- a/support/grp.c +++ b/support/grp.c @@ -8,7 +8,9 @@ */ #include +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #include #include diff --git a/support/macros.c b/support/macros.c index d2cf5e7bcd..8d455889d7 100644 --- a/support/macros.c +++ b/support/macros.c @@ -100,6 +100,15 @@ char *helper_Mono_Posix_readdir(void *dir) { } #if HAVE_GETPWNAM_R +int helper_Mono_Posix_getpwnamuid (int mode, char *in_name, int in_uid, + char **account, + char **password, + int *uid, + int *gid, + char **name, + char **home, + char **shell); + int helper_Mono_Posix_getpwnamuid (int mode, char *in_name, int in_uid, char **account, char **password, diff --git a/support/minizip/zip.c b/support/minizip/zip.c index 5acf49f586..ef81ecc032 100644 --- a/support/minizip/zip.c +++ b/support/minizip/zip.c @@ -187,12 +187,13 @@ local void init_linkedlist(linkedlist_data *ll) ll->first_block = ll->last_block = NULL; } +/* local void free_linkedlist(linkedlist_data *ll) { free_datablock(ll->first_block); ll->first_block = ll->last_block = NULL; } - +*/ local int add_data_in_datablock(linkedlist_data *ll, const void *buf, uLong len) { diff --git a/support/nl.c b/support/nl.c index 60ad23d594..88babdae39 100644 --- a/support/nl.c +++ b/support/nl.c @@ -221,8 +221,10 @@ ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size) int addr_length; int msg_type; int table; +#ifdef NL_DEBUG int protocol; int scope; +#endif int rtm_type; gboolean have_dst; gboolean have_src; @@ -250,8 +252,10 @@ ReadEvents (gpointer sock, gpointer buffer, gint32 count, gint32 size) addr_length = (family == AF_INET) ? 4 : 16; table = rtp->rtm_table; +#ifdef NL_DEBUG protocol = rtp->rtm_protocol; scope = rtp->rtm_scope; +#endif rtm_type = rtp->rtm_type; NL_DEBUG_PRINT ("\tRTMSG table: %d %s", table, FIND_RT_TABLE_NAME (table)); if (table != RT_TABLE_MAIN && table != RT_TABLE_LOCAL) diff --git a/support/old-map.c b/support/old-map.c index 9b2a2e907d..8d733b21cc 100644 --- a/support/old-map.c +++ b/support/old-map.c @@ -155,8 +155,10 @@ int map_Mono_Posix_Signals (int x) return SIGXFSZ; if (x == Mono_Posix_Signals_SIGVTALRM) return SIGVTALRM; +#ifdef SIGPROF if (x == Mono_Posix_Signals_SIGPROF) return SIGPROF; +#endif if (x == Mono_Posix_Signals_SIGWINCH) return SIGWINCH; #ifdef SIGIO diff --git a/support/serial.c b/support/serial.c index 36b902defb..dab4ccc3fe 100644 --- a/support/serial.c +++ b/support/serial.c @@ -5,6 +5,9 @@ * Author: Chris Toshok */ +#include "map.h" +#include "mph.h" + #include #include #include @@ -12,7 +15,9 @@ #include #if defined(__APPLE__) #include "fakepoll.h" -#else +#elif defined(HAVE_POLL_H) +#include +#elif defined(HAVE_SYS_POLL_H) #include #endif #include diff --git a/support/supportw.c b/support/supportw.c index 49ed549c5d..51b4969715 100644 --- a/support/supportw.c +++ b/support/supportw.c @@ -158,6 +158,9 @@ FindWindowExW (gpointer hwndParent, gpointer hwndChildAfter, const char *classw, return func (hwndParent, hwndChildAfter, classw, window); } +int +SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int cy, unsigned int flags); + int SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int cy, unsigned int flags) { @@ -165,6 +168,9 @@ SetWindowPos (gpointer hwnd, gpointer hwndInsertAfter, int x, int y, int cx, int return 1; } +int +SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam); + int SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam) { @@ -172,6 +178,9 @@ SendMessageA (gpointer hwnd, unsigned int msg, gpointer wparam, gpointer lparam) return 0; } +int +GetWindowLongA (gpointer hwnd, int a); + int GetWindowLongA (gpointer hwnd, int a) { diff --git a/support/sys-statvfs.c b/support/sys-statvfs.c index 2096dcff25..e03152a773 100644 --- a/support/sys-statvfs.c +++ b/support/sys-statvfs.c @@ -25,7 +25,9 @@ #endif /* def HAVE_SYS_STATVFS_H */ #ifdef HAVE_GETFSSTAT +#ifdef HAVE_SYS_PARAM_H #include +#endif #include #include #include /* for pathconf */ diff --git a/support/sys-time.c b/support/sys-time.c index 1759ec0fcb..a1c0ba0b18 100644 --- a/support/sys-time.c +++ b/support/sys-time.c @@ -69,23 +69,6 @@ Mono_Posix_Syscall_settimeofday ( return r; } -/* Remove this at some point in the future */ -gint32 -Mono_Posix_Syscall_utimes_bad (const char *filename, - struct Mono_Posix_Timeval *tv) -{ - struct timeval _tv; - struct timeval *ptv = NULL; - - if (tv) { - _tv.tv_sec = tv->tv_sec; - _tv.tv_usec = tv->tv_usec; - ptv = &_tv; - } - - return utimes (filename, ptv); -} - static inline struct timeval* copy_utimes (struct timeval* to, struct Mono_Posix_Timeval *from) { diff --git a/support/syslog.c b/support/syslog.c index 6fed2ad205..2d8d7cbe80 100644 --- a/support/syslog.c +++ b/support/syslog.c @@ -47,6 +47,9 @@ Mono_Posix_Syscall_syslog (int priority, const char* message) #endif /* vararg version of syslog(3). */ +gint32 +Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...); + gint32 Mono_Posix_Syscall_syslog2 (int priority, const char *format, ...) { diff --git a/support/x-struct-str.c b/support/x-struct-str.c index b71a9cca1f..5124af71fc 100644 --- a/support/x-struct-str.c +++ b/support/x-struct-str.c @@ -20,7 +20,7 @@ : lstr_at(p, n) \ ) -char* MPH_INTERNAL +char* _mph_copy_structure_strings ( void *to, const mph_string_offset_t *to_offsets, const void *from, const mph_string_offset_t *from_offsets, diff --git a/support/zlib-helper.c b/support/zlib-helper.c index 47adde38db..d0911fc076 100644 --- a/support/zlib-helper.c +++ b/support/zlib-helper.c @@ -45,7 +45,7 @@ gint WriteZStream (ZStream *stream, guchar *buffer, gint length); static gint flush_internal (ZStream *stream, gboolean is_final); static void * -z_alloc (void *opaque, gsize nitems, gsize item_size) +z_alloc (void *opaque, unsigned int nitems, unsigned int item_size) { return g_malloc0 (nitems * item_size); } diff --git a/tools/Makefile.in b/tools/Makefile.in index 96bc55c6c5..ca9c41ff07 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -221,6 +221,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -229,6 +230,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -295,6 +297,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -344,6 +347,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/tools/locale-builder/Makefile.in b/tools/locale-builder/Makefile.in index 59f4442d0b..8eeb358f6c 100644 --- a/tools/locale-builder/Makefile.in +++ b/tools/locale-builder/Makefile.in @@ -161,6 +161,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -169,6 +170,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -235,6 +237,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -284,6 +287,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/tools/sgen/Makefile.in b/tools/sgen/Makefile.in index ca5b97bd6c..d9fafea104 100644 --- a/tools/sgen/Makefile.in +++ b/tools/sgen/Makefile.in @@ -210,6 +210,7 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +GDKX11 = @GDKX11@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ @@ -218,6 +219,7 @@ GMODULE_LIBS = @GMODULE_LIBS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +GTKX11 = @GTKX11@ HAVE_MSGFMT = @HAVE_MSGFMT@ HOST_CC = @HOST_CC@ INSTALL = @INSTALL@ @@ -284,6 +286,7 @@ SQLITE3 = @SQLITE3@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WERROR_CFLAGS = @WERROR_CFLAGS@ X11 = @X11@ XATTR_LIB = @XATTR_LIB@ XGETTEXT = @XGETTEXT@ @@ -333,6 +336,7 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libgc_dir = @libgc_dir@ +libgdiplus_install_loc = @libgdiplus_install_loc@ libgdiplus_loc = @libgdiplus_loc@ libmono_cflags = @libmono_cflags@ libmono_ldflags = @libmono_ldflags@ diff --git a/tools/sgen/sgen-grep-binprot.c b/tools/sgen/sgen-grep-binprot.c index 082a40cd6d..ea416b7e3a 100644 --- a/tools/sgen/sgen-grep-binprot.c +++ b/tools/sgen/sgen-grep-binprot.c @@ -57,6 +57,8 @@ read_entry (FILE *in, void **data) case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: size = sizeof (SGenProtocolDislinkProcessStaged); break; case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: size = sizeof (SGenProtocolDomainUnload); break; case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: size = sizeof (SGenProtocolDomainUnload); break; + case SGEN_PROTOCOL_GRAY_ENQUEUE: size = sizeof (SGenProtocolGrayQueue); break; + case SGEN_PROTOCOL_GRAY_DEQUEUE: size = sizeof (SGenProtocolGrayQueue); break; default: assert (0); } @@ -71,211 +73,8 @@ read_entry (FILE *in, void **data) return (int)type; } -#define WORKER_PREFIX(t) (WORKER ((t)) ? "w" : " ") - -static void -print_entry (int type, void *data) -{ - switch (TYPE (type)) { - case SGEN_PROTOCOL_COLLECTION_FORCE: { - SGenProtocolCollectionForce *entry = data; - printf ("%s collection force generation %d\n", WORKER_PREFIX (type), entry->generation); - break; - } - case SGEN_PROTOCOL_COLLECTION_BEGIN: { - SGenProtocolCollection *entry = data; - printf ("%s collection begin %d generation %d\n", WORKER_PREFIX (type), entry->index, entry->generation); - break; - } - case SGEN_PROTOCOL_COLLECTION_END: { - SGenProtocolCollection *entry = data; - printf ("%s collection end %d generation %d\n", WORKER_PREFIX (type), entry->index, entry->generation); - break; - } - case SGEN_PROTOCOL_CONCURRENT_START: { - printf ("%s concurrent start\n", WORKER_PREFIX (type)); - break; - } - case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH: { - printf ("%s concurrent update or finish\n", WORKER_PREFIX (type)); - break; - } - case SGEN_PROTOCOL_WORLD_STOPPING: { - SGenProtocolWorldStopping *entry = data; - printf ("%s world stopping timestamp %lld\n", WORKER_PREFIX (type), entry->timestamp); - break; - } - case SGEN_PROTOCOL_WORLD_STOPPED: { - SGenProtocolWorldStopped *entry = data; - long long total = entry->total_major_cards + entry->total_los_cards; - long long marked = entry->marked_major_cards + entry->marked_los_cards; - printf ("%s world stopped timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->timestamp, total, marked, 100.0 * (double) marked / (double) total); - break; - } - case SGEN_PROTOCOL_WORLD_RESTARTING: { - SGenProtocolWorldRestarting *entry = data; - long long total = entry->total_major_cards + entry->total_los_cards; - long long marked = entry->marked_major_cards + entry->marked_los_cards; - printf ("%s world restarting generation %d timestamp %lld total %lld marked %lld %0.2f%%\n", WORKER_PREFIX (type), entry->generation, entry->timestamp, total, marked, 100.0 * (double) marked / (double) total); - break; - } - case SGEN_PROTOCOL_WORLD_RESTARTED: { - SGenProtocolWorldRestarted *entry = data; - printf ("%s world restarted generation %d timestamp %lld\n", WORKER_PREFIX (type), entry->generation, entry->timestamp); - break; - } - case SGEN_PROTOCOL_ALLOC: { - SGenProtocolAlloc *entry = data; - printf ("%s alloc obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_ALLOC_PINNED: { - SGenProtocolAlloc *entry = data; - printf ("%s alloc pinned obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_ALLOC_DEGRADED: { - SGenProtocolAlloc *entry = data; - printf ("%s alloc degraded obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_COPY: { - SGenProtocolCopy *entry = data; - printf ("%s copy from %p to %p vtable %p size %d\n", WORKER_PREFIX (type), entry->from, entry->to, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_PIN: { - SGenProtocolPin *entry = data; - printf ("%s pin obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_MARK: { - SGenProtocolMark *entry = data; - printf ("%s mark obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_SCAN_BEGIN: { - SGenProtocolScanBegin *entry = data; - printf ("%s scan_begin obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_SCAN_VTYPE_BEGIN: { - SGenProtocolScanVTypeBegin *entry = data; - printf ("%s scan_vtype_begin obj %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->size); - break; - } - case SGEN_PROTOCOL_WBARRIER: { - SGenProtocolWBarrier *entry = data; - printf ("%s wbarrier ptr %p value %p value_vtable %p\n", WORKER_PREFIX (type), entry->ptr, entry->value, entry->value_vtable); - break; - } - case SGEN_PROTOCOL_GLOBAL_REMSET: { - SGenProtocolGlobalRemset *entry = data; - printf ("%s global_remset ptr %p value %p value_vtable %p\n", WORKER_PREFIX (type), entry->ptr, entry->value, entry->value_vtable); - break; - } - case SGEN_PROTOCOL_PTR_UPDATE: { - SGenProtocolPtrUpdate *entry = data; - printf ("%s ptr_update ptr %p old_value %p new_value %p vtable %p size %d\n", WORKER_PREFIX (type), - entry->ptr, entry->old_value, entry->new_value, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_CLEANUP: { - SGenProtocolCleanup *entry = data; - printf ("%s cleanup ptr %p vtable %p size %d\n", WORKER_PREFIX (type), entry->ptr, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_EMPTY: { - SGenProtocolEmpty *entry = data; - printf ("%s empty start %p size %d\n", WORKER_PREFIX (type), entry->start, entry->size); - break; - } - case SGEN_PROTOCOL_THREAD_SUSPEND: { - SGenProtocolThreadSuspend *entry = data; - printf ("%s thread_suspend thread %p ip %p\n", WORKER_PREFIX (type), entry->thread, entry->stopped_ip); - break; - } - case SGEN_PROTOCOL_THREAD_RESTART: { - SGenProtocolThreadRestart *entry = data; - printf ("%s thread_restart thread %p\n", WORKER_PREFIX (type), entry->thread); - break; - } - case SGEN_PROTOCOL_THREAD_REGISTER: { - SGenProtocolThreadRegister *entry = data; - printf ("%s thread_register thread %p\n", WORKER_PREFIX (type), entry->thread); - break; - } - case SGEN_PROTOCOL_THREAD_UNREGISTER: { - SGenProtocolThreadUnregister *entry = data; - printf ("%s thread_unregister thread %p\n", WORKER_PREFIX (type), entry->thread); - break; - } - case SGEN_PROTOCOL_MISSING_REMSET: { - SGenProtocolMissingRemset *entry = data; - printf ("%s missing_remset obj %p obj_vtable %p offset %d value %p value_vtable %p value_pinned %d\n", WORKER_PREFIX (type), - entry->obj, entry->obj_vtable, entry->offset, entry->value, entry->value_vtable, entry->value_pinned); - break; - } - case SGEN_PROTOCOL_CARD_SCAN: { - SGenProtocolCardScan *entry = data; - printf ("%s card_scan start %p size %d\n", WORKER_PREFIX (type), entry->start, entry->size); - break; - } - case SGEN_PROTOCOL_CEMENT: { - SGenProtocolCement *entry = data; - printf ("%s cement obj %p vtable %p size %d\n", WORKER_PREFIX (type), entry->obj, entry->vtable, entry->size); - break; - } - case SGEN_PROTOCOL_CEMENT_RESET: { - printf ("%s cement_reset\n", WORKER_PREFIX (type)); - break; - } - case SGEN_PROTOCOL_DISLINK_UPDATE: { - SGenProtocolDislinkUpdate *entry = data; - printf ("%s dislink_update link %p obj %p staged %d", WORKER_PREFIX (type), entry->link, entry->obj, entry->staged); - if (entry->obj) - printf (" track %d\n", entry->track); - else - printf ("\n"); - break; - } - case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: { - SGenProtocolDislinkUpdateStaged *entry = data; - printf ("%s dislink_update_staged link %p obj %p index %d", WORKER_PREFIX (type), entry->link, entry->obj, entry->index); - if (entry->obj) - printf (" track %d\n", entry->track); - else - printf ("\n"); - break; - } - case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: { - SGenProtocolDislinkProcessStaged *entry = data; - printf ("%s dislink_process_staged link %p obj %p index %d\n", WORKER_PREFIX (type), entry->link, entry->obj, entry->index); - break; - } - case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: { - SGenProtocolDomainUnload *entry = data; - printf ("%s dislink_unload_begin domain %p\n", WORKER_PREFIX (type), entry->domain); - break; - } - case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: { - SGenProtocolDomainUnload *entry = data; - printf ("%s dislink_unload_end domain %p\n", WORKER_PREFIX (type), entry->domain); - break; - } - default: - assert (0); - } -} - static gboolean -matches_interval (gpointer ptr, gpointer start, int size) -{ - return ptr >= start && (char*)ptr < (char*)start + size; -} - -static gboolean -is_match (gpointer ptr, int type, void *data) +is_always_match (int type) { switch (TYPE (type)) { case SGEN_PROTOCOL_COLLECTION_FORCE: @@ -294,7 +93,234 @@ is_match (gpointer ptr, int type, void *data) case SGEN_PROTOCOL_CEMENT_RESET: case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: + case SGEN_PROTOCOL_GRAY_ENQUEUE: + case SGEN_PROTOCOL_GRAY_DEQUEUE: return TRUE; + default: + return FALSE; + } +} + +#define WORKER_PREFIX(t) (WORKER ((t)) ? "w" : " ") + +static void +print_entry (int type, void *data) +{ + const char *always_prefix = is_always_match (type) ? " " : ""; + printf ("%s%s ", WORKER_PREFIX (type), always_prefix); + + switch (TYPE (type)) { + case SGEN_PROTOCOL_COLLECTION_FORCE: { + SGenProtocolCollectionForce *entry = data; + printf ("collection force generation %d\n", entry->generation); + break; + } + case SGEN_PROTOCOL_COLLECTION_BEGIN: { + SGenProtocolCollection *entry = data; + printf ("collection begin %d generation %d\n", entry->index, entry->generation); + break; + } + case SGEN_PROTOCOL_COLLECTION_END: { + SGenProtocolCollection *entry = data; + printf ("collection end %d generation %d\n", entry->index, entry->generation); + break; + } + case SGEN_PROTOCOL_CONCURRENT_START: { + printf ("concurrent start\n"); + break; + } + case SGEN_PROTOCOL_CONCURRENT_UPDATE_FINISH: { + printf ("concurrent update or finish\n"); + break; + } + case SGEN_PROTOCOL_WORLD_STOPPING: { + SGenProtocolWorldStopping *entry = data; + printf ("world stopping timestamp %lld\n", entry->timestamp); + break; + } + case SGEN_PROTOCOL_WORLD_STOPPED: { + SGenProtocolWorldStopped *entry = data; + long long total = entry->total_major_cards + entry->total_los_cards; + long long marked = entry->marked_major_cards + entry->marked_los_cards; + printf ("world stopped timestamp %lld total %lld marked %lld %0.2f%%\n", entry->timestamp, total, marked, 100.0 * (double) marked / (double) total); + break; + } + case SGEN_PROTOCOL_WORLD_RESTARTING: { + SGenProtocolWorldRestarting *entry = data; + long long total = entry->total_major_cards + entry->total_los_cards; + long long marked = entry->marked_major_cards + entry->marked_los_cards; + printf ("world restarting generation %d timestamp %lld total %lld marked %lld %0.2f%%\n", entry->generation, entry->timestamp, total, marked, 100.0 * (double) marked / (double) total); + break; + } + case SGEN_PROTOCOL_WORLD_RESTARTED: { + SGenProtocolWorldRestarted *entry = data; + printf ("world restarted generation %d timestamp %lld\n", entry->generation, entry->timestamp); + break; + } + case SGEN_PROTOCOL_ALLOC: { + SGenProtocolAlloc *entry = data; + printf ("alloc obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_ALLOC_PINNED: { + SGenProtocolAlloc *entry = data; + printf ("alloc pinned obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_ALLOC_DEGRADED: { + SGenProtocolAlloc *entry = data; + printf ("alloc degraded obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_COPY: { + SGenProtocolCopy *entry = data; + printf ("copy from %p to %p vtable %p size %d\n", entry->from, entry->to, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_PIN: { + SGenProtocolPin *entry = data; + printf ("pin obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_MARK: { + SGenProtocolMark *entry = data; + printf ("mark obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_SCAN_BEGIN: { + SGenProtocolScanBegin *entry = data; + printf ("scan_begin obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_SCAN_VTYPE_BEGIN: { + SGenProtocolScanVTypeBegin *entry = data; + printf ("scan_vtype_begin obj %p size %d\n", entry->obj, entry->size); + break; + } + case SGEN_PROTOCOL_WBARRIER: { + SGenProtocolWBarrier *entry = data; + printf ("wbarrier ptr %p value %p value_vtable %p\n", entry->ptr, entry->value, entry->value_vtable); + break; + } + case SGEN_PROTOCOL_GLOBAL_REMSET: { + SGenProtocolGlobalRemset *entry = data; + printf ("global_remset ptr %p value %p value_vtable %p\n", entry->ptr, entry->value, entry->value_vtable); + break; + } + case SGEN_PROTOCOL_PTR_UPDATE: { + SGenProtocolPtrUpdate *entry = data; + printf ("ptr_update ptr %p old_value %p new_value %p vtable %p size %d\n", + entry->ptr, entry->old_value, entry->new_value, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_CLEANUP: { + SGenProtocolCleanup *entry = data; + printf ("cleanup ptr %p vtable %p size %d\n", entry->ptr, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_EMPTY: { + SGenProtocolEmpty *entry = data; + printf ("empty start %p size %d\n", entry->start, entry->size); + break; + } + case SGEN_PROTOCOL_THREAD_SUSPEND: { + SGenProtocolThreadSuspend *entry = data; + printf ("thread_suspend thread %p ip %p\n", entry->thread, entry->stopped_ip); + break; + } + case SGEN_PROTOCOL_THREAD_RESTART: { + SGenProtocolThreadRestart *entry = data; + printf ("thread_restart thread %p\n", entry->thread); + break; + } + case SGEN_PROTOCOL_THREAD_REGISTER: { + SGenProtocolThreadRegister *entry = data; + printf ("thread_register thread %p\n", entry->thread); + break; + } + case SGEN_PROTOCOL_THREAD_UNREGISTER: { + SGenProtocolThreadUnregister *entry = data; + printf ("thread_unregister thread %p\n", entry->thread); + break; + } + case SGEN_PROTOCOL_MISSING_REMSET: { + SGenProtocolMissingRemset *entry = data; + printf ("missing_remset obj %p obj_vtable %p offset %d value %p value_vtable %p value_pinned %d\n", + entry->obj, entry->obj_vtable, entry->offset, entry->value, entry->value_vtable, entry->value_pinned); + break; + } + case SGEN_PROTOCOL_CARD_SCAN: { + SGenProtocolCardScan *entry = data; + printf ("card_scan start %p size %d\n", entry->start, entry->size); + break; + } + case SGEN_PROTOCOL_CEMENT: { + SGenProtocolCement *entry = data; + printf ("cement obj %p vtable %p size %d\n", entry->obj, entry->vtable, entry->size); + break; + } + case SGEN_PROTOCOL_CEMENT_RESET: { + printf ("cement_reset\n"); + break; + } + case SGEN_PROTOCOL_DISLINK_UPDATE: { + SGenProtocolDislinkUpdate *entry = data; + printf ("dislink_update link %p obj %p staged %d", entry->link, entry->obj, entry->staged); + if (entry->obj) + printf (" track %d\n", entry->track); + else + printf ("\n"); + break; + } + case SGEN_PROTOCOL_DISLINK_UPDATE_STAGED: { + SGenProtocolDislinkUpdateStaged *entry = data; + printf ("dislink_update_staged link %p obj %p index %d", entry->link, entry->obj, entry->index); + if (entry->obj) + printf (" track %d\n", entry->track); + else + printf ("\n"); + break; + } + case SGEN_PROTOCOL_DISLINK_PROCESS_STAGED: { + SGenProtocolDislinkProcessStaged *entry = data; + printf ("dislink_process_staged link %p obj %p index %d\n", entry->link, entry->obj, entry->index); + break; + } + case SGEN_PROTOCOL_DOMAIN_UNLOAD_BEGIN: { + SGenProtocolDomainUnload *entry = data; + printf ("dislink_unload_begin domain %p\n", entry->domain); + break; + } + case SGEN_PROTOCOL_DOMAIN_UNLOAD_END: { + SGenProtocolDomainUnload *entry = data; + printf ("dislink_unload_end domain %p\n", entry->domain); + break; + } + case SGEN_PROTOCOL_GRAY_ENQUEUE: { + SGenProtocolGrayQueue *entry = data; + printf ("enqueue queue %p cursor %p value %p\n", entry->queue, entry->cursor, entry->value); + break; + } + case SGEN_PROTOCOL_GRAY_DEQUEUE: { + SGenProtocolGrayQueue *entry = data; + printf ("dequeue queue %p cursor %p value %p\n", entry->queue, entry->cursor, entry->value); + break; + } + default: + assert (0); + } +} + +static gboolean +matches_interval (gpointer ptr, gpointer start, int size) +{ + return ptr >= start && (char*)ptr < (char*)start + size; +} + +static gboolean +is_match (gpointer ptr, int type, void *data) +{ + switch (TYPE (type)) { case SGEN_PROTOCOL_ALLOC: case SGEN_PROTOCOL_ALLOC_PINNED: case SGEN_PROTOCOL_ALLOC_DEGRADED: { @@ -367,7 +393,17 @@ is_match (gpointer ptr, int type, void *data) SGenProtocolDislinkProcessStaged *entry = data; return ptr == entry->obj || ptr == entry->link; } + case SGEN_PROTOCOL_GRAY_ENQUEUE: { + SGenProtocolGrayQueue *entry = data; + return ptr == entry->cursor || ptr == entry->value; + } + case SGEN_PROTOCOL_GRAY_DEQUEUE: { + SGenProtocolGrayQueue *entry = data; + return ptr == entry->cursor || ptr == entry->value; + } default: + if (is_always_match (type)) + return TRUE; assert (0); } } diff --git a/winconfig.h b/winconfig.h index 427e21f35a..0c690d3a35 100644 --- a/winconfig.h +++ b/winconfig.h @@ -12,6 +12,14 @@ #error Unknown architecture #endif +#if _WIN32_WINNT < 0x0502 +/* Required for Vectored Exception Handling. + Interlocked* functions are also not available in XP SP1 and below +*/ +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0502 +#endif /* _WIN32_WINNT < 0x0502 */ + /* * Features that are not required in the Windows port */ @@ -557,9 +565,6 @@ /* Enable the allocation and indexing of arrays greater than Int32.MaxValue */ /* #undef MONO_BIG_ARRAYS */ -/* Sizeof sock_un.sun_path */ -/* #undef MONO_SIZEOF_SUNPATH */ - /* Xen-specific behaviour */ /* #define MONO_XEN_OPT 1 */