fi
case $host in
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*|powerpc64-*-linux* \
-|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*)
+|amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*|arm*-*-linux*|sparc*-*-linux*|mips*-*-linux*|x86_64-apple-darwin*)
pic_options='-fPIC'
;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
pic_options='-fno-common'
;;
*)
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
-AC_INIT(mono, [3.0.12],
+AC_INIT(mono, [3.1.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README])
# Set to yes if Unix sockets cannot be created in an anonymous namespace
need_link_unlink=no
+#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen)
+extra_runtime_ldflags=""
+
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
libdl=
libgc_threads=pthreads
- # This doesn't seem to work as of 7.0 on amd64
- with_sigaltstack=no
use_sigposix=yes
+ has_dtrace=yes
;;
*-*-*openbsd*)
host_win32=no
dnl Snow Leopard and newer config.guess reports as this
i*86-*-darwin*)
BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE"
- CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
+ BROKEN_DARWIN_CPPFLAGS="-D_XOPEN_SOURCE"
+ CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_CPPFLAGS"
CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
CXXFLAGS="$CXXFLAGS $BROKEN_DARWIN_FLAGS"
CCASFLAGS="$CCASFLAGS $BROKEN_DARWIN_FLAGS"
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC $BROKEN_DARWIN_CPPFLAGS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
- CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
+ CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS"
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
+ extra_runtime_ldflags="-stack_size,0x800000"
+ ;;
+ x*64-*-darwin*)
+ extra_runtime_ldflags="-stack_size,0x800000"
;;
arm*-darwin*)
has_dtrace=no
AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
fi
+AC_SUBST(extra_runtime_ldflags)
AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
+AC_CACHE_CHECK([for clang],
+ mono_cv_clang,[
+ AC_TRY_COMPILE([], [
+ #ifdef __clang__
+ #else
+ #error "FAILED"
+ #endif
+ return 0;
+ ],
+ [mono_cv_clang=yes],
+ [mono_cv_clang=no],
+ [])
+])
+
WARN=''
if test x"$GCC" = xyes; then
WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value'
ORIG_CFLAGS=$CFLAGS
# Check for the normal version, since gcc ignores unknown -Wno options
- CFLAGS="$CFLAGS -Wunused-but-set-variable"
+ CFLAGS="$CFLAGS -Wunused-but-set-variable -Werror"
AC_MSG_CHECKING(for -Wno-unused-but-set-variable option to gcc)
AC_TRY_COMPILE([],[
return 0;
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
+
+ if test "x$mono_cv_clang" = "xyes"; then
+ # https://bugzilla.samba.org/show_bug.cgi?id=8118
+ WARN="$WARN -Qunused-arguments"
+ WARN="$WARN -Wno-unused-function -Wno-tautological-compare"
+ fi
else
# The Sun Forte compiler complains about inline functions that access static variables
# so disable all inlining.
CFLAGS="$CFLAGS -g $WARN"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -g"
-AC_CACHE_CHECK([for clang],
- mono_cv_clang,[
- AC_TRY_COMPILE([], [
- #ifdef __clang__
- #else
- #error "FAILED"
- #endif
- return 0;
- ],
- [mono_cv_clang=yes],
- [mono_cv_clang=no],
- [])
-])
-
# Where's the 'mcs' source tree?
if test -d $srcdir/mcs; then
mcsdir=mcs
if test "x$enable_nacl_codegen" = "xyes"; then
MONO_NACL_ALIGN_MASK_OFF=1
- CPPFLAGS="$CPPFLAGS -D__native_client_codegen__"
AC_DEFINE(TARGET_NACL, 1, [...])
+ AC_DEFINE(__native_client_codegen__, 1, [...])
else
MONO_NACL_ALIGN_MASK_OFF=0
- CPPFLAGS="$CPPFLAGS -D__default_codegen__"
+ AC_DEFINE(__default_codegen__, 1, [...])
fi
if test "x$enable_nacl_gc" = "xyes"; then
if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
# libgc's gc_locks.h depends on this
- NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
sgen_supported=true
;;
arm*-linux*)
AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
if test "x$mono_debugger_supported" = "xyes"; then
BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
- NESTED_LIBGC_FLAGS="-DMONO_DEBUGGER_SUPPORTED"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DMONO_DEBUGGER_SUPPORTED"
fi
AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
AC_MSG_RESULT($mono_debugger_supported)
AC_DEFINE(DISABLE_ICALL_TABLES, 1, [Icall tables disabled])
fi
-if test "x$mono_cv_clang" = "xyes"; then
- # FIXME: This causes many compilation errors
- with_tls=pthread
-fi
-
if test "x$with_tls" = "x__thread"; then
AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
# Pass the information to libgc
AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
], [
AC_MSG_RESULT(yes)
- # CLANG doesn't support this yet, and it prints warnings about it
- if test "x$mono_cv_clang" = "xno"; then
- AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tld_model available])
- fi
+ AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tls_model available])
], [
AC_MSG_RESULT(no)
])
if test ${armv6} = yes; then
AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
# libgc's gc_locks.h depends on this
- NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
fi
fi
fi
# The problem with this approach, is that during a reconfigure, the main
# configure scripts gets invoked with these arguments, so we use separate
# variables understood by libgc's configure to pass CPPFLAGS and CFLAGS.
- TMP_CPPFLAGS="$CPPFLAGS $NESTED_LIBGC_FLAGS"
+ TMP_CPPFLAGS="$CPPFLAGS $CPPFLAGS_FOR_LIBGC"
if test x$TARGET = xSPARC -o x$TARGET = xSPARC64; then
TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-D_FILE_OFFSET_BITS=64//g'`
fi
if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
LIBMONO_LA=libmini-static.la
else
- LIBMONO_LA=libmono-$API_VER.la
+ LIBMONO_LA=libmonosgen-$API_VER.la
fi
AC_SUBST(LIBMONO_LA)
sed -e "s,-mno-cygwin,,g" libtool > libtool.new; mv libtool.new libtool; chmod 755 libtool
fi
+if test x$platform_darwin = xyes; then
+ # This doesn't seem to be required and it slows down parallel builds
+ sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool
+fi
+
(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
pic_options='-fno-common'
;;
*)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
+#
+# Mono currently supports 10.6, but strndup is not available prior to 10.7; avoiding
+# the detection of strndup on OS X so Mono built on 10.7+ still runs on 10.6. This can be
+# removed once support for 10.6 is dropped.
#
# iOS detection of strndup and getpwuid_r is faulty for some reason so let's simply avoid it
#
-if test x$target_ios = xno; then
+if test x$target_osx = xyes; then
+AC_CHECK_FUNCS(getpwuid_r)
+elif test x$target_ios = xno; then
AC_CHECK_FUNCS(strndup getpwuid_r)
fi
-Subproject commit 822de0117a079369b9404429662e120bd24245d4
+Subproject commit 10b8312c8024111780ee382688cd4c8754b1f1ac
?86-pc-cygwin*|i?86-pc-cygwin*)
pic_options='-DDLL_EXPORT'
;;
-i?86-apple-darwin*)
+i?86-apple-darwin*|arm-apple-darwin*)
pic_options='-fno-common'
;;
*)
.\" Copyright 2003 Ximian, Inc.
.\" Copyright 2004-2011 Novell, Inc.
.\" Copyright 2011-2012 Xamarin Inc
+.\" Copyright 2013 7digital Media Ltd.
.\" Author:
.\" Miguel de Icaza (miguel@gnu.org)
.\"
-.TH Mono "Mono 2.11"
+.TH Mono "Mono 3.0"
.SH NAME
mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
.SH SYNOPSIS
variable in your environment before starting the application and no action will
be taken.
.TP
+\fBMONO_ASPNET_WEBCONFIG_CACHESIZE\fR
+Mono has a cache of ConfigSection objects for speeding up WebConfigurationManager
+queries. Its default size is 100 items, and when more items are needed, cache
+evictions start happening. If evictions are too frequent this could impose
+unnecessary overhead, which could be avoided by using this environment variable
+to set up a higher cache size (or to lower memory requirements by decreasing it).
+.TP
+\fBMONO_CAIRO_DEBUG_DISPOSE\fR
+If set, causes Mono.Cairo to collect stack traces when objects are allocated,
+so that the finalization/Dispose warnings include information about the
+instance's origin.
+.TP
\fBMONO_CFG_DIR\fR
If set, this variable overrides the default system configuration directory
($PREFIX/etc). It's used to locate machine.config file.
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \
- echo "*** Read INSTALL.txt for information on how to bootstrap a Mono installation." 1>&2 ; \
+ echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
thisdir = class/Facades
-net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.Serialization System.Xml.XmlSerializer \
+net_4_5_SUBDIRS = System.Runtime System.Linq System.Xml.XmlSerializer \
System.ServiceModel.Primitives System.Xml.ReaderWriter System.Diagnostics.Debug \
System.Runtime.Extensions System.Diagnostics.Tools System.Collections \
System.ComponentModel.EventBasedAsync System.ComponentModel System.ObjectModel \
System.Text.Encoding.Extensions System.Linq.Queryable System.Linq.Expressions \
System.Net.Primitives System.Net.Requests System.Net.NetworkInformation \
System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml \
- System.Runtime.Serialization.Json System.ServiceModel.Http System.Windows \
+ System.Runtime.Serialization.Json System.ServiceModel.Http \
System.Xml.XDocument System.Threading.Tasks System.Diagnostics.Contracts \
System.Dynamic.Runtime System.ComponentModel.Annotations System.Runtime.Numerics \
System.Linq.Parallel System.Collections.Concurrent System.Threading.Tasks.Parallel \
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+++ /dev/null
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle ("System.Windows.dll")]
-[assembly: AssemblyDescription ("System.Windows.dll")]
-[assembly: AssemblyDefaultAlias ("System.Windows.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
+++ /dev/null
-thisdir = class/Facades/System.Windows
-SUBDIRS =
-include ../../../build/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Windows.dll
-LIB_MCS_FLAGS = /r:System
-
-NO_TEST = yes
-
-include ../../../build/library.make
+++ /dev/null
-AssemblyInfo.cs
-TypeForwarders.cs
-../../../build/common/Consts.cs
+++ /dev/null
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataErrorsChangedEventArgs))]
-
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+++ /dev/null
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyTitle ("System.Xml.Serialization.dll")]
-[assembly: AssemblyDescription ("System.Xml.Serialization.dll")]
-[assembly: AssemblyDefaultAlias ("System.Xml.Serialization.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-[assembly: AssemblyDelaySign (true)]
-[assembly: AssemblyKeyFile ("../../msfinal.pub")]
-
-[assembly: ReferenceAssembly]
+++ /dev/null
-thisdir = class/Facades/System.Xml.Serialization
-SUBDIRS =
-include ../../../build/rules.make
-
-LIBRARY_SUBDIR = Facades
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
-
-LIBRARY = System.Xml.Serialization.dll
-LIB_MCS_FLAGS = /r:System.Xml /r:System.ServiceModel
-
-NO_TEST = yes
-
-include ../../../build/library.make
+++ /dev/null
-AssemblyInfo.cs
-TypeForwarders.cs
-../../../build/common/Consts.cs
+++ /dev/null
-//
-// TypeForwarders.cs
-//
-// Author:
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMapping))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTypeMapping))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMappingAccess))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
-[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
-
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../../msfinal.pub")]
System.IO.Compression.FileSystem \
System.ComponentModel.DataAnnotations \
System.ComponentModel.Composition.4.5 \
+ System.Net \
+ System.Windows \
+ System.Xml.Serialization \
Facades
monodroid_dirs := \
System.Threading.Tasks.Dataflow \
System.ComponentModel.Composition.4.5 \
System.Net.Http \
+ System.Net.Http.WebRequest \
System.Web.Razor \
System.Web.WebPages.Deployment \
System.Web.WebPages \
Mono.CodeContracts \
System.IO.Compression \
System.IO.Compression.FileSystem \
+ System.Windows \
+ System.Xml.Serialization \
Facades
net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) aot-compiler
../../build/common/Locale.cs
./Mono.Cairo/Antialias.cs
./Mono.Cairo/Cairo.cs
+./Mono.Cairo/CairoDebug.cs
+./Mono.Cairo/Color.cs
./Mono.Cairo/Content.cs
./Mono.Cairo/Context.cs
./Mono.Cairo/DirectFBSurface.cs
+./Mono.Cairo/Distance.cs
./Mono.Cairo/Extend.cs
./Mono.Cairo/FillRule.cs
./Mono.Cairo/Filter.cs
./Mono.Cairo/Pattern.cs
./Mono.Cairo/PatternType.cs
./Mono.Cairo/PdfSurface.cs
+./Mono.Cairo/Point.cs
+./Mono.Cairo/PointD.cs
./Mono.Cairo/PSSurface.cs
./Mono.Cairo/RadialGradient.cs
./Mono.Cairo/Rectangle.cs
+./Mono.Cairo/Region.cs
./Mono.Cairo/ScaledFont.cs
./Mono.Cairo/SolidPattern.cs
./Mono.Cairo/Status.cs
--- /dev/null
+//
+// CairoDebug.cs
+//
+// Author:
+// Michael Hutchinson (mhutch@xamarin.com)
+//
+// Copyright (C) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Cairo {
+
+ static class CairoDebug
+ {
+ static System.Collections.Generic.Dictionary<IntPtr,string> traces;
+
+ public static readonly bool Enabled;
+
+ static CairoDebug ()
+ {
+ var dbg = Environment.GetEnvironmentVariable ("MONO_CAIRO_DEBUG_DISPOSE");
+ if (dbg == null)
+ return;
+ Enabled = true;
+ traces = new System.Collections.Generic.Dictionary<IntPtr,string> ();
+ }
+
+ public static void OnAllocated (IntPtr obj)
+ {
+ if (!Enabled)
+ throw new InvalidOperationException ();
+
+ traces[obj] = Environment.StackTrace;
+ }
+
+ public static void OnDisposed<T> (IntPtr obj, bool disposing)
+ {
+ if (disposing && !Enabled)
+ throw new InvalidOperationException ();
+
+ if (Environment.HasShutdownStarted)
+ return;
+
+ if (!disposing) {
+ Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName);
+ if (Enabled) {
+ string val;
+ if (traces.TryGetValue (obj, out val)) {
+ Console.Error.WriteLine ("Allocated from:");
+ Console.Error.WriteLine (val);
+ }
+ } else {
+ Console.Error.WriteLine ("Set MONO_CAIRO_DEBUG_DISPOSE to track allocation traces");
+ }
+ }
+
+ if (Enabled)
+ traces.Remove (obj);
+ }
+ }
+
+}
--- /dev/null
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+// Duncan Mak (duncan@ximian.com)
+// Miguel de Icaza (miguel@novell.com)
+// Hisham Mardam Bey (hisham.mardambey@gmail.com)
+// Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+ public struct Color
+ {
+ public Color(double r, double g, double b) : this (r, g, b, 1.0)
+ {
+ }
+
+ public Color(double r, double g, double b, double a)
+ {
+ this.r = r;
+ this.g = g;
+ this.b = b;
+ this.a = a;
+ }
+
+ double r, g, b, a;
+
+ public double R {
+ get { return r; }
+ set { r = value; }
+ }
+
+ public double G {
+ get { return g; }
+ set { g = value; }
+ }
+
+ public double B {
+ get { return b; }
+ set { b = value; }
+ }
+
+ public double A {
+ get { return a; }
+ set { a = value; }
+ }
+ }
+}
// 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
namespace Cairo {
- public struct Point
- {
- public Point (int x, int y)
- {
- this.x = x;
- this.y = y;
- }
-
- int x, y;
- public int X {
- get { return x; }
- set { x = value; }
- }
-
- public int Y {
- get { return y; }
- set { y = value; }
- }
- }
-
- public struct PointD
- {
- public PointD (double x, double y)
- {
- this.x = x;
- this.y = y;
- }
-
- double x, y;
- public double X {
- get { return x; }
- set { x = value; }
- }
-
- public double Y {
- get { return y; }
- set { y = value; }
- }
- }
-
-
- public struct Distance
- {
- public Distance (double dx, double dy)
- {
- this.dx = dx;
- this.dy = dy;
- }
-
- double dx, dy;
- public double Dx {
- get { return dx; }
- set { dx = value; }
- }
-
- public double Dy {
- get { return dy; }
- set { dy = value; }
- }
- }
-
- public struct Color
- {
- public Color(double r, double g, double b) : this (r, g, b, 1.0)
- {
- }
-
- public Color(double r, double g, double b, double a)
- {
- this.r = r;
- this.g = g;
- this.b = b;
- this.a = a;
- }
-
- double r, g, b, a;
-
- public double R {
- get { return r; }
- set { r = value; }
- }
-
- public double G {
- get { return g; }
- set { g = value; }
- }
-
- public double B {
- get { return b; }
- set { b = value; }
- }
-
- public double A {
- get { return a; }
- set { a = value; }
- }
-
- }
-
[Obsolete ("Renamed Cairo.Context per suggestion from cairo binding guidelines.")]
public class Graphics : Context {
public Graphics (IntPtr state) : base (state) {}
public Graphics (Surface surface) : base (surface) {}
}
- public class Context : IDisposable
- {
- internal IntPtr state = IntPtr.Zero;
+ public class Context : IDisposable
+ {
+ IntPtr handle = IntPtr.Zero;
static int native_glyph_size, c_compiler_long_size;
-
+
static Context ()
{
//
// is 32 bits
//
int ptr_size = Marshal.SizeOf (typeof (IntPtr));
-
+
PlatformID platform = Environment.OSVersion.Platform;
if (platform == PlatformID.Win32NT ||
platform == PlatformID.Win32S ||
native_glyph_size = Marshal.SizeOf (typeof (Glyph));
}
}
-
- public Context (Surface surface)
- {
- state = NativeMethods.cairo_create (surface.Handle);
- }
-
- public Context (IntPtr state)
+
+ public Context (Surface surface) : this (NativeMethods.cairo_create (surface.Handle), true)
{
- this.state = state;
}
-
+
+
+ public Context (IntPtr handle, bool owner)
+ {
+ this.handle = handle;
+ if (!owner)
+ NativeMethods.cairo_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
+ }
+
+ [Obsolete]
+ public Context (IntPtr state) : this (state, true)
+ {
+ }
+
~Context ()
{
Dispose (false);
}
- void IDisposable.Dispose ()
+ public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
-
- protected virtual void Dispose (bool disposing)
- {
- if (!disposing){
- Console.Error.WriteLine ("Cairo.Context: called from finalization thread, programmer is missing a call to Dispose");
- return;
- }
-
- if (state == IntPtr.Zero)
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<Context> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
return;
- //Console.WriteLine ("Destroying");
- NativeMethods.cairo_destroy (state);
- state = IntPtr.Zero;
- }
+ NativeMethods.cairo_destroy (handle);
+ handle = IntPtr.Zero;
- public void Save ()
- {
- NativeMethods.cairo_save (state);
- }
+ }
- public void Restore ()
- {
- NativeMethods.cairo_restore (state);
- }
+ public void Save ()
+ {
+ NativeMethods.cairo_save (handle);
+ }
+
+ public void Restore ()
+ {
+ NativeMethods.cairo_restore (handle);
+ }
public Antialias Antialias {
- get { return NativeMethods.cairo_get_antialias (state); }
- set { NativeMethods.cairo_set_antialias (state, value); }
- }
-
- public Cairo.Status Status {
- get {
- return NativeMethods.cairo_status (state);
- }
- }
-
- public IntPtr Handle {
- get {
- return state;
- }
- }
-
- public Cairo.Operator Operator {
- set {
- NativeMethods.cairo_set_operator (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_operator (state);
- }
- }
-
- //FIXME: obsolete this property
- public Cairo.Color Color {
- set {
- NativeMethods.cairo_set_source_rgba (state, value.R, value.G, value.B, value.A);
- }
- }
-
- [Obsolete ("Use Color property")]
- public Cairo.Color ColorRgb {
- set {
+ get { return NativeMethods.cairo_get_antialias (handle); }
+ set { NativeMethods.cairo_set_antialias (handle, value); }
+ }
+
+ public Cairo.Status Status {
+ get {
+ return NativeMethods.cairo_status (handle);
+ }
+ }
+
+ public IntPtr Handle {
+ get {
+ return handle;
+ }
+ }
+
+ public Operator Operator {
+ set {
+ NativeMethods.cairo_set_operator (handle, value);
+ }
+
+ get {
+ return NativeMethods.cairo_get_operator (handle);
+ }
+ }
+
+ [Obsolete ("Use SetSourceRGBA method")]
+ public Color Color {
+ set {
+ NativeMethods.cairo_set_source_rgba (handle, value.R, value.G, value.B, value.A);
+ }
+ }
+
+ [Obsolete ("Use SetSourceRGBA method")]
+ public Cairo.Color ColorRgb {
+ set {
Color = new Color (value.R, value.G, value.B);
}
- }
+ }
- public double Tolerance {
+ public double Tolerance {
get {
- return NativeMethods.cairo_get_tolerance (state);
- }
-
- set {
- NativeMethods.cairo_set_tolerance (state, value);
- }
- }
-
- public Cairo.FillRule FillRule {
- set {
- NativeMethods.cairo_set_fill_rule (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_fill_rule (state);
- }
- }
-
- public double LineWidth {
- set {
- NativeMethods.cairo_set_line_width (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_line_width (state);
- }
- }
-
- public Cairo.LineCap LineCap {
- set {
- NativeMethods.cairo_set_line_cap (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_line_cap (state);
- }
- }
-
- public Cairo.LineJoin LineJoin {
- set {
- NativeMethods.cairo_set_line_join (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_line_join (state);
- }
- }
-
- public void SetDash (double [] dashes, double offset)
- {
- NativeMethods.cairo_set_dash (state, dashes, dashes.Length, offset);
- }
-
- public Pattern Pattern {
- set {
- NativeMethods.cairo_set_source (state, value.Pointer);
- }
-
+ return NativeMethods.cairo_get_tolerance (handle);
+ }
+
+ set {
+ NativeMethods.cairo_set_tolerance (handle, value);
+ }
+ }
+
+ public Cairo.FillRule FillRule {
+ set {
+ NativeMethods.cairo_set_fill_rule (handle, value);
+ }
+
get {
- return new Pattern (NativeMethods.cairo_get_source (state));
- }
- }
-
- public Pattern Source {
- set {
- NativeMethods.cairo_set_source (state, value.Pointer);
- }
-
+ return NativeMethods.cairo_get_fill_rule (handle);
+ }
+ }
+
+ public double LineWidth {
+ set {
+ NativeMethods.cairo_set_line_width (handle, value);
+ }
+
get {
- return Pattern.Lookup (NativeMethods.cairo_get_source (state));
- }
- }
-
- public double MiterLimit {
- set {
- NativeMethods.cairo_set_miter_limit (state, value);
- }
-
- get {
- return NativeMethods.cairo_get_miter_limit (state);
- }
- }
-
- public PointD CurrentPoint {
- get {
- double x, y;
- NativeMethods.cairo_get_current_point (state, out x, out y);
- return new PointD (x, y);
- }
- }
-
- public Cairo.Surface Target {
- set {
- if (state != IntPtr.Zero)
- NativeMethods.cairo_destroy (state);
-
- state = NativeMethods.cairo_create (value.Handle);
- }
-
- get {
- return Cairo.Surface.LookupExternalSurface (
- NativeMethods.cairo_get_target (state));
- }
- }
-
- public Cairo.ScaledFont ScaledFont {
- set {
- NativeMethods.cairo_set_scaled_font (state, value.Handle);
- }
-
- get {
- return new ScaledFont (NativeMethods.cairo_get_scaled_font (state));
- }
- }
+ return NativeMethods.cairo_get_line_width (handle);
+ }
+ }
+
+ public Cairo.LineCap LineCap {
+ set {
+ NativeMethods.cairo_set_line_cap (handle, value);
+ }
+
+ get {
+ return NativeMethods.cairo_get_line_cap (handle);
+ }
+ }
+
+ public Cairo.LineJoin LineJoin {
+ set {
+ NativeMethods.cairo_set_line_join (handle, value);
+ }
+
+ get {
+ return NativeMethods.cairo_get_line_join (handle);
+ }
+ }
+
+ public void SetDash (double [] dashes, double offset)
+ {
+ NativeMethods.cairo_set_dash (handle, dashes, dashes.Length, offset);
+ }
+
+ [Obsolete("Use GetSource/GetSource")]
+ public Pattern Pattern {
+ set {
+ SetSource (value);
+ }
+ get {
+ return GetSource ();
+ }
+ }
+
+ //This is obsolete because it wasn't obvious it needed to be disposed
+ [Obsolete("Use GetSource/GetSource")]
+ public Pattern Source {
+ set {
+ SetSource (value);
+ }
+ get {
+ return GetSource ();
+ }
+ }
+
+ public void SetSource (Pattern source)
+ {
+ NativeMethods.cairo_set_source (handle, source.Handle);
+ }
+
+ public Pattern GetSource ()
+ {
+ var ptr = NativeMethods.cairo_get_source (handle);
+ return Cairo.Pattern.Lookup (ptr, false);
+ }
+
+ public double MiterLimit {
+ set {
+ NativeMethods.cairo_set_miter_limit (handle, value);
+ }
+
+ get {
+ return NativeMethods.cairo_get_miter_limit (handle);
+ }
+ }
+
+ public PointD CurrentPoint {
+ get {
+ double x, y;
+ NativeMethods.cairo_get_current_point (handle, out x, out y);
+ return new PointD (x, y);
+ }
+ }
+
+ [Obsolete ("Use GetTarget/SetTarget")]
+ public Cairo.Surface Target {
+ set {
+ if (handle != IntPtr.Zero)
+ NativeMethods.cairo_destroy (handle);
+
+ handle = NativeMethods.cairo_create (value.Handle);
+ }
+
+ get {
+ return GetTarget ();
+ }
+ }
+
+ public Surface GetTarget ()
+ {
+ return Surface.Lookup (NativeMethods.cairo_get_target (handle), false);
+ }
+
+ public void SetTarget (Surface target)
+ {
+ if (handle != IntPtr.Zero)
+ NativeMethods.cairo_destroy (handle);
+ handle = NativeMethods.cairo_create (target.Handle);
+ }
+
+ [Obsolete("Use GetScaledFont/SetScaledFont")]
+ public ScaledFont ScaledFont {
+ set {
+ SetScaledFont (value);
+ }
+
+ get {
+ return GetScaledFont ();
+ }
+ }
+
+ public ScaledFont GetScaledFont ()
+ {
+ return new ScaledFont (NativeMethods.cairo_get_scaled_font (handle), false);
+ }
+
+ public void SetScaledFont (ScaledFont font)
+ {
+ NativeMethods.cairo_set_scaled_font (handle, font.Handle);
+ }
public uint ReferenceCount {
- get { return NativeMethods.cairo_get_reference_count (state); }
+ get { return NativeMethods.cairo_get_reference_count (handle); }
}
public void SetSourceRGB (double r, double g, double b)
{
- NativeMethods.cairo_set_source_rgb (state, r, g, b);
+ NativeMethods.cairo_set_source_rgb (handle, r, g, b);
}
public void SetSourceRGBA (double r, double g, double b, double a)
{
- NativeMethods.cairo_set_source_rgba (state, r, g, b, a);
+ NativeMethods.cairo_set_source_rgba (handle, r, g, b, a);
}
//[Obsolete ("Use SetSource method (with double parameters)")]
public void SetSourceSurface (Surface source, int x, int y)
{
- NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
+ NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
}
public void SetSource (Surface source, double x, double y)
{
- NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
+ NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
}
public void SetSource (Surface source)
{
- NativeMethods.cairo_set_source_surface (state, source.Handle, 0, 0);
+ NativeMethods.cairo_set_source_surface (handle, source.Handle, 0, 0);
}
-
+
#region Path methods
-
- public void NewPath ()
- {
- NativeMethods.cairo_new_path (state);
- }
+
+ public void NewPath ()
+ {
+ NativeMethods.cairo_new_path (handle);
+ }
public void NewSubPath ()
{
- NativeMethods.cairo_new_sub_path (state);
+ NativeMethods.cairo_new_sub_path (handle);
}
-
- public void MoveTo (PointD p)
- {
+
+ public void MoveTo (PointD p)
+ {
MoveTo (p.X, p.Y);
- }
+ }
public void MoveTo (double x, double y)
{
- NativeMethods.cairo_move_to (state, x, y);
+ NativeMethods.cairo_move_to (handle, x, y);
}
-
- public void LineTo (PointD p)
+
+ public void LineTo (PointD p)
{
LineTo (p.X, p.Y);
}
-
+
public void LineTo (double x, double y)
- {
- NativeMethods.cairo_line_to (state, x, y);
- }
+ {
+ NativeMethods.cairo_line_to (handle, x, y);
+ }
- public void CurveTo (PointD p1, PointD p2, PointD p3)
+ public void CurveTo (PointD p1, PointD p2, PointD p3)
{
CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
}
-
- public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
- {
- NativeMethods.cairo_curve_to (state, x1, y1, x2, y2, x3, y3);
- }
- public void RelMoveTo (Distance d)
+ public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
+ {
+ NativeMethods.cairo_curve_to (handle, x1, y1, x2, y2, x3, y3);
+ }
+
+ public void RelMoveTo (Distance d)
{
RelMoveTo (d.Dx, d.Dy);
}
-
- public void RelMoveTo (double dx, double dy)
- {
- NativeMethods.cairo_rel_move_to (state, dx, dy);
- }
-
- public void RelLineTo (Distance d)
- {
+
+ public void RelMoveTo (double dx, double dy)
+ {
+ NativeMethods.cairo_rel_move_to (handle, dx, dy);
+ }
+
+ public void RelLineTo (Distance d)
+ {
RelLineTo (d.Dx, d.Dy);
- }
-
- public void RelLineTo (double dx, double dy)
+ }
+
+ public void RelLineTo (double dx, double dy)
{
- NativeMethods.cairo_rel_line_to (state, dx, dy);
+ NativeMethods.cairo_rel_line_to (handle, dx, dy);
}
-
- public void RelCurveTo (Distance d1, Distance d2, Distance d3)
+
+ public void RelCurveTo (Distance d1, Distance d2, Distance d3)
{
RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
}
- public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
- {
- NativeMethods.cairo_rel_curve_to (state, dx1, dy1, dx2, dy2, dx3, dy3);
- }
+ public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
+ {
+ NativeMethods.cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3);
+ }
+
+ public void Arc (double xc, double yc, double radius, double angle1, double angle2)
+ {
+ NativeMethods.cairo_arc (handle, xc, yc, radius, angle1, angle2);
+ }
- public void Arc (double xc, double yc, double radius, double angle1, double angle2)
- {
- NativeMethods.cairo_arc (state, xc, yc, radius, angle1, angle2);
- }
+ public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
+ {
+ NativeMethods.cairo_arc_negative (handle, xc, yc, radius, angle1, angle2);
+ }
- public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
- {
- NativeMethods.cairo_arc_negative (state, xc, yc, radius, angle1, angle2);
- }
-
- public void Rectangle (Rectangle rectangle)
+ public void Rectangle (Rectangle rectangle)
{
Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
- public void Rectangle (PointD p, double width, double height)
+ public void Rectangle (PointD p, double width, double height)
{
Rectangle (p.X, p.Y, width, height);
}
- public void Rectangle (double x, double y, double width, double height)
- {
- NativeMethods.cairo_rectangle (state, x, y, width, height);
- }
-
- public void ClosePath ()
- {
- NativeMethods.cairo_close_path (state);
- }
+ public void Rectangle (double x, double y, double width, double height)
+ {
+ NativeMethods.cairo_rectangle (handle, x, y, width, height);
+ }
+
+ public void ClosePath ()
+ {
+ NativeMethods.cairo_close_path (handle);
+ }
- public Path CopyPath ()
+ public Path CopyPath ()
{
- return new Path (NativeMethods.cairo_copy_path (state));
+ return new Path (NativeMethods.cairo_copy_path (handle));
}
public Path CopyPathFlat ()
{
- return new Path (NativeMethods.cairo_copy_path_flat (state));
+ return new Path (NativeMethods.cairo_copy_path_flat (handle));
}
public void AppendPath (Path path)
{
- NativeMethods.cairo_append_path (state, path.handle);
+ NativeMethods.cairo_append_path (handle, path.Handle);
}
-
+
#endregion
#region Painting Methods
public void Paint ()
{
- NativeMethods.cairo_paint (state);
+ NativeMethods.cairo_paint (handle);
}
-
+
public void PaintWithAlpha (double alpha)
{
- NativeMethods.cairo_paint_with_alpha (state, alpha);
+ NativeMethods.cairo_paint_with_alpha (handle, alpha);
}
-
+
public void Mask (Pattern pattern)
{
- NativeMethods.cairo_mask (state, pattern.Pointer);
+ NativeMethods.cairo_mask (handle, pattern.Handle);
}
-
+
public void MaskSurface (Surface surface, double surface_x, double surface_y)
{
- NativeMethods.cairo_mask_surface (state, surface.Handle, surface_x, surface_y);
+ NativeMethods.cairo_mask_surface (handle, surface.Handle, surface_x, surface_y);
+ }
+
+ public void Stroke ()
+ {
+ NativeMethods.cairo_stroke (handle);
+ }
+
+ public void StrokePreserve ()
+ {
+ NativeMethods.cairo_stroke_preserve (handle);
}
-
- public void Stroke ()
- {
- NativeMethods.cairo_stroke (state);
- }
-
- public void StrokePreserve ()
- {
- NativeMethods.cairo_stroke_preserve (state);
- }
public Rectangle StrokeExtents ()
{
double x1, y1, x2, y2;
- NativeMethods.cairo_stroke_extents (state, out x1, out y1, out x2, out y2);
- return new Rectangle (x1, y1, x2, y2);
+ NativeMethods.cairo_stroke_extents (handle, out x1, out y1, out x2, out y2);
+ return new Rectangle (x1, y1, x2 - x1, y2 - y1);
}
- public void Fill ()
- {
- NativeMethods.cairo_fill (state);
- }
+ public void Fill ()
+ {
+ NativeMethods.cairo_fill (handle);
+ }
- public Rectangle FillExtents ()
+ public Rectangle FillExtents ()
{
double x1, y1, x2, y2;
- NativeMethods.cairo_fill_extents (state, out x1, out y1, out x2, out y2);
- return new Rectangle (x1, y1, x2, y2);
+ NativeMethods.cairo_fill_extents (handle, out x1, out y1, out x2, out y2);
+ return new Rectangle (x1, y1, x2 - x1, y2 - y1);
}
public void FillPreserve ()
{
- NativeMethods.cairo_fill_preserve (state);
+ NativeMethods.cairo_fill_preserve (handle);
}
#endregion
- public void Clip ()
- {
- NativeMethods.cairo_clip (state);
- }
+ public void Clip ()
+ {
+ NativeMethods.cairo_clip (handle);
+ }
public void ClipPreserve ()
{
- NativeMethods.cairo_clip_preserve (state);
+ NativeMethods.cairo_clip_preserve (handle);
}
-
+
public void ResetClip ()
{
- NativeMethods.cairo_reset_clip (state);
+ NativeMethods.cairo_reset_clip (handle);
}
-
+
public bool InStroke (double x, double y)
{
- return NativeMethods.cairo_in_stroke (state, x, y);
+ return NativeMethods.cairo_in_stroke (handle, x, y);
}
public bool InFill (double x, double y)
{
- return NativeMethods.cairo_in_fill (state, x, y);
+ return NativeMethods.cairo_in_fill (handle, x, y);
}
public Pattern PopGroup ()
{
- return Pattern.Lookup (NativeMethods.cairo_pop_group (state));
+ return Pattern.Lookup (NativeMethods.cairo_pop_group (handle), true);
}
public void PopGroupToSource ()
{
- NativeMethods.cairo_pop_group_to_source (state);
+ NativeMethods.cairo_pop_group_to_source (handle);
}
public void PushGroup ()
{
- NativeMethods.cairo_push_group (state);
+ NativeMethods.cairo_push_group (handle);
}
public void PushGroup (Content content)
{
- NativeMethods.cairo_push_group_with_content (state, content);
+ NativeMethods.cairo_push_group_with_content (handle, content);
}
+ [Obsolete ("Use GetGroupTarget()")]
public Surface GroupTarget {
get {
- IntPtr surface = NativeMethods.cairo_get_group_target (state);
- return Surface.LookupSurface (surface);
+ return GetGroupTarget ();
}
}
- public void Rotate (double angle)
- {
- NativeMethods.cairo_rotate (state, angle);
- }
+ public Surface GetGroupTarget ()
+ {
+ IntPtr surface = NativeMethods.cairo_get_group_target (handle);
+ return Surface.Lookup (surface, false);
+ }
- public void Scale (double sx, double sy)
- {
- NativeMethods.cairo_scale (state, sx, sy);
- }
+ public void Rotate (double angle)
+ {
+ NativeMethods.cairo_rotate (handle, angle);
+ }
+
+ public void Scale (double sx, double sy)
+ {
+ NativeMethods.cairo_scale (handle, sx, sy);
+ }
+
+ public void Translate (double tx, double ty)
+ {
+ NativeMethods.cairo_translate (handle, tx, ty);
+ }
- public void Translate (double tx, double ty)
- {
- NativeMethods.cairo_translate (state, tx, ty);
- }
-
public void Transform (Matrix m)
{
- NativeMethods.cairo_transform (state, m);
+ NativeMethods.cairo_transform (handle, m);
}
-
-#region Methods that will become obsolete in the long term, after 1.2.5 becomes wildly available
-
- //[Obsolete("Use UserToDevice instead")]
+
+ [Obsolete("Use UserToDevice instead")]
public void TransformPoint (ref double x, ref double y)
{
- NativeMethods.cairo_user_to_device (state, ref x, ref y);
+ NativeMethods.cairo_user_to_device (handle, ref x, ref y);
}
-
- //[Obsolete("Use UserToDeviceDistance instead")]
- public void TransformDistance (ref double dx, ref double dy)
+
+ [Obsolete("Use UserToDeviceDistance instead")]
+ public void TransformDistance (ref double dx, ref double dy)
{
- NativeMethods.cairo_user_to_device_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
}
-
- //[Obsolete("Use InverseTransformPoint instead")]
+
+ [Obsolete("Use InverseTransformPoint instead")]
public void InverseTransformPoint (ref double x, ref double y)
{
- NativeMethods.cairo_device_to_user (state, ref x, ref y);
+ NativeMethods.cairo_device_to_user (handle, ref x, ref y);
}
- //[Obsolete("Use DeviceToUserDistance instead")]
+ [Obsolete("Use DeviceToUserDistance instead")]
public void InverseTransformDistance (ref double dx, ref double dy)
{
- NativeMethods.cairo_device_to_user_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy);
}
-#endregion
-
+
public void UserToDevice (ref double x, ref double y)
{
- NativeMethods.cairo_user_to_device (state, ref x, ref y);
+ NativeMethods.cairo_user_to_device (handle, ref x, ref y);
}
-
- public void UserToDeviceDistance (ref double dx, ref double dy)
+
+ public void UserToDeviceDistance (ref double dx, ref double dy)
{
- NativeMethods.cairo_user_to_device_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
}
-
+
public void DeviceToUser (ref double x, ref double y)
{
- NativeMethods.cairo_device_to_user (state, ref x, ref y);
+ NativeMethods.cairo_device_to_user (handle, ref x, ref y);
}
public void DeviceToUserDistance (ref double dx, ref double dy)
{
- NativeMethods.cairo_device_to_user_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy);
}
-
- public Cairo.Matrix Matrix {
- set {
- NativeMethods.cairo_set_matrix (state, value);
- }
- get {
+ public Matrix Matrix {
+ set {
+ NativeMethods.cairo_set_matrix (handle, value);
+ }
+
+ get {
Matrix m = new Matrix();
- NativeMethods.cairo_get_matrix (state, m);
- return m;
- }
- }
+ NativeMethods.cairo_get_matrix (handle, m);
+ return m;
+ }
+ }
public void SetFontSize (double scale)
{
- NativeMethods.cairo_set_font_size (state, scale);
+ NativeMethods.cairo_set_font_size (handle, scale);
}
public void IdentityMatrix ()
{
- NativeMethods.cairo_identity_matrix (state);
+ NativeMethods.cairo_identity_matrix (handle);
}
-
+
[Obsolete ("Use SetFontSize() instead.")]
public void FontSetSize (double scale)
{
public double FontSize {
set { SetFontSize (value); }
}
-
+
public Matrix FontMatrix {
get {
Matrix m;
- NativeMethods.cairo_get_font_matrix (state, out m);
+ NativeMethods.cairo_get_font_matrix (handle, out m);
return m;
}
- set { NativeMethods.cairo_set_font_matrix (state, value); }
+ set { NativeMethods.cairo_set_font_matrix (handle, value); }
}
public FontOptions FontOptions {
get {
FontOptions options = new FontOptions ();
- NativeMethods.cairo_get_font_options (state, options.Handle);
+ NativeMethods.cairo_get_font_options (handle, options.Handle);
return options;
}
- set { NativeMethods.cairo_set_font_options (state, value.Handle); }
+ set { NativeMethods.cairo_set_font_options (handle, value.Handle); }
}
[StructLayout(LayoutKind.Sequential)]
} else {
foreach (Glyph g in glyphs){
NativeGlyph_4byte_longs n = new NativeGlyph_4byte_longs (g);
-
+
Marshal.StructureToPtr (n, (IntPtr)pos, false);
pos += native_glyph_size;
}
return dest;
}
- public void ShowGlyphs (Glyph[] glyphs)
+ public void ShowGlyphs (Glyph[] glyphs)
{
- IntPtr ptr;
+ IntPtr ptr;
- ptr = FromGlyphToUnManagedMemory (glyphs);
-
- NativeMethods.cairo_show_glyphs (state, ptr, glyphs.Length);
+ ptr = FromGlyphToUnManagedMemory (glyphs);
- Marshal.FreeHGlobal (ptr);
+ NativeMethods.cairo_show_glyphs (handle, ptr, glyphs.Length);
+
+ Marshal.FreeHGlobal (ptr);
}
[Obsolete("The matrix argument was never used, use ShowGlyphs(Glyphs []) instead")]
- public void ShowGlyphs (Matrix matrix, Glyph[] glyphs)
- {
+ public void ShowGlyphs (Matrix matrix, Glyph[] glyphs)
+ {
ShowGlyphs (glyphs);
- }
+ }
[Obsolete("The matrix argument was never used, use GlyphPath(Glyphs []) instead")]
- public void GlyphPath (Matrix matrix, Glyph[] glyphs)
- {
+ public void GlyphPath (Matrix matrix, Glyph[] glyphs)
+ {
GlyphPath (glyphs);
}
public void GlyphPath (Glyph[] glyphs)
{
- IntPtr ptr;
+ IntPtr ptr;
+
+ ptr = FromGlyphToUnManagedMemory (glyphs);
- ptr = FromGlyphToUnManagedMemory (glyphs);
+ NativeMethods.cairo_glyph_path (handle, ptr, glyphs.Length);
- NativeMethods.cairo_glyph_path (state, ptr, glyphs.Length);
+ Marshal.FreeHGlobal (ptr);
- Marshal.FreeHGlobal (ptr);
+ }
- }
+ public FontExtents FontExtents {
+ get {
+ FontExtents f_extents;
+ NativeMethods.cairo_font_extents (handle, out f_extents);
+ return f_extents;
+ }
+ }
- public FontExtents FontExtents {
- get {
- FontExtents f_extents;
- NativeMethods.cairo_font_extents (state, out f_extents);
- return f_extents;
- }
- }
-
public void CopyPage ()
{
- NativeMethods.cairo_copy_page (state);
+ NativeMethods.cairo_copy_page (handle);
}
[Obsolete ("Use SelectFontFace() instead.")]
SelectFontFace (family, slant, weight);
}
+ [Obsolete("Use GetFontFace/SetFontFace")]
public FontFace ContextFontFace {
get {
- return Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (state));
+ return GetContextFontFace ();
}
-
set {
- NativeMethods.cairo_set_font_face (state, value == null ? IntPtr.Zero : value.Handle);
+ SetContextFontFace (value);
}
}
-
+
+ public FontFace GetContextFontFace ()
+ {
+ return Cairo.FontFace.Lookup (NativeMethods.cairo_get_font_face (handle), false);
+ }
+
+ public void SetContextFontFace (FontFace value)
+ {
+ NativeMethods.cairo_set_font_face (handle, value == null ? IntPtr.Zero : value.Handle);
+ }
+
public void SelectFontFace (string family, FontSlant slant, FontWeight weight)
{
- NativeMethods.cairo_select_font_face (state, family, slant, weight);
+ NativeMethods.cairo_select_font_face (handle, family, slant, weight);
}
public void ShowPage ()
{
- NativeMethods.cairo_show_page (state);
+ NativeMethods.cairo_show_page (handle);
}
private static byte[] TerminateUtf8(byte[] utf8)
public void ShowText(string str)
{
- NativeMethods.cairo_show_text(state, TerminateUtf8(str));
+ NativeMethods.cairo_show_text (handle, TerminateUtf8(str));
}
public void ShowText(byte[] utf8)
{
- NativeMethods.cairo_show_text(state, TerminateUtf8(utf8));
+ NativeMethods.cairo_show_text (handle, TerminateUtf8(utf8));
}
public void TextPath(string str)
{
- NativeMethods.cairo_text_path(state, TerminateUtf8(str));
+ NativeMethods.cairo_text_path (handle, TerminateUtf8(str));
}
public void TextPath(byte[] utf8)
{
- NativeMethods.cairo_text_path(state, TerminateUtf8(utf8));
+ NativeMethods.cairo_text_path (handle, TerminateUtf8(utf8));
}
public TextExtents TextExtents(string s)
{
TextExtents extents;
- NativeMethods.cairo_text_extents(state, TerminateUtf8(s), out extents);
+ NativeMethods.cairo_text_extents (handle, TerminateUtf8(s), out extents);
return extents;
}
public TextExtents TextExtents(byte[] utf8)
{
TextExtents extents;
- NativeMethods.cairo_text_extents(state, TerminateUtf8(utf8), out extents);
+ NativeMethods.cairo_text_extents (handle, TerminateUtf8(utf8), out extents);
return extents;
}
TextExtents extents;
- NativeMethods.cairo_glyph_extents (state, ptr, glyphs.Length, out extents);
+ NativeMethods.cairo_glyph_extents (handle, ptr, glyphs.Length, out extents);
Marshal.FreeHGlobal (ptr);
return extents;
}
- }
+ }
}
}
public DirectFBSurface (IntPtr dfb, IntPtr dfb_surface)
+ : base (NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface), true)
{
- surface = NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface);
- lock (surfaces.SyncRoot) {
- surfaces [surface] = this;
- }
}
}
}
--- /dev/null
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+// Duncan Mak (duncan@ximian.com)
+// Miguel de Icaza (miguel@novell.com)
+// Hisham Mardam Bey (hisham.mardambey@gmail.com)
+// Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+ public struct Distance
+ {
+ public Distance (double dx, double dy)
+ {
+ this.dx = dx;
+ this.dy = dy;
+ }
+
+ double dx, dy;
+ public double Dx {
+ get { return dx; }
+ set { dx = value; }
+ }
+
+ public double Dy {
+ get { return dy; }
+ set { dy = value; }
+ }
+ }
+}
{
IntPtr handle;
- internal static FontFace Lookup (IntPtr handle)
+ internal static FontFace Lookup (IntPtr handle, bool owner)
{
if (handle == IntPtr.Zero)
return null;
-
- NativeMethods.cairo_font_face_reference (handle);
-
- return new FontFace (handle);
+ return new FontFace (handle, owner);
}
~FontFace ()
{
- // Since Cairo is not thread safe, we can not unref the
- // font_face here, the programmer must do this with Dispose
-
- Console.Error.WriteLine ("Programmer forgot to call Dispose on the FontFace");
Dispose (false);
}
public void Dispose ()
{
Dispose (true);
+ GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
- if (disposing)
- NativeMethods.cairo_font_face_destroy (handle);
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<FontFace> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
+ return;
+
+ NativeMethods.cairo_font_face_destroy (handle);
handle = IntPtr.Zero;
- GC.SuppressFinalize (this);
}
-
- // TODO: make non-public when all entry points are complete in binding
- public FontFace (IntPtr handle)
+
+ [Obsolete]
+ public FontFace (IntPtr handle) : this (handle, true)
+ {
+ }
+
+ public FontFace (IntPtr handle, bool owned)
{
this.handle = handle;
+ if (!owned)
+ NativeMethods.cairo_font_face_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
}
public IntPtr Handle {
public class FontOptions : IDisposable
{
IntPtr handle;
- bool disposed;
- public FontOptions ()
+ public FontOptions () : this (NativeMethods.cairo_font_options_create ())
{
- handle = NativeMethods.cairo_font_options_create ();
}
~FontOptions ()
internal FontOptions (IntPtr handle)
{
this.handle = handle;
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
}
public FontOptions Copy ()
return new FontOptions (NativeMethods.cairo_font_options_copy (handle));
}
+ [Obsolete ("Use Dispose()")]
public void Destroy ()
{
- NativeMethods.cairo_font_options_destroy (handle);
+ Dispose ();
}
public void Dispose ()
GC.SuppressFinalize (this);
}
- private void Dispose (bool disposing)
+ protected virtual void Dispose (bool disposing)
{
- if (!disposed) {
- Destroy ();
- handle = IntPtr.Zero;
- }
- disposed = true;
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<FontOptions> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
+ return;
+
+ NativeMethods.cairo_font_options_destroy (handle);
+ handle = IntPtr.Zero;
}
public static bool operator == (FontOptions options, FontOptions other)
}
public GlitzSurface (IntPtr glitz_surface)
+ : base (NativeMethods.cairo_glitz_surface_create (glitz_surface), true)
{
- surface = NativeMethods.cairo_glitz_surface_create (glitz_surface);
- lock (surfaces.SyncRoot) {
- surfaces [surface] = this;
- }
}
}
}
-//
+//
// Mono.Cairo.Gradient.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
using System;
namespace Cairo {
-
+
public class Gradient : Pattern
{
- protected Gradient (IntPtr handle) : base (handle)
+ protected Gradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
+ [Obsolete]
protected Gradient ()
{
}
public int ColorStopCount {
get {
int cnt;
- NativeMethods.cairo_pattern_get_color_stop_count (pattern, out cnt);
+ NativeMethods.cairo_pattern_get_color_stop_count (Handle, out cnt);
return cnt;
}
}
- public Status AddColorStop (double offset, Cairo.Color c)
+ public Status AddColorStop (double offset, Color c)
{
- NativeMethods.cairo_pattern_add_color_stop_rgba (pattern, offset, c.R, c.G, c.B, c.A);
+ NativeMethods.cairo_pattern_add_color_stop_rgba (Handle, offset, c.R, c.G, c.B, c.A);
return Status;
}
- public Status AddColorStopRgb (double offset, Cairo.Color c)
+ public Status AddColorStopRgb (double offset, Color c)
{
- NativeMethods.cairo_pattern_add_color_stop_rgb (pattern, offset, c.R, c.G, c.B);
+ NativeMethods.cairo_pattern_add_color_stop_rgb (Handle, offset, c.R, c.G, c.B);
return Status;
}
}
// 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
namespace Cairo {
- public class ImageSurface : Surface
- {
+ public class ImageSurface : Surface
+ {
internal ImageSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public ImageSurface (Format format, int width, int height)
+ : base (NativeMethods.cairo_image_surface_create (format, width, height), true)
{
- surface = NativeMethods.cairo_image_surface_create (format, width, height);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
-
+
[Obsolete ("Use ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)")]
- public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride) :this (data, format, width, height, stride)
+ public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride)
+ : this (data, format, width, height, stride)
{
}
- public ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)
+ public ImageSurface (byte[] data, Format format, int width, int height, int stride)
+ : base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true)
{
- surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
- public ImageSurface (IntPtr data, Cairo.Format format, int width, int height, int stride)
+ public ImageSurface (IntPtr data, Format format, int width, int height, int stride)
+ : base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true)
{
- surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
-
+
public ImageSurface (string filename)
+ : base (NativeMethods.cairo_image_surface_create_from_png (filename), true)
{
- surface = NativeMethods.cairo_image_surface_create_from_png (filename);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
-
+
public int Width {
- get { return NativeMethods.cairo_image_surface_get_width (surface); }
+ get { return NativeMethods.cairo_image_surface_get_width (Handle); }
}
-
+
public int Height {
- get { return NativeMethods.cairo_image_surface_get_height (surface); }
+ get { return NativeMethods.cairo_image_surface_get_height (Handle); }
}
-
+
public byte[] Data {
get {
- IntPtr ptr = NativeMethods.cairo_image_surface_get_data (surface);
+ IntPtr ptr = NativeMethods.cairo_image_surface_get_data (Handle);
int length = Height * Stride;
byte[] data = new byte[length];
Marshal.Copy (ptr, data, 0, length);
public IntPtr DataPtr {
get {
- return NativeMethods.cairo_image_surface_get_data (surface);
+ return NativeMethods.cairo_image_surface_get_data (Handle);
}
}
public Format Format {
- get { return NativeMethods.cairo_image_surface_get_format (surface); }
+ get { return NativeMethods.cairo_image_surface_get_format (Handle); }
}
public int Stride {
- get { return NativeMethods.cairo_image_surface_get_stride (surface); }
+ get { return NativeMethods.cairo_image_surface_get_stride (Handle); }
}
}
}
-//
+//
// Mono.Cairo.LinearGradient.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
using System;
namespace Cairo {
-
+
public class LinearGradient : Gradient
{
- internal LinearGradient (IntPtr handle) : base (handle)
+ internal LinearGradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
public LinearGradient (double x0, double y0, double x1, double y1)
+ : base (NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1), true)
{
- pattern = NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1);
}
public PointD[] LinearPoints {
- get {
+ get {
double x0, y0, x1, y1;
PointD[] points = new PointD [2];
- NativeMethods.cairo_pattern_get_linear_points (pattern, out x0, out y0, out x1, out y1);
+ NativeMethods.cairo_pattern_get_linear_points (Handle, out x0, out y0, out x1, out y1);
points[0] = new PointD (x0, y0);
points[1] = new PointD (x1, y1);
return points;
- }
- }
-
+ }
+ }
}
}
// 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
namespace Cairo {
- [StructLayout(LayoutKind.Sequential)]
- public class Matrix : ICloneable
- {
+ [StructLayout(LayoutKind.Sequential)]
+ public class Matrix : ICloneable
+ {
public double Xx;
public double Yx;
- public double Xy;
+ public double Xy;
public double Yy;
- public double X0;
+ public double X0;
public double Y0;
public Matrix (double xx, double yx, double xy, double yy,
double x0, double y0)
- {
+ {
this.Xx = xx; this.Yx = yx; this.Xy = xy;
this.Yy = yy; this.X0 = x0; this.Y0 = y0;
}
-
- public Matrix ()
+
+ public Matrix ()
{
this.InitIdentity ();
}
-
+
public bool IsIdentity ()
{
return (this == new Matrix ());
}
-
- public void InitIdentity ()
- {
- // this.Init(1,0,0,1,0,0);
- NativeMethods.cairo_matrix_init_identity (this);
- }
-
+
+ public void InitIdentity ()
+ {
+ // this.Init(1,0,0,1,0,0);
+ NativeMethods.cairo_matrix_init_identity (this);
+ }
+
public void Init (double xx, double yx, double xy, double yy,
double x0, double y0)
{
this.Xx = xx; this.Yx = yx; this.Xy = xy;
this.Yy = yy; this.X0 = x0; this.Y0 = y0;
}
-
+
public void InitTranslate (double tx, double ty)
- {
+ {
//this.Init (1, 0, 0, 1, tx, ty);
NativeMethods.cairo_matrix_init_translate (this, tx, ty);
- }
-
+ }
+
public void Translate (double tx, double ty)
{
NativeMethods.cairo_matrix_translate (this, tx, ty);
}
-
- public void InitScale (double sx, double sy)
- {
+
+ public void InitScale (double sx, double sy)
+ {
//this.Init (sx, 0, 0, sy, 0, 0);
- NativeMethods.cairo_matrix_init_scale (this, sx, sy);
- }
-
- public void Scale (double sx, double sy)
- {
+ NativeMethods.cairo_matrix_init_scale (this, sx, sy);
+ }
+
+ public void Scale (double sx, double sy)
+ {
NativeMethods.cairo_matrix_scale (this, sx, sy);
- }
-
- public void InitRotate (double radians)
- {
- /*
- double s, c;
- s = Math.Sin (radians);
- c = Math.Cos (radians);
- this.Init (c, s, -s, c, 0, 0);
- */
- NativeMethods.cairo_matrix_init_rotate (this, radians);
- }
-
- public void Rotate (double radians)
- {
+ }
+
+ public void InitRotate (double radians)
+ {
+ /*
+ double s, c;
+ s = Math.Sin (radians);
+ c = Math.Cos (radians);
+ this.Init (c, s, -s, c, 0, 0);
+ */
+ NativeMethods.cairo_matrix_init_rotate (this, radians);
+ }
+
+ public void Rotate (double radians)
+ {
NativeMethods.cairo_matrix_rotate (this, radians);
- }
+ }
- public Cairo.Status Invert ()
- {
+ public Cairo.Status Invert ()
+ {
return NativeMethods.cairo_matrix_invert (this);
- }
+ }
public void Multiply (Matrix b)
{
Matrix a = (Matrix) this.Clone ();
NativeMethods.cairo_matrix_multiply (this, a, b);
}
-
+
public static Matrix Multiply (Matrix a, Matrix b) {
Matrix result = new Matrix ();
NativeMethods.cairo_matrix_multiply (result, a, b);
return result;
}
-
-
- public void TransformDistance (ref double dx, ref double dy)
+
+
+ public void TransformDistance (ref double dx, ref double dy)
{
- NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
- }
+ NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
+ }
- public void TransformPoint (ref double x, ref double y)
- {
- NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
+ public void TransformPoint (ref double x, ref double y)
+ {
+ NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
}
public override String ToString ()
this.Xx, this.Yx, this.Xy, this.Yy, this.X0, this.Y0);
return s;
}
-
+
public static bool operator == (Matrix lhs, Matrix rhs)
{
return (lhs.Xx == rhs.Xx &&
lhs.X0 == rhs.X0 &&
lhs.Y0 == rhs.Y0 );
}
-
+
public static bool operator != (Matrix lhs, Matrix rhs)
{
- return !(lhs==rhs);
+ return !(lhs==rhs);
}
-
-
-
+
+
+
public override bool Equals(object o)
{
if (! (o is Matrix))
else
return (this == (Matrix) o);
}
-
+
public override int GetHashCode()
{
return (int)this.Xx ^ (int)this.Xx>>32 ^
(int)this.X0 ^ (int)this.X0>>32 ^
(int)this.Y0 ^ (int)this.Y0>>32;
}
-
+
public object Clone()
{
return this.MemberwiseClone ();
}
-
- }
+
+ }
}
namespace Cairo
{
- // sort these so it is easier to find what is missing
- // http://www.cairographics.org/manual/ix01.html
+ // sort the functions like in the following page so it is easier to find what is missing
+ // http://cairographics.org/manual/index-all.html
internal static class NativeMethods
{
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern IntPtr cairo_create (IntPtr target);
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern uint cairo_get_reference_count (IntPtr surface);
-
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_curve_to (IntPtr cr, double x1, double y1, double x2, double y2, double x3, double y3);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern Operator cairo_get_operator (IntPtr cr);
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern uint cairo_get_reference_count (IntPtr surface);
+
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern IntPtr cairo_get_source (IntPtr cr);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern int cairo_image_surface_get_width (IntPtr surface);
- [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern uint cairo_surface_get_reference_count (IntPtr surface);
-
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
[return: MarshalAs (UnmanagedType.U1)]
internal static extern bool cairo_in_fill (IntPtr cr, double x, double y);
//[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
//internal static extern IntPtr cairo_ps_surface_create_for_stream (string filename, double width, double height);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern void cairo_ps_surface_begin_page_setup (IntPtr surface);
+ internal static extern void cairo_ps_surface_dsc_begin_page_setup (IntPtr surface);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
- internal static extern void cairo_ps_surface_begin_setup (IntPtr surface);
+ internal static extern void cairo_ps_surface_dsc_begin_setup (IntPtr surface);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_ps_surface_dsc_comment (IntPtr surface, string comment);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_reference (IntPtr cr);
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern bool cairo_region_contains_point (IntPtr region, int x, int y);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern RegionOverlap cairo_region_contains_rectangle (IntPtr region, ref RectangleInt rectangle);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern IntPtr cairo_region_copy (IntPtr original);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern IntPtr cairo_region_create ();
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern IntPtr cairo_region_create_rectangle (ref RectangleInt rect);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern IntPtr cairo_region_create_rectangles (RectangleInt[] rects, int count);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern void cairo_region_destroy (IntPtr region);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern bool cairo_region_equal (IntPtr a, IntPtr b);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern void cairo_region_get_extents (IntPtr region, out RectangleInt extents);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern void cairo_region_get_rectangle (IntPtr region, int nth, out RectangleInt rectangle);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_intersect (IntPtr dst, IntPtr other);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_intersect_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern bool cairo_region_is_empty (IntPtr region);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern int cairo_region_num_rectangles (IntPtr region);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern IntPtr cairo_region_reference (IntPtr region);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_status (IntPtr region);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_subtract (IntPtr dst, IntPtr other);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_subtract_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern void cairo_region_translate (IntPtr region, int dx, int dy);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_union (IntPtr dst, IntPtr other);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_union_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_xor (IntPtr dst, IntPtr other);
+
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern Status cairo_region_xor_rectangle (IntPtr dst, ref RectangleInt rectangle);
+
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_rel_curve_to (IntPtr cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern void cairo_surface_get_font_options (IntPtr surface, IntPtr FontOptions);
+ [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
+ internal static extern uint cairo_surface_get_reference_count (IntPtr surface);
+
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]
internal static extern SurfaceType cairo_surface_get_type (IntPtr surface);
}
public PSSurface (string filename, double width, double height)
+ : base (NativeMethods.cairo_ps_surface_create (filename, width, height), true)
{
- surface = NativeMethods.cairo_ps_surface_create (filename, width, height);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
public void BeginPageSetup ()
{
- NativeMethods.cairo_ps_surface_begin_page_setup (surface);
+ NativeMethods.cairo_ps_surface_dsc_begin_page_setup (Handle);
}
public void BeginSetup ()
{
- NativeMethods.cairo_ps_surface_begin_setup (surface);
+ NativeMethods.cairo_ps_surface_dsc_begin_setup (Handle);
}
public void DscComment (string comment)
{
- NativeMethods.cairo_ps_surface_dsc_comment (surface, comment);
+ NativeMethods.cairo_ps_surface_dsc_comment (Handle, comment);
}
public void SetSize (double width, double height)
{
- NativeMethods.cairo_ps_surface_set_size (surface, width, height);
+ NativeMethods.cairo_ps_surface_set_size (Handle, width, height);
}
}
}
// 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
namespace Cairo {
- public class Path : IDisposable
- {
- internal IntPtr handle = IntPtr.Zero;
-
+ public class Path : IDisposable
+ {
+ IntPtr handle = IntPtr.Zero;
+
internal Path (IntPtr handle)
{
this.handle = handle;
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
}
~Path ()
Dispose (false);
}
-
+ public IntPtr Handle { get { return handle; } }
+
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
-
- protected virtual void Dispose (bool disposing)
- {
- if (!disposing){
- Console.Error.WriteLine ("Cairo.Context: called from finalization thread, programmer is missing a call to Dispose");
- return;
- }
-
- if (handle == IntPtr.Zero)
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<Path> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
return;
- NativeMethods.cairo_path_destroy (handle);
+ NativeMethods.cairo_path_destroy (handle);
handle = IntPtr.Zero;
- }
- }
+ }
+ }
}
-//
+//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
namespace Cairo {
- public class Pattern : IDisposable
- {
- protected IntPtr pattern = IntPtr.Zero;
+ public class Pattern : IDisposable
+ {
+ [Obsolete]
+ protected IntPtr pattern = IntPtr.Zero;
- internal static Pattern Lookup (IntPtr pattern)
+ public static Pattern Lookup (IntPtr pattern, bool owner)
{
if (pattern == IntPtr.Zero)
return null;
-
- object x = patterns [pattern];
- if (x != null)
- return (Pattern) x;
PatternType pt = NativeMethods.cairo_pattern_get_type (pattern);
switch (pt) {
case PatternType.Solid:
- return new SolidPattern (pattern);
+ return new SolidPattern (pattern, owner);
case PatternType.Surface:
- return new SurfacePattern (pattern);
+ return new SurfacePattern (pattern, owner);
case PatternType.Linear:
- return new LinearGradient (pattern);
+ return new LinearGradient (pattern, owner);
case PatternType.Radial:
- return new RadialGradient (pattern);
+ return new RadialGradient (pattern, owner);
default:
- return new Pattern (pattern);
+ return new Pattern (pattern, owner);
}
}
-
- protected Pattern ()
- {
- }
- static Hashtable patterns = new Hashtable ();
+ [Obsolete]
+ protected Pattern ()
+ {
+ }
- internal Pattern (IntPtr ptr)
+ internal Pattern (IntPtr handle, bool owned)
{
- lock (patterns){
- patterns [ptr] = this;
- }
- pattern = ptr;
+ Handle = handle;
+ if (!owned)
+ NativeMethods.cairo_pattern_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
}
~Pattern ()
{
+ Dispose (false);
}
- [Obsolete ("Use the SurfacePattern constructor")]
- public Pattern (Surface surface)
- {
- pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
- }
+ [Obsolete ("Use the SurfacePattern constructor")]
+ public Pattern (Surface surface)
+ : this ( NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
+ {
+ }
- protected void Reference ()
- {
- NativeMethods.cairo_pattern_reference (pattern);
- }
+ [Obsolete]
+ protected void Reference ()
+ {
+ NativeMethods.cairo_pattern_reference (pattern);
+ }
public void Dispose ()
{
Dispose (true);
+ GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
- if (disposing)
- Destroy ();
- GC.SuppressFinalize (this);
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<Pattern> (Handle, disposing);
+
+ if (!disposing|| Handle == IntPtr.Zero)
+ return;
+
+ NativeMethods.cairo_pattern_destroy (Handle);
+ Handle = IntPtr.Zero;
}
-
- public void Destroy ()
- {
- if (pattern != IntPtr.Zero){
- NativeMethods.cairo_pattern_destroy (pattern);
- pattern = IntPtr.Zero;
- }
- lock (patterns){
- patterns.Remove (this);
- }
- }
-
+
+ [Obsolete ("Use Dispose()")]
+ public void Destroy ()
+ {
+ Dispose ();
+ }
+
public Status Status
{
- get { return NativeMethods.cairo_pattern_status (pattern); }
+ get { return NativeMethods.cairo_pattern_status (Handle); }
}
public Extend Extend
{
- get { return NativeMethods.cairo_pattern_get_extend (pattern); }
- set { NativeMethods.cairo_pattern_set_extend (pattern, value); }
+ get { return NativeMethods.cairo_pattern_get_extend (Handle); }
+ set { NativeMethods.cairo_pattern_set_extend (Handle, value); }
}
-
- public Matrix Matrix {
- set {
- NativeMethods.cairo_pattern_set_matrix (pattern, value);
+
+ public Matrix Matrix {
+ set {
+ NativeMethods.cairo_pattern_set_matrix (Handle, value);
}
- get {
+ get {
Matrix m = new Matrix ();
- NativeMethods.cairo_pattern_get_matrix (pattern, m);
+ NativeMethods.cairo_pattern_get_matrix (Handle, m);
return m;
- }
- }
+ }
+ }
- public IntPtr Pointer {
- get { return pattern; }
- }
+#pragma warning disable 612
+ public IntPtr Handle {
+ get { return pattern; }
+ private set { pattern = value; }
+ }
+#pragma warning restore 612
+
+ [Obsolete]
+ public IntPtr Pointer {
+ get { return pattern; }
+ }
public PatternType PatternType {
- get { return NativeMethods.cairo_pattern_get_type (pattern); }
+ get { return NativeMethods.cairo_pattern_get_type (Handle); }
}
- }
+ }
}
}
public PdfSurface (string filename, double width, double height)
+ : base (NativeMethods.cairo_pdf_surface_create (filename, width, height), true)
{
- surface = NativeMethods.cairo_pdf_surface_create (filename, width, height);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
public void SetSize (double width, double height)
{
- NativeMethods.cairo_pdf_surface_set_size (surface, width, height);
+ NativeMethods.cairo_pdf_surface_set_size (Handle, width, height);
}
}
}
--- /dev/null
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+// Duncan Mak (duncan@ximian.com)
+// Miguel de Icaza (miguel@novell.com)
+// Hisham Mardam Bey (hisham.mardambey@gmail.com)
+// Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+ public struct Point
+ {
+ public Point (int x, int y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ int x, y;
+ public int X {
+ get { return x; }
+ set { x = value; }
+ }
+
+ public int Y {
+ get { return y; }
+ set { y = value; }
+ }
+ }
+}
--- /dev/null
+//
+// Mono.Cairo.Context.cs
+//
+// Author:
+// Duncan Mak (duncan@ximian.com)
+// Miguel de Icaza (miguel@novell.com)
+// Hisham Mardam Bey (hisham.mardambey@gmail.com)
+// Alp Toker (alp@atoker.com)
+//
+// (C) Ximian Inc, 2003.
+// (C) Novell Inc, 2003.
+//
+// This is an OO wrapper API for the Cairo API.
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Cairo {
+
+ public struct PointD
+ {
+ public PointD (double x, double y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ double x, y;
+ public double X {
+ get { return x; }
+ set { x = value; }
+ }
+
+ public double Y {
+ get { return y; }
+ set { y = value; }
+ }
+ }
+}
-//
+//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
using System;
namespace Cairo {
-
+
public class RadialGradient : Gradient
{
- internal RadialGradient (IntPtr handle) : base (handle)
+ internal RadialGradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
+ : base (NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1), true)
{
- pattern = NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1);
}
}
}
--- /dev/null
+// Copyright (C) 2011 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace Cairo
+{
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct RectangleInt {
+ public int X;
+ public int Y;
+ public int Width;
+ public int Height;
+ }
+
+ public enum RegionOverlap {
+ In,
+ Out,
+ Part,
+ }
+
+ public class Region : IDisposable {
+
+ IntPtr handle;
+ public IntPtr Handle {
+ get { return handle; }
+ }
+
+ [Obsolete]
+ public Region (IntPtr handle) : this (handle, false) {}
+
+ public Region (IntPtr handle, bool owned)
+ {
+ this.handle = handle;
+ if (!owned)
+ NativeMethods.cairo_region_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
+ }
+
+ public Region () : this (NativeMethods.cairo_region_create () , true)
+ {
+ }
+
+ public Region (RectangleInt rect)
+ {
+ handle = NativeMethods.cairo_region_create_rectangle (ref rect);
+ }
+
+ public Region (RectangleInt[] rects)
+ {
+ handle = NativeMethods.cairo_region_create_rectangles (rects, rects.Length);
+ }
+
+ public Region Copy ()
+ {
+ return new Region (NativeMethods.cairo_region_copy (Handle), true);
+ }
+
+ ~Region ()
+ {
+ Dispose (false);
+ }
+
+ public void Dispose ()
+ {
+ Dispose (true);
+ GC.SuppressFinalize (this);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<Region> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
+ return;
+
+ NativeMethods.cairo_region_destroy (Handle);
+ handle = IntPtr.Zero;
+ }
+
+ public override bool Equals (object obj)
+ {
+ return (obj is Region) && NativeMethods.cairo_region_equal (Handle, (obj as Region).Handle);
+ }
+
+ public override int GetHashCode ()
+ {
+ return Handle.GetHashCode ();
+ }
+
+ public Status Status {
+ get { return NativeMethods.cairo_region_status (Handle); }
+ }
+
+ public RectangleInt Extents {
+ get {
+ RectangleInt result;
+ NativeMethods.cairo_region_get_extents (Handle, out result);
+ return result;
+ }
+ }
+
+ public int NumRectangles {
+ get { return NativeMethods.cairo_region_num_rectangles (Handle); }
+ }
+
+ public RectangleInt GetRectangle (int nth)
+ {
+ RectangleInt val;
+ NativeMethods.cairo_region_get_rectangle (Handle, nth, out val);
+ return val;
+ }
+
+ public bool IsEmpty {
+ get { return NativeMethods.cairo_region_is_empty (Handle); }
+ }
+
+ public RegionOverlap ContainsPoint (RectangleInt rectangle)
+ {
+ return NativeMethods.cairo_region_contains_rectangle (Handle, ref rectangle);
+ }
+
+ public bool ContainsPoint (int x, int y)
+ {
+ return NativeMethods.cairo_region_contains_point (Handle, x, y);
+ }
+
+ public void Translate (int dx, int dy)
+ {
+ NativeMethods.cairo_region_translate (Handle, dx, dy);
+ }
+
+ public Status Subtract (Region other)
+ {
+ return NativeMethods.cairo_region_subtract (Handle, other.Handle);
+ }
+
+ public Status SubtractRectangle (RectangleInt rectangle)
+ {
+ return NativeMethods.cairo_region_subtract_rectangle (Handle, ref rectangle);
+ }
+
+ public Status Intersect (Region other)
+ {
+ return NativeMethods.cairo_region_intersect (Handle, other.Handle);
+ }
+
+ public Status IntersectRectangle (RectangleInt rectangle)
+ {
+ return NativeMethods.cairo_region_intersect_rectangle (Handle, ref rectangle);
+ }
+
+ public Status Union (Region other)
+ {
+ return NativeMethods.cairo_region_union (Handle, other.Handle);
+ }
+
+ public Status UnionRectangle (RectangleInt rectangle)
+ {
+ return NativeMethods.cairo_region_union_rectangle (Handle, ref rectangle);
+ }
+
+ public Status Xor (Region other)
+ {
+ return NativeMethods.cairo_region_xor (Handle, other.Handle);
+ }
+
+ public Status XorRectangle (RectangleInt rectangle)
+ {
+ return NativeMethods.cairo_region_xor_rectangle (Handle, ref rectangle);
+ }
+ }
+}
{
protected IntPtr handle = IntPtr.Zero;
- internal ScaledFont (IntPtr handle)
+ internal ScaledFont (IntPtr handle, bool owner)
{
this.handle = handle;
+ if (!owner)
+ NativeMethods.cairo_scaled_font_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
}
public ScaledFont (FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options)
+ : this (NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle), true)
{
- handle = NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle);
}
~ScaledFont ()
Dispose (false);
}
- public IntPtr Handle {
- get {
- return handle;
- }
- }
+ public IntPtr Handle {
+ get {
+ return handle;
+ }
+ }
public FontExtents FontExtents {
- get {
- FontExtents extents;
- NativeMethods.cairo_scaled_font_extents (handle, out extents);
- return extents;
- }
- }
+ get {
+ FontExtents extents;
+ NativeMethods.cairo_scaled_font_extents (handle, out extents);
+ return extents;
+ }
+ }
public Matrix FontMatrix {
get {
protected virtual void Dispose (bool disposing)
{
- if (disposing) {
- NativeMethods.cairo_scaled_font_destroy (handle);
- handle = IntPtr.Zero;
- }
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<ScaledFont> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
+ return;
+
+ NativeMethods.cairo_scaled_font_destroy (handle);
+ handle = IntPtr.Zero;
+ }
+
+ [Obsolete]
+ protected void Reference ()
+ {
+ NativeMethods.cairo_scaled_font_reference (handle);
}
-
- protected void Reference ()
- {
- NativeMethods.cairo_scaled_font_reference (handle);
- }
}
}
-//
+//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
using System;
namespace Cairo {
-
+
public class SolidPattern : Pattern
{
- internal SolidPattern (IntPtr handle) : base (handle)
+ internal SolidPattern (IntPtr handle, bool owned) : base (handle, owned)
{
}
public SolidPattern (Color color)
+ : base (NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A), true)
{
- pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
}
public SolidPattern (double r, double g, double b)
+ : base (NativeMethods.cairo_pattern_create_rgb (r, g, b), true)
{
- pattern = NativeMethods.cairo_pattern_create_rgb (r, g, b);
}
public SolidPattern (double r, double g, double b, double a)
+ : base (NativeMethods.cairo_pattern_create_rgba (r, g, b, a), true)
{
- NativeMethods.cairo_pattern_create_rgba (r, g, b, a);
}
public SolidPattern (Color color, bool solid)
+ : base (solid
+ ? NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B)
+ : NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A),
+ true)
{
- if (solid)
- pattern = NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B);
- else
- pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
}
public Color Color {
- get {
+ get {
double red, green, blue, alpha;
-
- NativeMethods.cairo_pattern_get_rgba (pattern, out red, out green, out blue, out alpha);
+ NativeMethods.cairo_pattern_get_rgba (Handle, out red, out green, out blue, out alpha);
return new Color (red, green, blue, alpha);
- }
- }
+ }
+ }
}
}
// 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
namespace Cairo {
- public class Surface : IDisposable
- {
+ public class Surface : IDisposable
+ {
+ [Obsolete]
protected static Hashtable surfaces = new Hashtable ();
- internal IntPtr surface = IntPtr.Zero;
+ IntPtr handle = IntPtr.Zero;
+
+ [Obsolete]
protected Surface()
{
}
-
- protected Surface (IntPtr ptr, bool owns)
- {
- surface = ptr;
- lock (surfaces.SyncRoot){
- surfaces [ptr] = this;
- }
- if (!owns)
- NativeMethods.cairo_surface_reference (ptr);
- }
-
- static internal Surface LookupExternalSurface (IntPtr p)
- {
- lock (surfaces.SyncRoot){
- object o = surfaces [p];
- if (o == null){
- return new Surface (p, false);
- }
- return (Surface) o;
- }
- }
- static internal Surface LookupSurface (IntPtr surface)
+ [Obsolete]
+ protected Surface (IntPtr ptr) : this (ptr, true)
+ {
+ }
+
+ protected Surface (IntPtr handle, bool owner)
+ {
+ this.handle = handle;
+ if (!owner)
+ NativeMethods.cairo_surface_reference (handle);
+ if (CairoDebug.Enabled)
+ CairoDebug.OnAllocated (handle);
+ }
+
+ public static Surface Lookup (IntPtr surface, bool owned)
{
SurfaceType st = NativeMethods.cairo_surface_get_type (surface);
switch (st) {
case SurfaceType.Image:
- return new ImageSurface (surface, true);
+ return new ImageSurface (surface, owned);
case SurfaceType.Xlib:
- return new XlibSurface (surface, true);
+ return new XlibSurface (surface, owned);
case SurfaceType.Xcb:
- return new XcbSurface (surface, true);
+ return new XcbSurface (surface, owned);
case SurfaceType.Glitz:
- return new GlitzSurface (surface, true);
+ return new GlitzSurface (surface, owned);
case SurfaceType.Win32:
- return new Win32Surface (surface, true);
-
+ return new Win32Surface (surface, owned);
case SurfaceType.Pdf:
- return new PdfSurface (surface, true);
+ return new PdfSurface (surface, owned);
case SurfaceType.PS:
- return new PSSurface (surface, true);
+ return new PSSurface (surface, owned);
case SurfaceType.DirectFB:
- return new DirectFBSurface (surface, true);
+ return new DirectFBSurface (surface, owned);
case SurfaceType.Svg:
- return new SvgSurface (surface, true);
-
+ return new SvgSurface (surface, owned);
default:
- return Surface.LookupExternalSurface (surface);
+ return new Surface (surface, owned);
}
}
-
+
[Obsolete ("Use an ImageSurface constructor instead.")]
- public static Cairo.Surface CreateForImage (
- ref byte[] data, Cairo.Format format, int width, int height, int stride)
- {
- IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
- data, format, width, height, stride);
-
- return new Cairo.Surface (p, true);
- }
+ public static Cairo.Surface CreateForImage (
+ ref byte[] data, Cairo.Format format, int width, int height, int stride)
+ {
+ IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
+ data, format, width, height, stride);
+
+ return new Cairo.Surface (p, true);
+ }
[Obsolete ("Use an ImageSurface constructor instead.")]
- public static Cairo.Surface CreateForImage (
- Cairo.Format format, int width, int height)
- {
- IntPtr p = NativeMethods.cairo_image_surface_create (
- format, width, height);
+ public static Cairo.Surface CreateForImage (
+ Cairo.Format format, int width, int height)
+ {
+ IntPtr p = NativeMethods.cairo_image_surface_create (
+ format, width, height);
- return new Cairo.Surface (p, true);
- }
+ return new Cairo.Surface (p, true);
+ }
- public Cairo.Surface CreateSimilar (
- Cairo.Content content, int width, int height)
- {
- IntPtr p = NativeMethods.cairo_surface_create_similar (
- this.Handle, content, width, height);
+ public Cairo.Surface CreateSimilar (
+ Cairo.Content content, int width, int height)
+ {
+ IntPtr p = NativeMethods.cairo_surface_create_similar (
+ this.Handle, content, width, height);
- return new Cairo.Surface (p, true);
- }
+ return new Cairo.Surface (p, true);
+ }
~Surface ()
{
}
//[Obsolete ("Use Context.SetSource() followed by Context.Paint()")]
- public void Show (Context gr, double x, double y)
+ public void Show (Context gr, double x, double y)
{
- NativeMethods.cairo_set_source_surface (gr.Handle, surface, x, y);
+ NativeMethods.cairo_set_source_surface (gr.Handle, handle, x, y);
NativeMethods.cairo_paint (gr.Handle);
}
protected virtual void Dispose (bool disposing)
{
- if (surface == IntPtr.Zero)
+ if (!disposing || CairoDebug.Enabled)
+ CairoDebug.OnDisposed<Surface> (handle, disposing);
+
+ if (!disposing|| handle == IntPtr.Zero)
return;
-
- lock (surfaces.SyncRoot)
- surfaces.Remove (surface);
- NativeMethods.cairo_surface_destroy (surface);
- surface = IntPtr.Zero;
+ NativeMethods.cairo_surface_destroy (handle);
+ handle = IntPtr.Zero;
}
-
+
public Status Finish ()
{
- NativeMethods.cairo_surface_finish (surface);
+ NativeMethods.cairo_surface_finish (handle);
return Status;
}
-
+
public void Flush ()
{
- NativeMethods.cairo_surface_flush (surface);
+ NativeMethods.cairo_surface_flush (handle);
}
-
+
public void MarkDirty ()
{
NativeMethods.cairo_surface_mark_dirty (Handle);
}
-
+
public void MarkDirty (Rectangle rectangle)
{
NativeMethods.cairo_surface_mark_dirty_rectangle (Handle, (int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height);
}
-
- public IntPtr Handle {
- get {
- return surface;
+
+ public IntPtr Handle {
+ get {
+ return handle;
}
- }
+ }
public PointD DeviceOffset {
get {
double x, y;
- NativeMethods.cairo_surface_get_device_offset (surface, out x, out y);
+ NativeMethods.cairo_surface_get_device_offset (handle, out x, out y);
return new PointD (x, y);
}
set {
- NativeMethods.cairo_surface_set_device_offset (surface, value.X, value.Y);
+ NativeMethods.cairo_surface_set_device_offset (handle, value.X, value.Y);
}
}
-
+
+ [Obsolete ("Use Dispose()")]
public void Destroy()
{
- Dispose (true);
+ Dispose ();
}
public void SetFallbackResolution (double x, double y)
{
- NativeMethods.cairo_surface_set_fallback_resolution (surface, x, y);
+ NativeMethods.cairo_surface_set_fallback_resolution (handle, x, y);
}
public void WriteToPng (string filename)
{
- NativeMethods.cairo_surface_write_to_png (surface, filename);
+ NativeMethods.cairo_surface_write_to_png (handle, filename);
}
-
+
[Obsolete ("Use Handle instead.")]
- public IntPtr Pointer {
- get {
- return surface;
+ public IntPtr Pointer {
+ get {
+ return handle;
}
- }
-
+ }
+
public Status Status {
- get { return NativeMethods.cairo_surface_status (surface); }
+ get { return NativeMethods.cairo_surface_status (handle); }
}
public Content Content {
- get { return NativeMethods.cairo_surface_get_content (surface); }
+ get { return NativeMethods.cairo_surface_get_content (handle); }
}
public SurfaceType SurfaceType {
- get { return NativeMethods.cairo_surface_get_type (surface); }
+ get { return NativeMethods.cairo_surface_get_type (handle); }
}
public uint ReferenceCount {
- get { return NativeMethods.cairo_surface_get_reference_count (surface); }
+ get { return NativeMethods.cairo_surface_get_reference_count (handle); }
}
- }
+ }
}
-//
+//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
using System;
namespace Cairo {
-
+
public class SurfacePattern : Pattern
{
- internal SurfacePattern (IntPtr handle) : base (handle)
+ internal SurfacePattern (IntPtr handle, bool owned) : base (handle, owned)
{
}
public SurfacePattern (Surface surface)
+ : base (NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
{
- pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
}
- public Extend Extend {
- set { NativeMethods.cairo_pattern_set_extend (pattern, value); }
- get { return NativeMethods.cairo_pattern_get_extend (pattern); }
+ //no idea why this is here, the base one is identical, but we can't remove it now
+ public new Extend Extend {
+ set { NativeMethods.cairo_pattern_set_extend (Handle, value); }
+ get { return NativeMethods.cairo_pattern_get_extend (Handle); }
}
public Filter Filter {
- set { NativeMethods.cairo_pattern_set_filter (pattern, value); }
- get { return NativeMethods.cairo_pattern_get_filter (pattern); }
+ set { NativeMethods.cairo_pattern_set_filter (Handle, value); }
+ get { return NativeMethods.cairo_pattern_get_filter (Handle); }
}
}
}
}
public SvgSurface (string filename, double width, double height)
+ : base (NativeMethods.cairo_svg_surface_create (filename, width, height), true)
{
- surface = NativeMethods.cairo_svg_surface_create (filename, width, height);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
public void RestrictToVersion (SvgVersion version)
{
- NativeMethods.cairo_svg_surface_restrict_to_version (surface, version);
+ NativeMethods.cairo_svg_surface_restrict_to_version (Handle, version);
}
}
}
}
public Win32Surface (IntPtr hdc)
+ : base (NativeMethods.cairo_win32_surface_create (hdc), true)
{
- surface = NativeMethods.cairo_win32_surface_create (hdc);
- lock (surfaces.SyncRoot) {
- surfaces [surface] = this;
- }
}
}
-
}
}
public XcbSurface (IntPtr connection, uint drawable, IntPtr visual, int width, int height)
+ : base (NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height), true)
{
- surface = NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height);
- lock (surfaces.SyncRoot) {
- surfaces [surface] = this;
- }
}
public static XcbSurface FromBitmap (IntPtr connection, uint bitmap, IntPtr screen, int width, int height)
{
- IntPtr ptr;
-
- ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
+ IntPtr ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
return new XcbSurface (ptr, true);
}
public void SetSize (int width, int height)
{
- NativeMethods.cairo_xcb_surface_set_size (surface, width, height);
+ NativeMethods.cairo_xcb_surface_set_size (Handle, width, height);
}
}
}
public class XlibSurface : Surface
{
public XlibSurface (IntPtr display, IntPtr drawable, IntPtr visual, int width, int height)
+ : base (NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height), true)
{
- surface = NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height);
- lock (surfaces.SyncRoot){
- surfaces [surface] = this;
- }
}
public XlibSurface (IntPtr ptr, bool own) : base (ptr, own)
public static XlibSurface FromBitmap (IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height)
{
- IntPtr ptr;
-
- ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
+ IntPtr ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
return new XlibSurface(ptr, true);
}
public void SetDrawable (IntPtr drawable, int width, int height)
{
- NativeMethods.cairo_xlib_surface_set_drawable (surface, drawable, width, height);
+ NativeMethods.cairo_xlib_surface_set_drawable (Handle, drawable, width, height);
}
public void SetSize (int width, int height)
{
- NativeMethods.cairo_xlib_surface_set_size (surface, width, height);
+ NativeMethods.cairo_xlib_surface_set_size (Handle, width, height);
}
public int Depth {
- get { return NativeMethods.cairo_xlib_surface_get_depth (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_depth (Handle); }
}
public IntPtr Display {
- get { return NativeMethods.cairo_xlib_surface_get_display (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_display (Handle); }
}
public IntPtr Drawable {
- get { return NativeMethods.cairo_xlib_surface_get_drawable (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_drawable (Handle); }
}
public int Height {
- get { return NativeMethods.cairo_xlib_surface_get_height (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_height (Handle); }
}
public IntPtr Screen {
- get { return NativeMethods.cairo_xlib_surface_get_screen (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_screen (Handle); }
}
public IntPtr Visual {
- get { return NativeMethods.cairo_xlib_surface_get_visual (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_visual (Handle); }
}
public int Width {
- get { return NativeMethods.cairo_xlib_surface_get_width (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_width (Handle); }
}
}
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 23;
+ internal const int MINOR_VERSION = 24;
enum WPSuspendPolicy {
NONE = 0,
GET_INFO = 6,
GET_BODY = 7,
RESOLVE_TOKEN = 8,
- GET_CATTRS = 9
+ GET_CATTRS = 9,
+ MAKE_GENERIC_METHOD = 10
}
enum CmdType {
return ReadCattrs (r);
}
+ internal long Method_MakeGenericMethod (long id, long[] args) {
+ PacketReader r = SendReceive (CommandSet.METHOD, (int)CmdMethod.MAKE_GENERIC_METHOD, new PacketWriter ().WriteId (id).WriteInt (args.Length).WriteIds (args));
+ return r.ReadId ();
+ }
+
/*
* THREAD
*/
public void ForceDisconnect ()
{
+ closed = true;
+ disconnected = true;
TransportClose ();
}
}
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
using System.Reflection;
using C = Mono.Cecil;
return type_args;
}
+ // Since protocol version 2.24
+ public MethodMirror MakeGenericMethod (TypeMirror[] args) {
+ if (args == null)
+ throw new ArgumentNullException ("args");
+ foreach (var a in args)
+ if (a == null)
+ throw new ArgumentNullException ("args");
+
+ if (!IsGenericMethodDefinition)
+ throw new InvalidOperationException ("not a generic method definition");
+
+ if (GetGenericArguments ().Length != args.Length)
+ throw new ArgumentException ("Incorrect length");
+
+ vm.CheckProtocolVersion (2, 24);
+ long id = -1;
+ try {
+ id = vm.conn.Method_MakeGenericMethod (Id, args.Select (t => t.Id).ToArray ());
+ } catch (CommandException) {
+ throw new InvalidOperationException ();
+ }
+ return vm.GetMethod (id);
+ }
+
public IList<int> ILOffsets {
get {
if (debug_info == null)
conn.VM_Resume ();
} catch (CommandException ex) {
if (ex.ErrorCode == ErrorCode.NOT_SUSPENDED)
- throw new InvalidOperationException ("The vm is not suspended.");
+ throw new VMNotSuspendedException ();
else
throw;
}
case ErrorCode.INVALID_FRAMEID:
throw new InvalidStackFrameException ();
case ErrorCode.NOT_SUSPENDED:
- throw new InvalidOperationException ("The vm is not suspended.");
+ throw new VMNotSuspendedException ();
case ErrorCode.NOT_IMPLEMENTED:
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
case ErrorCode.ABSENT_INFORMATION:
get; set;
}
}
+
+ public class VMNotSuspendedException : InvalidOperationException
+ {
+ public VMNotSuspendedException () : base ("The vm is not suspended.")
+ {
+ }
+ }
}
}
}
+ public static void wait_one ()
+ {
+ ManualResetEvent evt = new ManualResetEvent (false);
+ evt.WaitOne ();
+ }
+
public static int Main (String[] args) {
tls_i = 42;
unhandled_exception_user ();
return 0;
}
+ if (args.Length >0 && args [0] == "wait-one") {
+ wait_one ();
+ return 0;
+ }
breakpoints ();
single_stepping ();
arguments ();
locals2<string> (null, 5, "ABC", ref s);
locals3 ();
locals6 ();
+ locals7<int> (22);
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void locals6_6 (int arg) {
}
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void locals7<T> (T arg) {
+ T t = arg;
+ T t2 = t;
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void line_numbers () {
LineNumbers.ln1 ();
set_gc_suspend_field ();
gc_suspend_1 ();
}
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void generic_method<T> () where T : class {
+ }
}
class TypeLoadClass {
VirtualMachine vm;
MethodMirror entry_point;
StepEventRequest step_req;
+ bool forceExit;
void AssertThrows<ExType> (Action del) where ExType : Exception {
bool thrown = false;
return es [0];
}
- void Start (string[] args) {
+ void Start (params string[] args) {
+ Start (false, args);
+ }
+
+ void Start (bool forceExit, params string[] args) {
+ this.forceExit = forceExit;
+
if (!listening) {
var pi = new Diag.ProcessStartInfo ();
[SetUp]
public void SetUp () {
+ ThreadMirror.NativeTransitions = false;
Start (new string [] { "dtest-app.exe" });
}
step_req.Disable ();
vm.Resume ();
+ if (forceExit)
+ vm.Exit (0);
+
while (true) {
Event e = GetNextEvent ();
vm.Resume ();
}
+ vm = null;
}
[Test]
});
req.Disable ();
+
+ // gsharedvt
+ be = run_until ("locals7");
+
+ req = vm.CreateStepRequest (be.Thread);
+ req.Enable ();
+ step_req = req;
+
+ // Skip nop
+ e = step_once ();
+
+ // Test that locals are initialized
+ frame = e.Thread.GetFrames () [0];
+ val = frame.GetValue (frame.Method.GetLocal ("t"));
+ AssertValue (0, val);
+
+ // Execute t = arg
+ e = step_once ();
+ Assert.AreEqual ("locals7", (e as StepEvent).Method.Name);
+
+ // Execute t2 = t
+ e = step_once ();
+ Assert.AreEqual ("locals7", (e as StepEvent).Method.Name);
+
+ frame = e.Thread.GetFrames () [0];
+ val = frame.GetValue (frame.Method.GetParameters ()[0]);
+ AssertValue (22, val);
+ val = frame.GetValue (frame.Method.GetLocal ("t"));
+ AssertValue (22, val);
+ val = frame.GetValue (frame.Method.GetLocal ("t2"));
+ AssertValue (22, val);
}
[Test]
var o2 = entry_point.DeclaringType.GetValue (entry_point.DeclaringType.GetField ("gc_suspend_field")) as ObjectMirror;
Assert.IsNull (o2);
}
+
+ [Test]
+ public void MakeGenericMethod () {
+ Event e = run_until ("bp1");
+
+ var intm = vm.RootDomain.GetCorrespondingType (typeof (int));
+ var stringm = vm.RootDomain.GetCorrespondingType (typeof (string));
+ var gm = entry_point.DeclaringType.GetMethod ("generic_method");
+ var res = gm.MakeGenericMethod (new TypeMirror [] { stringm });
+ var args = res.GetGenericArguments ();
+ Assert.AreEqual (1, args.Length);
+ Assert.AreEqual (stringm, args [0]);
+
+ // Error checking
+ AssertThrows<ArgumentNullException> (delegate {
+ gm.MakeGenericMethod (null);
+ });
+ AssertThrows<ArgumentNullException> (delegate {
+ gm.MakeGenericMethod (new TypeMirror [] { null });
+ });
+ AssertThrows<ArgumentException> (delegate {
+ gm.MakeGenericMethod (new TypeMirror [] { stringm, stringm });
+ });
+ AssertThrows<InvalidOperationException> (delegate {
+ gm.MakeGenericMethod (new TypeMirror [] { intm });
+ });
+ AssertThrows<InvalidOperationException> (delegate {
+ entry_point.DeclaringType.GetMethod ("Main").MakeGenericMethod (new TypeMirror [] { intm });
+ });
+ }
+
+ [Test]
+ public void InspectThreadSuspenedOnWaitOne () {
+ TearDown ();
+ Start (true, "dtest-app.exe", "wait-one" );
+
+ ThreadMirror.NativeTransitions = true;
+
+ var evt = run_until ("wait_one");
+ Assert.IsNotNull (evt, "#1");
+
+ var thread = evt.Thread;
+ Assert.AreEqual (ThreadState.Running, thread.ThreadState, "#1.1");
+
+ var frames = thread.GetFrames ();
+ Assert.IsNotNull (frames, "#2");
+ Assert.AreEqual (2, frames.Length, "#3");
+ Assert.AreEqual ("wait_one", frames [0].Method.Name, "#4");
+ Assert.AreEqual ("Main", frames [1].Method.Name, "#5");
+
+ vm.Resume ();
+
+ Thread.Sleep (500); //FIXME this is racy, maybe single step? or something?
+
+ vm.Suspend ();
+ Assert.AreEqual (ThreadState.WaitSleepJoin, thread.ThreadState, "#6");
+
+ frames = thread.GetFrames ();
+ Assert.AreEqual (4, frames.Length, "#7");
+ Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8");
+ Assert.AreEqual ("WaitOne", frames [1].Method.Name, "#8.1");
+ Assert.AreEqual ("wait_one", frames [2].Method.Name, "#9");
+ Assert.AreEqual ("Main", frames [3].Method.Name, "#10");
+
+
+ var frame = frames [0];
+ Assert.IsTrue (frame.IsNativeTransition, "#11.1");
+ try {
+ frame.GetThis ();
+ Assert.Fail ("Known limitation - can't get info from m2n frames");
+ } catch (AbsentInformationException) {}
+
+ frame = frames [1];
+ Assert.IsFalse (frame.IsNativeTransition, "#12.1");
+ var wait_one_this = frame.GetThis ();
+ Assert.IsNotNull (wait_one_this, "#12.2");
+
+ frame = frames [2];
+ var locals = frame.GetVisibleVariables ();
+ Assert.AreEqual (1, locals.Count, "#13.1");
+
+ var local_0 = frame.GetValue (locals [0]);
+ Assert.IsNotNull (local_0, "#13.2");
+
+ Assert.AreEqual (wait_one_this, local_0, "#14.2");
+ }
}
}
return '-';
}
+ public static readonly DateTime UnixEpoch =
+ new DateTime (year:1970, month:1, day:1, hour:0, minute:0, second:0, kind:DateTimeKind.Utc);
public static readonly DateTime LocalUnixEpoch =
new DateTime (1970, 1, 1);
public static readonly TimeSpan LocalUtcOffset =
public static DateTime FromTimeT (long time)
{
- DateTime r = LocalUnixEpoch.AddSeconds ((double) time +
- LocalUtcOffset.TotalSeconds);
- return r;
+ return UnixEpoch.AddSeconds (time).ToLocalTime ();
}
public static long ToTimeT (DateTime time)
{
- TimeSpan unixTime = time.Subtract (LocalUnixEpoch) - LocalUtcOffset;
- return (long) unixTime.TotalSeconds;
+ if (time.Kind == DateTimeKind.Unspecified)
+ throw new ArgumentException ("DateTimeKind.Unspecified is not supported. Use Local or Utc times.", "time");
+
+ if (time.Kind == DateTimeKind.Local)
+ time = time.ToUniversalTime ();
+
+ return (long) (time - UnixEpoch).TotalSeconds;
}
public static OpenFlags ToOpenFlags (FileMode mode, FileAccess access)
HashAlgorithm ha = null;
switch (signedHash.Length) {
case 16:
- ha = HashAlgorithm.Create ("MD5");
+ ha = MD5.Create ();
hash = GetHash (ha);
break;
case 20:
- ha = HashAlgorithm.Create ("SHA1");
+ ha = SHA1.Create ();
hash = GetHash (ha);
break;
default:
return mask;
}
- static internal string HashNameFromOid (string oid)
+ static internal string HashNameFromOid (string oid, bool throwOnError = true)
{
switch (oid) {
case "1.2.840.113549.1.1.2": // MD2 with RSA encryption
case "1.3.36.3.3.1.2":
return "RIPEMD160";
default:
- throw new CryptographicException ("Unsupported hash algorithm: " + oid);
+ if (throwOnError)
+ throw new CryptographicException ("Unsupported hash algorithm: " + oid);
+ return null;
}
}
case "RIPEMD160":
return RIPEMD160.Create ();
default:
- throw new CryptographicException ("Unsupported hash algorithm: " + name);
+ try {
+ return (HashAlgorithm) Activator.CreateInstance (Type.GetType (name));
+ }
+ catch {
+ throw new CryptographicException ("Unsupported hash algorithm: " + name);
+ }
}
#else
return HashAlgorithm.Create (name);
// ftp://ftp.rsasecurity.com/pub/pkcs/doc/pkcs-8.doc
//
// Author:
-// Sebastien Pouliot <sebastien@ximian.com>
+// Sebastien Pouliot <sebastien@xamarin.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
// Copyright (C) 2004-2006 Novell Inc. (http://www.novell.com)
+// Copyright 2013 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
using System;
using System.Collections;
using System.Security.Cryptography;
-using System.Text;
using Mono.Security.X509;
namespace Mono.Security.Cryptography {
-#if INSIDE_CORLIB
- internal
-#else
+#if !INSIDE_CORLIB
public
#endif
sealed class PKCS8 {
rsa.ImportParameters (param);
}
catch (CryptographicException) {
+#if MONOTOUCH
+ // there's no machine-wide store available for iOS so we can drop the dependency on
+ // CspParameters (which drops other things, like XML key persistance, unless used elsewhere)
+ throw;
+#else
// this may cause problem when this code is run under
// the SYSTEM identity on Windows (e.g. ASP.NET). See
// http://bugzilla.ximian.com/show_bug.cgi?id=77559
csp.Flags = CspProviderFlags.UseMachineKeyStore;
rsa = new RSACryptoServiceProvider (csp);
rsa.ImportParameters (param);
+#endif
}
return rsa;
}
this.Initialize();
}
- public HMAC(string hashName, byte[] rgbKey)
+ public HMAC (HashAlgorithm ha, byte[] rgbKey)
{
- // Create the hash
- if (hashName == null || hashName.Length == 0)
- {
- hashName = "MD5";
- }
- hash = HashAlgorithm.Create(hashName);
+ hash = ha;
// Set HashSizeValue
HashSizeValue = hash.HashSize;
}
}
+ internal HashAlgorithm CreateHashAlgorithm ()
+ {
+ switch (hashAlgorithmType) {
+ case HashAlgorithmType.Md5:
+ return MD5.Create ();
+ case HashAlgorithmType.Sha1:
+ return SHA1.Create ();
+ default:
+ return null;
+ }
+ }
+
public HashAlgorithmType HashAlgorithmType
{
get { return this.hashAlgorithmType; }
Buffer.BlockCopy(secret, (secret.Length - secretLen), secret2, 0, secretLen);
// Secret 1 processing
- byte[] p_md5 = Expand("MD5", secret1, seed, length);
+ byte[] p_md5 = Expand (MD5.Create (), secret1, seed, length);
// Secret 2 processing
- byte[] p_sha = Expand("SHA1", secret2, seed, length);
+ byte[] p_sha = Expand (SHA1.Create (), secret2, seed, length);
// Perfor XOR of both results
byte[] masterSecret = new byte[length];
return masterSecret;
}
- public byte[] Expand(string hashName, byte[] secret, byte[] seed, int length)
+ public byte[] Expand (HashAlgorithm hash, byte[] secret, byte[] seed, int length)
{
- int hashLength = hashName == "MD5" ? 16 : 20;
+ int hashLength = hash.HashSize / 8;
int iterations = (int)(length / hashLength);
if ((length % hashLength) > 0)
{
iterations++;
}
- M.HMAC hmac = new M.HMAC(hashName, secret);
+ M.HMAC hmac = new M.HMAC (hash, secret);
TlsStream resMacs = new TlsStream();
byte[][] hmacs = new byte[iterations + 1][];
if (this.context is ClientContext)
{
this.clientHMAC = new M.HMAC(
- this.HashAlgorithmName,
+ CreateHashAlgorithm (),
this.context.Negotiating.ClientWriteMAC);
}
else
{
this.serverHMAC = new M.HMAC(
- this.HashAlgorithmName,
+ CreateHashAlgorithm (),
this.context.Negotiating.ServerWriteMAC);
}
}
if (this.context is ClientContext)
{
this.serverHMAC = new M.HMAC(
- this.HashAlgorithmName,
+ CreateHashAlgorithm (),
this.context.Negotiating.ServerWriteMAC);
}
else
{
this.clientHMAC = new M.HMAC(
- this.HashAlgorithmName,
+ CreateHashAlgorithm (),
this.context.Negotiating.ClientWriteMAC);
}
}
public override byte[] ComputeServerRecordMAC(ContentType contentType, byte[] fragment)
{
- HashAlgorithm hash = HashAlgorithm.Create(this.HashAlgorithmName);
+ HashAlgorithm hash = CreateHashAlgorithm ();
byte[] smac = this.Context.Read.ServerWriteMAC;
hash.TransformBlock (smac, 0, smac.Length, smac, 0);
public override byte[] ComputeClientRecordMAC(ContentType contentType, byte[] fragment)
{
- HashAlgorithm hash = HashAlgorithm.Create(this.HashAlgorithmName);
+ HashAlgorithm hash = CreateHashAlgorithm ();
byte[] cmac = this.Context.Current.ClientWriteMAC;
hash.TransformBlock (cmac, 0, cmac.Length, cmac, 0);
public SslHandshakeHash(byte[] secret)
{
// Create md5 and sha1 hashes
- this.md5 = HashAlgorithm.Create("MD5");
- this.sha = HashAlgorithm.Create("SHA1");
+ this.md5 = MD5.Create ();
+ this.sha = SHA1.Create ();
// Set HashSizeValue
this.HashSizeValue = md5.HashSize + sha.HashSize;
if (certhash == null) {
if ((decoder == null) || (decoder.Count < 1))
return null;
+ string algo = PKCS1.HashNameFromOid (m_signaturealgo, false);
+ if (algo == null)
+ return null;
byte[] toBeSigned = decoder [0].GetBytes ();
- using (var hash = PKCS1.CreateFromOid (m_signaturealgo))
+ using (var hash = PKCS1.CreateFromName (algo))
certhash = hash.ComputeHash (toBeSigned, 0, toBeSigned.Length);
}
return (byte[]) certhash.Clone ();
// http://wp.netscape.com/eng/ssl3/traces/trc-clnt-ex.html
[TestFixture]
- public class ARC4ManagedTest : Assertion {
+ public class ARC4ManagedTest {
// because most crypto stuff works with byte[] buffers
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- Fail (msg + " -> First array is NULL");
+ Assert.Fail (msg + " -> First array is NULL");
if (array2 == null)
- Fail (msg + " -> Second array is NULL");
+ Assert.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
}
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
- Assert (msg, a);
+ Assert.IsTrue (a, msg);
}
// from ref. a
public void DefaultProperties ()
{
ARC4Managed rc4 = new ARC4Managed ();
- Assert ("CanReuseTransform", !rc4.CanReuseTransform);
- Assert ("CanTransformMultipleBlocks", rc4.CanTransformMultipleBlocks);
- AssertEquals ("InputBlockSize", 1, rc4.InputBlockSize);
- AssertEquals ("OutputBlockSize", 1, rc4.OutputBlockSize);
+ Assert.IsFalse (rc4.CanReuseTransform, "CanReuseTransform");
+ Assert.IsTrue (rc4.CanTransformMultipleBlocks, "CanTransformMultipleBlocks");
+ Assert.AreEqual (1, rc4.InputBlockSize, "InputBlockSize");
+ Assert.AreEqual (1, rc4.OutputBlockSize, "OutputBlockSize");
}
[Test]
ARC4Managed rc4 = new ARC4Managed ();
rc4.GenerateKey ();
rc4.GenerateIV ();
- AssertEquals ("Key.Length", 16, rc4.Key.Length);
- AssertEquals ("KeySize", 128, rc4.KeySize);
- AssertEquals ("IV.Length", 0, rc4.IV.Length);
+ Assert.AreEqual (16, rc4.Key.Length, "Key.Length");
+ Assert.AreEqual (128, rc4.KeySize, "KeySize");
+ Assert.AreEqual (0, rc4.IV.Length, "IV.Length");
}
[Test]
{
// try creating ourselve using Create
HashAlgorithm h = MD2.Create ("MD2Managed");
- Assert ("MD2Managed", (h is MD2Managed));
+ Assert.IsTrue ((h is MD2Managed), "MD2Managed");
}
}
-}
\ No newline at end of file
+}
// MD2 is a abstract class - so ALL of the test included here wont be tested
// on the abstract class but should be tested in ALL its descendants.
- public abstract class MD2Test : Assertion {
+ public abstract class MD2Test {
protected MD2 hash;
+ static void Fail (string msg)
+ {
+ Assert.Fail (msg);
+ }
+
+ static void AssertEquals (string msg, int expected, int actual)
+ {
+ Assert.AreEqual (expected, actual, msg);
+ }
+
// because most crypto stuff works with byte[] buffers
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
{
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- Assert (msg, a);
+ Assert.IsTrue (a, msg);
}
// MD2 ("") = 8350e5a3e24c153df2275c9f80692773
{
// create the default implementation
HashAlgorithm h = MD2.Create ();
- Assert ("MD2Managed", (h is MD2Managed));
+ Assert.IsTrue ((h is MD2Managed), "MD2Managed");
// Note: will fail is default is changed in machine.config
}
}
{
// try creating ourselve using Create
HashAlgorithm h = MD4.Create ("MD4Managed");
- Assert ("MD4Managed", (h is MD4Managed));
+ Assert.IsTrue ((h is MD4Managed), "MD4Managed");
}
}
-}
\ No newline at end of file
+}
// MD4 is a abstract class - so ALL of the test included here wont be tested
// on the abstract class but should be tested in ALL its descendants.
- public abstract class MD4Test : Assertion {
+ public abstract class MD4Test {
protected MD4 hash;
+ static void AssertEquals (string msg, int expected, int actual)
+ {
+ Assert.AreEqual (expected, actual, msg);
+ }
+
// because most crypto stuff works with byte[] buffers
static public void AssertEquals (string msg, byte[] array1, byte[] array2)
{
if ((array1 == null) && (array2 == null))
return;
if (array1 == null)
- Assertion.Fail (msg + " -> First array is NULL");
+ Assert.Fail (msg + " -> First array is NULL");
if (array2 == null)
- Assertion.Fail (msg + " -> Second array is NULL");
+ Assert.Fail (msg + " -> Second array is NULL");
bool a = (array1.Length == array2.Length);
if (a) {
msg += " -> Expected " + BitConverter.ToString (array1, 0);
msg += " is different than " + BitConverter.ToString (array2, 0);
}
- Assertion.Assert (msg, a);
+ Assert.IsTrue (a, msg);
}
// MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0
{
// create the default implementation
HashAlgorithm h = MD4.Create ();
- Assert ("MD4Managed", (h is MD4Managed));
+ Assert.IsTrue ((h is MD4Managed), "MD4Managed");
// Note: will fail is default is changed in machine.config
}
}
+#if !MONOTOUCH
// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
}
}
}
+#endif
-// -----------------------------------------------------------------------
+#if !MONOTOUCH
+// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
using System;
}
}
+#endif
{
if(!metadataViewType.IsAttributeDefined<MetadataViewImplementationAttribute>())
{
+#if !MONOTOUCH
try
{
proxyType = MetadataViewGenerator.GenerateView(metadataViewType);
{
throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName), ex);
}
+#else
+ throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, Strings.NotSupportedInterfaceMetadataView, metadataViewType.FullName));
+#endif
}
else
{
}
catch (TargetInvocationException ex)
{
+#if !MONOTOUCH
//Unwrap known failures that we want to present as CompositionContractMismatchException
if(metadataViewType.IsInterface)
{
ex.InnerException.Data[MetadataViewGenerator.MetadataItemTargetType]), ex);
}
}
+#endif
throw;
}
}
start = length = 0;
- int i = Array.BinarySearch (names, name);
+ int i = Array.BinarySearch (names, name, StringComparer.Ordinal);
if (i < 0)
return null;
return buf.ToString ();
return null;
}
+
+#if SELF_TEST
+ /*
+ * Compile:
+ * mcs /out:tzi.exe "/d:INSIDE_CORLIB;MONODROID;NET_4_0;LIBC;SELF_TEST" System/TimeZone*.cs ../../build/common/Consts.cs
+ * Prep:
+ * mkdir -p usr/share/zoneinfo
+ * android_root=`adb shell echo '$ANDROID_ROOT' | tr -d "\r"`
+ * adb pull $android_root/usr/share/zoneinfo usr/share/zoneinfo
+ * Run:
+ * ANDROID_ROOT=`pwd` mono tzi.exe
+ */
+ static void Main (string[] args)
+ {
+ Console.WriteLine ("Version: {0}", version);
+ for (int i = 0; i < names.Length; ++i) {
+ Console.Write ("{0,3}\tname={1,-40} start={2,-10} length={3,-4} offset=0x{4,8}",
+ i, names [i], starts [i], lengths [i], offsets [i].ToString ("x8"));
+ try {
+ TimeZoneInfo zone = _GetTimeZone (names [i]);
+ if (zone != null)
+ Console.Write (" {0}", zone);
+ else {
+ Console.Write (" ERROR:null Index? {0}",
+ Array.BinarySearch (names, names [i], StringComparer.Ordinal));
+ }
+ } catch (Exception e) {
+ Console.WriteLine ();
+ Console.Write ("ERROR: {0}", e);
+ }
+ Console.WriteLine ();
+ }
+ }
+#endif
}
}
}
}
[Test]
-#if MOBILE
- [Category ("NotWorking")] // String:Intern () is linked away
-#endif
[ExpectedException (typeof (ArgumentException))]
public void InstanceTypeDoesntMatchMethodDeclaringType ()
{
+#if MOBILE
+ // ensure that String.Intern won't be removed by the linker
+ string s = String.Intern (String.Empty);
+#endif
Expression.Call (Expression.Constant (1), typeof (string).GetMethod ("Intern"));
}
AssertException<ArgumentNullException> (delegate () { ((IEnumerable<string>) null).Contains ("2", (IEqualityComparer<string>) EqualityComparer<string>.Default); });
}
+ static void IsFalse(bool b, int[] data) {
+ if (b) {
+ Console.WriteLine (data.Contains (0));
+ object o = null;
+ o.ToString ();
+ Assert.IsFalse (true);
+ }
+ //Console.WriteLine ("HIT!");
+ }
+
[Test]
public void ContainsTest ()
{
int [] data = { 5, 2, 3, 1, 6 };
-
+ ICollection<int> icoll = data;
// Contains<TSource> (TSource)
Assert.IsTrue (data.Contains (2));
- Assert.IsFalse (data.Contains (0));
+ for (int i = 0; i < 50; ++i)
+ Console.WriteLine (icoll.Contains (0));//Console.WriteLine (data.Contains (0));
+ IsFalse (data.Contains (0), data);
// Contains<TSource> (TSource, IEqualityComparer<TSource>)
Assert.IsTrue (data.Contains (2, EqualityComparer<int>.Default));
#include dynamic_System.Core.dll.sources
System/TimeZoneInfo.Android.cs
+System.Security.Cryptography/AesCryptoServiceProvider.cs
System.Security.Cryptography/AesManaged.cs
System.Security.Cryptography/AesTransform.cs
--- /dev/null
+//
+// AssemblyInfo.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Reflection;
+using System.Resources;
+using System.Security;
+using System.Security.Permissions;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle ("System.Net.Http.WebRequest.dll")]
+[assembly: AssemblyDescription ("System.Net.Http.WebRequest.dll")]
+[assembly: AssemblyDefaultAlias ("System.Net.Http.WebRequest.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: SatelliteContractVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+
+[assembly: NeutralResourcesLanguage ("en-US")]
+[assembly: CLSCompliant (true)]
+[assembly: AssemblyDelaySign (true)]
+
+[assembly: AssemblyKeyFile ("../../msfinal.pub")]
+
+[assembly: ComVisible (false)]
+
--- /dev/null
+thisdir = class/System.Net.Http.WebRequest
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Net.Http.WebRequest.dll
+
+LIB_MCS_FLAGS = -r:System.Net.Http.dll -r:System.dll
+
+TEST_MCS_FLAGS = -r:System.Net.Http.dll
+
+include ../../build/library.make
--- /dev/null
+../../build/common/Consts.cs
+../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Net.Http.WebRequest/WebRequestHandler.cs
--- /dev/null
+//
+// WebRequestHandler.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Net.Cache;
+using System.Net.Security;
+using System.Security.Principal;
+using System.Security.Cryptography.X509Certificates;
+
+namespace System.Net.Http
+{
+ public class WebRequestHandler : HttpClientHandler
+ {
+ bool allowPipelining;
+ RequestCachePolicy cachePolicy;
+ AuthenticationLevel authenticationLevel;
+ TimeSpan continueTimeout;
+ TokenImpersonationLevel impersonationLevel;
+ int maxResponseHeadersLength;
+ int readWriteTimeout;
+ RemoteCertificateValidationCallback serverCertificateValidationCallback;
+ bool unsafeAuthenticatedConnectionSharing;
+
+ public WebRequestHandler ()
+ {
+ allowPipelining = true;
+ authenticationLevel = AuthenticationLevel.MutualAuthRequested;
+ cachePolicy = System.Net.WebRequest.DefaultCachePolicy;
+ continueTimeout = TimeSpan.FromMilliseconds (350);
+ impersonationLevel = TokenImpersonationLevel.Delegation;
+ maxResponseHeadersLength = HttpWebRequest.DefaultMaximumResponseHeadersLength;
+ readWriteTimeout = 300000;
+ serverCertificateValidationCallback = null;
+ unsafeAuthenticatedConnectionSharing = false;
+ }
+
+ public bool AllowPipelining {
+ get { return allowPipelining; }
+ set {
+ EnsureModifiability ();
+ allowPipelining = value;
+ }
+ }
+
+ public RequestCachePolicy CachePolicy {
+ get { return cachePolicy; }
+ set {
+ EnsureModifiability ();
+ cachePolicy = value;
+ }
+ }
+
+ public AuthenticationLevel AuthenticationLevel {
+ get { return authenticationLevel; }
+ set {
+ EnsureModifiability ();
+ authenticationLevel = value;
+ }
+ }
+
+ [MonoTODO]
+ public X509CertificateCollection ClientCertificates {
+ get { throw new NotImplementedException (); }
+ }
+
+ [MonoTODO]
+ public TimeSpan ContinueTimeout {
+ get { return continueTimeout; }
+ set {
+ EnsureModifiability ();
+ continueTimeout = value;
+ }
+ }
+
+ public TokenImpersonationLevel ImpersonationLevel {
+ get { return impersonationLevel; }
+ set {
+ EnsureModifiability ();
+ impersonationLevel = value;
+ }
+ }
+
+ public int MaxResponseHeadersLength {
+ get { return maxResponseHeadersLength; }
+ set {
+ EnsureModifiability ();
+ maxResponseHeadersLength = value;
+ }
+ }
+
+ public int ReadWriteTimeout {
+ get { return readWriteTimeout; }
+ set {
+ EnsureModifiability ();
+ readWriteTimeout = value;
+ }
+ }
+
+ [MonoTODO]
+ public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
+ get { return serverCertificateValidationCallback; }
+ set {
+ EnsureModifiability ();
+ serverCertificateValidationCallback = value;
+ }
+ }
+
+ public bool UnsafeAuthenticatedConnectionSharing {
+ get { return unsafeAuthenticatedConnectionSharing; }
+ set {
+ EnsureModifiability ();
+ unsafeAuthenticatedConnectionSharing = value;
+ }
+ }
+
+ internal override HttpWebRequest CreateWebRequest (HttpRequestMessage request)
+ {
+ HttpWebRequest wr = base.CreateWebRequest (request);
+
+ wr.Pipelined = allowPipelining;
+ wr.AuthenticationLevel = authenticationLevel;
+ wr.CachePolicy = cachePolicy;
+ wr.ImpersonationLevel = impersonationLevel;
+ wr.MaximumResponseHeadersLength = maxResponseHeadersLength;
+ wr.ReadWriteTimeout = readWriteTimeout;
+ wr.UnsafeAuthenticatedConnectionSharing = unsafeAuthenticatedConnectionSharing;
+
+ return wr;
+ }
+ }
+}
+
[assembly: ComVisible (false)]
+[assembly: InternalsVisibleTo ("System.Net.Http.WebRequest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
+
throw new ArgumentNullException ("MediaType");
string temp;
- if (TryParseMediaType (new Lexer (value), out temp) != Token.Type.End)
+ var token = TryParseMediaType (new Lexer (value), out temp);
+ if (token == null || token.Value.Kind != Token.Type.End)
throw new FormatException ();
media_type = temp;
static readonly TimeSpan TimeoutDefault = TimeSpan.FromSeconds (100);
Uri base_address;
- CancellationTokenSource cancellation_token;
+ CancellationTokenSource cts;
bool disposed;
HttpRequestHeaders headers;
long buffer_size;
{
buffer_size = int.MaxValue;
timeout = TimeoutDefault;
+ cts = new CancellationTokenSource ();
}
public Uri BaseAddress {
public void CancelPendingRequests ()
{
- if (cancellation_token != null)
- cancellation_token.Cancel ();
-
- cancellation_token = new CancellationTokenSource ();
+ // Cancel only any already running requests not any new request after this cancellation
+ using (var c = Interlocked.Exchange (ref cts, new CancellationTokenSource ()))
+ c.Cancel ();
}
protected override void Dispose (bool disposing)
if (disposing && !disposed) {
disposed = true;
- if (cancellation_token != null)
- cancellation_token.Dispose ();
+ cts.Dispose ();
}
base.Dispose (disposing);
async Task<HttpResponseMessage> SendAsyncWorker (HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
{
- try {
- if (cancellation_token == null)
- cancellation_token = new CancellationTokenSource ();
-
- using (var cts = CancellationTokenSource.CreateLinkedTokenSource (cancellation_token.Token, cancellationToken)) {
- cts.CancelAfter (timeout);
+ using (var lcts = CancellationTokenSource.CreateLinkedTokenSource (cts.Token, cancellationToken)) {
+ lcts.CancelAfter (timeout);
- var task = base.SendAsync (request, cts.Token);
- if (task == null)
- throw new InvalidOperationException ("Handler failed to return a value");
+ var task = base.SendAsync (request, lcts.Token);
+ if (task == null)
+ throw new InvalidOperationException ("Handler failed to return a value");
- var response = await task.ConfigureAwait (false);
- if (response == null)
- throw new InvalidOperationException ("Handler failed to return a response");
-
- //
- // Read the content when default HttpCompletionOption.ResponseContentRead is set
- //
- if (response.Content != null && (completionOption & HttpCompletionOption.ResponseHeadersRead) == 0) {
- await response.Content.LoadIntoBufferAsync (MaxResponseContentBufferSize).ConfigureAwait (false);
- }
-
- return response;
+ var response = await task.ConfigureAwait (false);
+ if (response == null)
+ throw new InvalidOperationException ("Handler failed to return a response");
+
+ //
+ // Read the content when default HttpCompletionOption.ResponseContentRead is set
+ //
+ if (response.Content != null && (completionOption & HttpCompletionOption.ResponseHeadersRead) == 0) {
+ await response.Content.LoadIntoBufferAsync (MaxResponseContentBufferSize).ConfigureAwait (false);
}
- } finally {
- cancellation_token.Dispose ();
- cancellation_token = null;
+
+ return response;
}
}
useProxy = true;
}
- void EnsureModifiability ()
+ internal void EnsureModifiability ()
{
if (sentRequest)
throw new InvalidOperationException (
base.Dispose (disposing);
}
- HttpWebRequest CreateWebRequest (HttpRequestMessage request)
+ internal virtual HttpWebRequest CreateWebRequest (HttpRequestMessage request)
{
var wr = new HttpWebRequest (request.RequestUri);
wr.ThrowOnError = false;
Assert.That (client.GetStringAsync ("Computer").Result != null);
}
+ [Test]
+ [Category ("MobileNotWorking")] // Missing encoding
+ public void GetString_Many ()
+ {
+ var client = new HttpClient ();
+ var t1 = client.GetStringAsync ("http://www.google.com");
+ var t2 = client.GetStringAsync ("http://www.google.com");
+ Assert.IsTrue (Task.WaitAll (new [] { t1, t2 }, WaitTimeout));
+ }
+
[Test]
public void GetByteArray_ServerError ()
{
</PropertyGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<ItemGroup>\r
- <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r </ItemGroup>\r
+ <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r
+ <Compile Include="Test\System.Numerics\ComplexTest.cs" />\r </ItemGroup>\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
<Target Name="BeforeBuild">\r
</PropertyGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<ItemGroup>\r
- <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r </ItemGroup>\r
+ <Compile Include="Test\System.Numerics\BigIntegerTest.cs" />\r
+ <Compile Include="Test\System.Numerics\ComplexTest.cs" />\r </ItemGroup>\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
<Target Name="BeforeBuild">\r
}
public bool IsEven {
- get { return (data [0] & 0x1) == 0; }
+ get { return sign == 0 || (data [0] & 0x1) == 0; }
}
public bool IsOne {
public static explicit operator int (BigInteger value)
{
+ if (value.sign == 0)
+ return 0;
if (value.data.Length > 1)
throw new OverflowException ();
uint data = value.data [0];
[CLSCompliantAttribute (false)]
public static explicit operator uint (BigInteger value)
{
+ if (value.sign == 0)
+ return 0;
if (value.data.Length > 1 || value.sign == -1)
throw new OverflowException ();
return value.data [0];
[CLSCompliantAttribute (false)]
public static explicit operator ulong (BigInteger value)
{
+ if (value.sign == 0)
+ return 0;
if (value.data.Length > 2 || value.sign == -1)
throw new OverflowException ();
public static BigInteger operator++ (BigInteger value)
{
+ if (value.sign == 0)
+ return One;
+
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
public static BigInteger operator-- (BigInteger value)
{
+ if (value.sign == 0)
+ return MinusOne;
+
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
int bit_shift = shift & 0x1F;
int carry_shift = 32 - bit_shift;
- for (int i = 0; i < data.Length; ++i) {
- uint word = data [i];
- res [i + idx_shift] |= word << bit_shift;
- if (i + idx_shift + 1 < res.Length)
- res [i + idx_shift + 1] = word >> carry_shift;
+ if (carry_shift == 32) {
+ for (int i = 0; i < data.Length; ++i) {
+ uint word = data [i];
+ res [i + idx_shift] |= word << bit_shift;
+ }
+ } else {
+ for (int i = 0; i < data.Length; ++i) {
+ uint word = data [i];
+ res [i + idx_shift] |= word << bit_shift;
+ if (i + idx_shift + 1 < res.Length)
+ res [i + idx_shift + 1] = word >> carry_shift;
+ }
}
return new BigInteger ((short)sign, res);
uint[] res = new uint [size];
int carry_shift = 32 - bit_shift;
- for (int i = data.Length - 1; i >= idx_shift; --i) {
- uint word = data [i];
+ if (carry_shift == 32) {
+ for (int i = data.Length - 1; i >= idx_shift; --i) {
+ uint word = data [i];
+
+ if (i - idx_shift < res.Length)
+ res [i - idx_shift] |= word >> bit_shift;
+ }
+ } else {
+ for (int i = data.Length - 1; i >= idx_shift; --i) {
+ uint word = data [i];
+
+ if (i - idx_shift < res.Length)
+ res [i - idx_shift] |= word >> bit_shift;
+ if (i - idx_shift - 1 >= 0)
+ res [i - idx_shift - 1] = word << carry_shift;
+ }
- if (i - idx_shift < res.Length)
- res [i - idx_shift] |= word >> bit_shift;
- if (i - idx_shift - 1 >= 0)
- res [i - idx_shift - 1] = word << carry_shift;
}
//Round down instead of toward zero
{
if (sign != other.sign)
return false;
- if (data.Length != other.data.Length)
+
+ int alen = data != null ? data.Length : 0;
+ int blen = other.data != null ? other.data.Length : 0;
+
+ if (alen != blen)
return false;
- for (int i = 0; i < data.Length; ++i) {
+ for (int i = 0; i < alen; ++i) {
if (data [i] != other.data [i])
return false;
}
public static BigInteger GreatestCommonDivisor (BigInteger left, BigInteger right)
{
- if (left.data.Length == 1 && left.data [0] == 1)
+ if (left.sign != 0 && left.data.Length == 1 && left.data [0] == 1)
return new BigInteger (1, ONE);
- if (right.data.Length == 1 && right.data [0] == 1)
+ if (right.sign != 0 && right.data.Length == 1 && right.data [0] == 1)
return new BigInteger (1, ONE);
if (left.IsZero)
- return right;
+ return Abs(right);
if (right.IsZero)
- return left;
+ return Abs(left);
BigInteger x = new BigInteger (1, left.data);
BigInteger y = new BigInteger (1, right.data);
public override int GetHashCode ()
{
uint hash = (uint)(sign * 0x01010101u);
+ int len = data != null ? data.Length : 0;
- for (int i = 0; i < data.Length; ++i)
+ for (int i = 0; i < len; ++i)
hash ^= data [i];
return (int)hash;
}
static int CoreCompare (uint[] a, uint[] b)
{
- int al = a.Length;
- int bl = b.Length;
+ int al = a != null ? a.Length : 0;
+ int bl = b != null ? b.Length : 0;
if (al > bl)
return 1;
+2013-06-12 Christoph Ruegg <git@cdrnet.ch>
+
+ * BigInteger.cs: Fix GreatestCommonDivisor to
+ return absolute value if one of the args is zero.
+
+2013-06-09 Christoph Ruegg <git@cdrnet.ch>
+
+ * Complex.cs: Fix IFormattable.ToString to pass custom
+ format strings to double.ToString instead of string.Format.
+
2010-07-12 Jb Evain <jbevain@novell.com>
* Complex.cs: implement IFormattable.
public string ToString (string format)
{
- return string.Format ("({0}, {1})", string.Format (format, real), string.Format (format, imaginary));
+ return string.Format ("({0}, {1})", real.ToString (format), imaginary.ToString (format));
}
public string ToString (string format, IFormatProvider provider)
{
- return string.Format ("({0}, {1})", string.Format (provider, format, real), string.Format (provider, format, imaginary));
+ return string.Format ("({0}, {1})", real.ToString (format, provider), imaginary.ToString (format, provider));
}
}
}
System.Numerics/BigIntegerTest.cs
+System.Numerics/ComplexTest.cs
Assert.AreEqual (2, (int)BigInteger.GreatestCommonDivisor (-12345678, -8765432), "#14");
Assert.AreEqual (40, (int)BigInteger.GreatestCommonDivisor (5581 * 40, 6671 * 40), "#15");
+
+ Assert.AreEqual (5, (int)BigInteger.GreatestCommonDivisor (-5, 0), "#16");
+ Assert.AreEqual (5, (int)BigInteger.GreatestCommonDivisor (0, -5), "#17");
}
[Test]
Assert.AreEqual (-1, b.CompareTo (2000));
Assert.AreEqual (-1, b.CompareTo (-2000));
}
+
+ [Test]
+ public void LeftShitByInt ()
+ {
+ var v = BigInteger.Parse("230794411440927908251127453634");
+
+ Assert.AreEqual ("230794411440927908251127453634", (v << 0).ToString (), "#0");
+ Assert.AreEqual ("461588822881855816502254907268", (v << 1).ToString (), "#1");
+ Assert.AreEqual ("923177645763711633004509814536", (v << 2).ToString (), "#2");
+ Assert.AreEqual ("1846355291527423266009019629072", (v << 3).ToString (), "#3");
+ Assert.AreEqual ("3692710583054846532018039258144", (v << 4).ToString (), "#4");
+ Assert.AreEqual ("7385421166109693064036078516288", (v << 5).ToString (), "#5");
+ Assert.AreEqual ("14770842332219386128072157032576", (v << 6).ToString (), "#6");
+ Assert.AreEqual ("29541684664438772256144314065152", (v << 7).ToString (), "#7");
+ Assert.AreEqual ("59083369328877544512288628130304", (v << 8).ToString (), "#8");
+ Assert.AreEqual ("118166738657755089024577256260608", (v << 9).ToString (), "#9");
+ Assert.AreEqual ("236333477315510178049154512521216", (v << 10).ToString (), "#10");
+ Assert.AreEqual ("472666954631020356098309025042432", (v << 11).ToString (), "#11");
+ Assert.AreEqual ("945333909262040712196618050084864", (v << 12).ToString (), "#12");
+ Assert.AreEqual ("1890667818524081424393236100169728", (v << 13).ToString (), "#13");
+ Assert.AreEqual ("3781335637048162848786472200339456", (v << 14).ToString (), "#14");
+ Assert.AreEqual ("7562671274096325697572944400678912", (v << 15).ToString (), "#15");
+ Assert.AreEqual ("15125342548192651395145888801357824", (v << 16).ToString (), "#16");
+ Assert.AreEqual ("30250685096385302790291777602715648", (v << 17).ToString (), "#17");
+ Assert.AreEqual ("60501370192770605580583555205431296", (v << 18).ToString (), "#18");
+ Assert.AreEqual ("121002740385541211161167110410862592", (v << 19).ToString (), "#19");
+ Assert.AreEqual ("242005480771082422322334220821725184", (v << 20).ToString (), "#20");
+ Assert.AreEqual ("484010961542164844644668441643450368", (v << 21).ToString (), "#21");
+ Assert.AreEqual ("968021923084329689289336883286900736", (v << 22).ToString (), "#22");
+ Assert.AreEqual ("1936043846168659378578673766573801472", (v << 23).ToString (), "#23");
+ Assert.AreEqual ("3872087692337318757157347533147602944", (v << 24).ToString (), "#24");
+ Assert.AreEqual ("7744175384674637514314695066295205888", (v << 25).ToString (), "#25");
+ Assert.AreEqual ("15488350769349275028629390132590411776", (v << 26).ToString (), "#26");
+ Assert.AreEqual ("30976701538698550057258780265180823552", (v << 27).ToString (), "#27");
+ Assert.AreEqual ("61953403077397100114517560530361647104", (v << 28).ToString (), "#28");
+ Assert.AreEqual ("123906806154794200229035121060723294208", (v << 29).ToString (), "#29");
+ Assert.AreEqual ("247813612309588400458070242121446588416", (v << 30).ToString (), "#30");
+ Assert.AreEqual ("495627224619176800916140484242893176832", (v << 31).ToString (), "#31");
+ Assert.AreEqual ("991254449238353601832280968485786353664", (v << 32).ToString (), "#32");
+ Assert.AreEqual ("1982508898476707203664561936971572707328", (v << 33).ToString (), "#33");
+ Assert.AreEqual ("3965017796953414407329123873943145414656", (v << 34).ToString (), "#34");
+ Assert.AreEqual ("7930035593906828814658247747886290829312", (v << 35).ToString (), "#35");
+ Assert.AreEqual ("15860071187813657629316495495772581658624", (v << 36).ToString (), "#36");
+ Assert.AreEqual ("31720142375627315258632990991545163317248", (v << 37).ToString (), "#37");
+ Assert.AreEqual ("63440284751254630517265981983090326634496", (v << 38).ToString (), "#38");
+ Assert.AreEqual ("126880569502509261034531963966180653268992", (v << 39).ToString (), "#39");
+ Assert.AreEqual ("253761139005018522069063927932361306537984", (v << 40).ToString (), "#40");
+ Assert.AreEqual ("507522278010037044138127855864722613075968", (v << 41).ToString (), "#41");
+ Assert.AreEqual ("1015044556020074088276255711729445226151936", (v << 42).ToString (), "#42");
+ Assert.AreEqual ("2030089112040148176552511423458890452303872", (v << 43).ToString (), "#43");
+ Assert.AreEqual ("4060178224080296353105022846917780904607744", (v << 44).ToString (), "#44");
+ Assert.AreEqual ("8120356448160592706210045693835561809215488", (v << 45).ToString (), "#45");
+ Assert.AreEqual ("16240712896321185412420091387671123618430976", (v << 46).ToString (), "#46");
+ Assert.AreEqual ("32481425792642370824840182775342247236861952", (v << 47).ToString (), "#47");
+ Assert.AreEqual ("64962851585284741649680365550684494473723904", (v << 48).ToString (), "#48");
+ Assert.AreEqual ("129925703170569483299360731101368988947447808", (v << 49).ToString (), "#49");
+ Assert.AreEqual ("259851406341138966598721462202737977894895616", (v << 50).ToString (), "#50");
+ Assert.AreEqual ("519702812682277933197442924405475955789791232", (v << 51).ToString (), "#51");
+ Assert.AreEqual ("1039405625364555866394885848810951911579582464", (v << 52).ToString (), "#52");
+ Assert.AreEqual ("2078811250729111732789771697621903823159164928", (v << 53).ToString (), "#53");
+ Assert.AreEqual ("4157622501458223465579543395243807646318329856", (v << 54).ToString (), "#54");
+ Assert.AreEqual ("8315245002916446931159086790487615292636659712", (v << 55).ToString (), "#55");
+ Assert.AreEqual ("16630490005832893862318173580975230585273319424", (v << 56).ToString (), "#56");
+ Assert.AreEqual ("33260980011665787724636347161950461170546638848", (v << 57).ToString (), "#57");
+ Assert.AreEqual ("66521960023331575449272694323900922341093277696", (v << 58).ToString (), "#58");
+ Assert.AreEqual ("133043920046663150898545388647801844682186555392", (v << 59).ToString (), "#59");
+ Assert.AreEqual ("266087840093326301797090777295603689364373110784", (v << 60).ToString (), "#60");
+ Assert.AreEqual ("532175680186652603594181554591207378728746221568", (v << 61).ToString (), "#61");
+ Assert.AreEqual ("1064351360373305207188363109182414757457492443136", (v << 62).ToString (), "#62");
+ Assert.AreEqual ("2128702720746610414376726218364829514914984886272", (v << 63).ToString (), "#63");
+ Assert.AreEqual ("4257405441493220828753452436729659029829969772544", (v << 64).ToString (), "#64");
+ Assert.AreEqual ("8514810882986441657506904873459318059659939545088", (v << 65).ToString (), "#65");
+ Assert.AreEqual ("17029621765972883315013809746918636119319879090176", (v << 66).ToString (), "#66");
+ Assert.AreEqual ("34059243531945766630027619493837272238639758180352", (v << 67).ToString (), "#67");
+ Assert.AreEqual ("68118487063891533260055238987674544477279516360704", (v << 68).ToString (), "#68");
+ Assert.AreEqual ("136236974127783066520110477975349088954559032721408", (v << 69).ToString (), "#69");
+ }
+
+
+ [Test]
+ public void RightShitByInt ()
+ {
+ var v = BigInteger.Parse("230794411440927908251127453634");
+ v = v * BigInteger.Pow (2, 70);
+
+ Assert.AreEqual ("272473948255566133040220955950698177909118065442816", (v >> 0).ToString (), "#0");
+ Assert.AreEqual ("136236974127783066520110477975349088954559032721408", (v >> 1).ToString (), "#1");
+ Assert.AreEqual ("68118487063891533260055238987674544477279516360704", (v >> 2).ToString (), "#2");
+ Assert.AreEqual ("34059243531945766630027619493837272238639758180352", (v >> 3).ToString (), "#3");
+ Assert.AreEqual ("17029621765972883315013809746918636119319879090176", (v >> 4).ToString (), "#4");
+ Assert.AreEqual ("8514810882986441657506904873459318059659939545088", (v >> 5).ToString (), "#5");
+ Assert.AreEqual ("4257405441493220828753452436729659029829969772544", (v >> 6).ToString (), "#6");
+ Assert.AreEqual ("2128702720746610414376726218364829514914984886272", (v >> 7).ToString (), "#7");
+ Assert.AreEqual ("1064351360373305207188363109182414757457492443136", (v >> 8).ToString (), "#8");
+ Assert.AreEqual ("532175680186652603594181554591207378728746221568", (v >> 9).ToString (), "#9");
+ Assert.AreEqual ("266087840093326301797090777295603689364373110784", (v >> 10).ToString (), "#10");
+ Assert.AreEqual ("133043920046663150898545388647801844682186555392", (v >> 11).ToString (), "#11");
+ Assert.AreEqual ("66521960023331575449272694323900922341093277696", (v >> 12).ToString (), "#12");
+ Assert.AreEqual ("33260980011665787724636347161950461170546638848", (v >> 13).ToString (), "#13");
+ Assert.AreEqual ("16630490005832893862318173580975230585273319424", (v >> 14).ToString (), "#14");
+ Assert.AreEqual ("8315245002916446931159086790487615292636659712", (v >> 15).ToString (), "#15");
+ Assert.AreEqual ("4157622501458223465579543395243807646318329856", (v >> 16).ToString (), "#16");
+ Assert.AreEqual ("2078811250729111732789771697621903823159164928", (v >> 17).ToString (), "#17");
+ Assert.AreEqual ("1039405625364555866394885848810951911579582464", (v >> 18).ToString (), "#18");
+ Assert.AreEqual ("519702812682277933197442924405475955789791232", (v >> 19).ToString (), "#19");
+ Assert.AreEqual ("259851406341138966598721462202737977894895616", (v >> 20).ToString (), "#20");
+ Assert.AreEqual ("129925703170569483299360731101368988947447808", (v >> 21).ToString (), "#21");
+ Assert.AreEqual ("64962851585284741649680365550684494473723904", (v >> 22).ToString (), "#22");
+ Assert.AreEqual ("32481425792642370824840182775342247236861952", (v >> 23).ToString (), "#23");
+ Assert.AreEqual ("16240712896321185412420091387671123618430976", (v >> 24).ToString (), "#24");
+ Assert.AreEqual ("8120356448160592706210045693835561809215488", (v >> 25).ToString (), "#25");
+ Assert.AreEqual ("4060178224080296353105022846917780904607744", (v >> 26).ToString (), "#26");
+ Assert.AreEqual ("2030089112040148176552511423458890452303872", (v >> 27).ToString (), "#27");
+ Assert.AreEqual ("1015044556020074088276255711729445226151936", (v >> 28).ToString (), "#28");
+ Assert.AreEqual ("507522278010037044138127855864722613075968", (v >> 29).ToString (), "#29");
+ Assert.AreEqual ("253761139005018522069063927932361306537984", (v >> 30).ToString (), "#30");
+ Assert.AreEqual ("126880569502509261034531963966180653268992", (v >> 31).ToString (), "#31");
+ Assert.AreEqual ("63440284751254630517265981983090326634496", (v >> 32).ToString (), "#32");
+ Assert.AreEqual ("31720142375627315258632990991545163317248", (v >> 33).ToString (), "#33");
+ Assert.AreEqual ("15860071187813657629316495495772581658624", (v >> 34).ToString (), "#34");
+ Assert.AreEqual ("7930035593906828814658247747886290829312", (v >> 35).ToString (), "#35");
+ Assert.AreEqual ("3965017796953414407329123873943145414656", (v >> 36).ToString (), "#36");
+ Assert.AreEqual ("1982508898476707203664561936971572707328", (v >> 37).ToString (), "#37");
+ Assert.AreEqual ("991254449238353601832280968485786353664", (v >> 38).ToString (), "#38");
+ Assert.AreEqual ("495627224619176800916140484242893176832", (v >> 39).ToString (), "#39");
+ Assert.AreEqual ("247813612309588400458070242121446588416", (v >> 40).ToString (), "#40");
+ Assert.AreEqual ("123906806154794200229035121060723294208", (v >> 41).ToString (), "#41");
+ Assert.AreEqual ("61953403077397100114517560530361647104", (v >> 42).ToString (), "#42");
+ Assert.AreEqual ("30976701538698550057258780265180823552", (v >> 43).ToString (), "#43");
+ Assert.AreEqual ("15488350769349275028629390132590411776", (v >> 44).ToString (), "#44");
+ Assert.AreEqual ("7744175384674637514314695066295205888", (v >> 45).ToString (), "#45");
+ Assert.AreEqual ("3872087692337318757157347533147602944", (v >> 46).ToString (), "#46");
+ Assert.AreEqual ("1936043846168659378578673766573801472", (v >> 47).ToString (), "#47");
+ Assert.AreEqual ("968021923084329689289336883286900736", (v >> 48).ToString (), "#48");
+ Assert.AreEqual ("484010961542164844644668441643450368", (v >> 49).ToString (), "#49");
+ Assert.AreEqual ("242005480771082422322334220821725184", (v >> 50).ToString (), "#50");
+ Assert.AreEqual ("121002740385541211161167110410862592", (v >> 51).ToString (), "#51");
+ Assert.AreEqual ("60501370192770605580583555205431296", (v >> 52).ToString (), "#52");
+ Assert.AreEqual ("30250685096385302790291777602715648", (v >> 53).ToString (), "#53");
+ Assert.AreEqual ("15125342548192651395145888801357824", (v >> 54).ToString (), "#54");
+ Assert.AreEqual ("7562671274096325697572944400678912", (v >> 55).ToString (), "#55");
+ Assert.AreEqual ("3781335637048162848786472200339456", (v >> 56).ToString (), "#56");
+ Assert.AreEqual ("1890667818524081424393236100169728", (v >> 57).ToString (), "#57");
+ Assert.AreEqual ("945333909262040712196618050084864", (v >> 58).ToString (), "#58");
+ Assert.AreEqual ("472666954631020356098309025042432", (v >> 59).ToString (), "#59");
+ Assert.AreEqual ("236333477315510178049154512521216", (v >> 60).ToString (), "#60");
+ Assert.AreEqual ("118166738657755089024577256260608", (v >> 61).ToString (), "#61");
+ Assert.AreEqual ("59083369328877544512288628130304", (v >> 62).ToString (), "#62");
+ Assert.AreEqual ("29541684664438772256144314065152", (v >> 63).ToString (), "#63");
+ Assert.AreEqual ("14770842332219386128072157032576", (v >> 64).ToString (), "#64");
+ Assert.AreEqual ("7385421166109693064036078516288", (v >> 65).ToString (), "#65");
+ Assert.AreEqual ("3692710583054846532018039258144", (v >> 66).ToString (), "#66");
+ Assert.AreEqual ("1846355291527423266009019629072", (v >> 67).ToString (), "#67");
+ Assert.AreEqual ("923177645763711633004509814536", (v >> 68).ToString (), "#68");
+ Assert.AreEqual ("461588822881855816502254907268", (v >> 69).ToString (), "#69");
+ }
+
+ [Test]
+ public void Bug10887 ()
+ {
+ BigInteger b = 0;
+ for(int i = 1; i <= 16; i++)
+ b = b * 256 + i;
+ BigInteger p = BigInteger.Pow (2, 32);
+ Assert.AreEqual ("1339673755198158349044581307228491536", b.ToString (), "#1");
+ Assert.AreEqual ("1339673755198158349044581307228491536", ((b << 32) / p).ToString (), "#2");
+ Assert.AreEqual ("1339673755198158349044581307228491536", (b * p >> 32).ToString (), "#3");
+ }
+
+ [Test]
+ public void DefaultCtorWorks ()
+ {
+ var a = new BigInteger ();
+ Assert.AreEqual (BigInteger.One, ++a, "#1");
+
+ a = new BigInteger ();
+ Assert.AreEqual (BigInteger.MinusOne, --a, "#2");
+
+ a = new BigInteger ();
+ Assert.AreEqual (BigInteger.MinusOne, ~a, "#3");
+
+ a = new BigInteger ();
+ Assert.AreEqual ("0", a.ToString (), "#4");
+
+ a = new BigInteger ();
+ Assert.AreEqual (true, a == a, "#5");
+
+ a = new BigInteger ();
+ Assert.AreEqual (false, a < a, "#6");
+
+ a = new BigInteger ();
+ Assert.AreEqual (true, a < 10l, "#7");
+
+ a = new BigInteger ();
+ Assert.AreEqual (true, a.IsEven, "#8");
+
+ a = new BigInteger ();
+ Assert.AreEqual (0, (int)a, "#9");
+
+ a = new BigInteger ();
+ Assert.AreEqual (0, (uint)a, "#10");
+
+ a = new BigInteger ();
+ Assert.AreEqual (0, (ulong)a, "#11");
+
+ a = new BigInteger ();
+ Assert.AreEqual (true, a.Equals (a), "#12");
+
+ a = new BigInteger ();
+ Assert.AreEqual (a, BigInteger.Min (a, a), "#13");
+
+ a = new BigInteger ();
+ Assert.AreEqual (a, BigInteger.GreatestCommonDivisor (a, a), "#14");
+
+ a = new BigInteger ();
+ Assert.AreEqual (BigInteger.Zero.GetHashCode (), a.GetHashCode (), "#15");
+ }
}
}
+2013-06-13 Christoph Ruegg <git@cdrnet.ch>
+
+ * BigIntegerTest.cs: Extended tests for
+ GreatestCommonDivisor to cover zero-args.
+
+2013-06-09 Christoph Ruegg <git@cdrnet.ch>
+
+ * ComplexTest.cs: Created; Tests ToString
+ with special format strings.
+
2010-03-06 Rodrigo Kumpera <rkumpera@novell.com>
* BigIntegerTest.cs: Tests for decimal stuff.
--- /dev/null
+// ComplexTest.cs
+//
+// Authors:
+// Christoph Ruegg <git@cdrnet.ch>
+//
+// Copyright (C) 2013 Novell, Inc (http://www.novell.com)
+//
+
+using System;
+using System.Numerics;
+using System.Globalization;
+using NUnit.Framework;
+
+namespace MonoTests.System.Numerics
+{
+ [TestFixture]
+ public class ComplexTest
+ {
+ [Test]
+ public void TestToStringFormats ()
+ {
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString (), "#1");
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ("G"), "#2");
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ((string)null), "#3");
+
+ IFormatProvider provider = CultureInfo.InvariantCulture;
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString (provider), "#4");
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ("G", provider), "#5");
+ Assert.AreEqual ("(1, 2)", new Complex (1, 2).ToString ((string)null, provider), "#6");
+ }
+ }
+}
}
if (heapCount >= heapSize) {
- heapSize <<= 1;
- Array.Resize <MemoryCacheEntry> (ref heap, heapSize);
+ checked {
+ heapSize <<= 1;
+ }
+
+ if (heapSize <= Int32.MaxValue)
+ Array.Resize <MemoryCacheEntry> (ref heap, heapSize);
}
return heap;
return null;
if (heapSize > HEAP_RESIZE_THRESHOLD) {
- int halfTheSize = heapSize >> 1;
-
- if (heapCount < halfTheSize)
- Array.Resize <MemoryCacheEntry> (ref heap, halfTheSize + (heapCount / 3));
+ int halfTheSize, newSize;
+ checked {
+ halfTheSize = heapSize >> 1;
+ newSize = halfTheSize + (heapCount / 3);
+ }
+
+ if ((heapCount < halfTheSize) && newSize > -1)
+ Array.Resize <MemoryCacheEntry> (ref heap, newSize);
}
return heap;
queueLock.EnterWriteLock ();
locked = true;
heap = GetHeapWithGrow ();
- heap [heapCount++] = item;
+ heap [checked(heapCount++)] = item;
BubbleUp (heap);
} finally {
if (locked)
return null;
ret = heap [0];
- index = --heapCount;
+ index = checked(--heapCount);
heap [0] = heap [index];
heap [index] = null;
while (selected < heapCount && heap [selected].ExpiresAt < item.ExpiresAt) {
heap [index] = heap [selected];
index = selected;
- left = (index << 1) + 1;
+ left = checked((index << 1) + 1);
right = left + 1;
selected = right < heapCount && heap [right].ExpiresAt < heap [left].ExpiresAt ? right : left;
}
if (heapCount <= 1)
return;
- index = heapCount - 1;
- parentIndex = (index - 1) >> 1;
+ index = checked(heapCount - 1);
+ parentIndex = checked((index - 1) >> 1);
item = heap [index];
while (index > 0) {
scheduler.ExecuteAll ();
Assert.IsTrue (target.HasPostponed);
- ((IDataflowBlock)source).Fault (new Exception ());
+ var exception = new Exception ();
+ ((IDataflowBlock)source).Fault (exception);
scheduler.ExecuteAll ();
- Thread.Sleep (100);
+
+ try {
+ source.Completion.Wait (1000);
+ Assert.Fail ("Task must be faulted");
+ } catch (AggregateException ex) {
+ Assert.AreEqual (exception, ex.InnerException, "#9");
+ }
Assert.IsTrue (source.Completion.IsFaulted);
int value;
var target = new TestTargetBlock<int> { Postpone = true };
Assert.IsNotNull (source.LinkTo (target));
- Assert.IsTrue (source.Post (1));
- Assert.IsTrue (source.Post (2));
- Assert.IsTrue (source.Post (3));
- Thread.Sleep (500);
- Assert.IsTrue (target.HasPostponed);
+ Assert.IsTrue (source.Post (1), "#1");
+ Assert.IsTrue (source.Post (2), "#2");
+ Assert.IsTrue (source.Post (3), "#3");
+ target.PostponedEvent.Wait (1000);
+ Assert.IsTrue (target.HasPostponed, "#4");
- ((IDataflowBlock)source).Fault (new Exception ());
+ var exception = new Exception ();
+ ((IDataflowBlock)source).Fault (exception);
- Thread.Sleep (100);
+ source.Completion.Wait (1000);
- Assert.IsFalse (source.Completion.IsFaulted);
+ Assert.IsFalse (source.Completion.IsFaulted, "#5");
int value;
- Assert.IsTrue (target.RetryPostponed (out value));
- Assert.AreEqual (1, value);
+ Assert.IsTrue (target.RetryPostponed (out value), "#6");
+ Assert.AreEqual (1, value, "#7");
evt.Set ();
- Thread.Sleep (100);
+ try {
+ source.Completion.Wait (1000);
+ Assert.Fail ("Task must be faulted");
+ } catch (AggregateException ex) {
+ Assert.AreEqual (exception, ex.InnerException, "#9");
+ }
- Assert.IsTrue (source.Completion.IsFaulted);
- Assert.IsFalse (target.RetryPostponed (out value));
+ Assert.IsTrue (source.Completion.IsFaulted, "#10");
+ Assert.IsFalse (target.RetryPostponed (out value), "#11");
}
[Test]
public T DirectlyAccepted { get; private set; }
+ public ManualResetEventSlim PostponedEvent = new ManualResetEventSlim ();
+
public DataflowMessageStatus OfferMessage (
DataflowMessageHeader messageHeader, T messageValue, ISourceBlock<T> source,
bool consumeToAccept)
if (Postpone) {
postponed = Tuple.Create (source, messageHeader);
+ PostponedEvent.Set ();
return DataflowMessageStatus.Postponed;
}
var action = new ActionBlock<int> (i => received = true);
transformMany.LinkTo (action);
- Assert.IsTrue (transformMany.Post (1));
+ Assert.IsTrue (transformMany.Post (1), "#1");
transformMany.Complete ();
- Assert.IsTrue (transformMany.Completion.Wait (100));
- Assert.IsFalse (received);
+ Assert.IsTrue (transformMany.Completion.Wait (100), "#2");
+ Assert.IsFalse (received, "#3");
}
[Test]
block.LinkTo (action1);
block.LinkTo (action2);
- Assert.IsTrue (block.Post (42));
- Assert.IsFalse (block.Post (43));
+ Assert.IsTrue (block.Post (42), "#1");
+ Assert.IsFalse (block.Post (43), "#2");
- Assert.IsTrue (evt.Wait (100));
+ Assert.IsTrue (evt.Wait (100), "#3");
- Assert.IsTrue (act1);
- Assert.IsTrue (act2);
+ Assert.IsTrue (act1, "#4");
+ Assert.IsTrue (act2, "#5");
}
[Test]
<Compile Include="System.Web.Configuration_2.0\IConfigMapPathFactory.cs" />\r
<Compile Include="System.Web.Configuration_2.0\IdentitySection.cs" />\r
<Compile Include="System.Web.Configuration_2.0\IRemoteWebConfigurationHostServer.cs" />\r
+ <Compile Include="System.Web.Configuration_2.0\LruCache.cs" />\r
<Compile Include="System.Web.Configuration_2.0\LowerCaseStringConverter.cs" />\r
<Compile Include="System.Web.Configuration_2.0\MachineKeyCompatibilityMode.cs" />\r
<Compile Include="System.Web.Configuration_2.0\MachineKeyRegistryStorage.cs" />\r
--- /dev/null
+//
+// A simple LRU cache
+//
+// Authors:
+// Miguel de Icaza (miguel@gnome.org)
+// Andres G. Aragoneses (andres@7digital.com)
+//
+// Copyright 2010 Miguel de Icaza
+// Copyright 2013 7digital Media Ltd.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace System.Web.Configuration {
+
+ class LruCache<TKey, TValue> {
+ Dictionary<TKey, LinkedListNode <TValue>> dict;
+ Dictionary<LinkedListNode<TValue>, TKey> revdict;
+ LinkedList<TValue> list;
+ int entry_limit;
+
+ bool eviction_warning_shown;
+ int evictions;
+ bool size_overriden;
+
+ internal string EvictionWarning { set; private get; }
+
+ public LruCache (int entryLimit)
+ {
+ entry_limit = entryLimit;
+ dict = new Dictionary<TKey, LinkedListNode<TValue>> ();
+ revdict = new Dictionary<LinkedListNode<TValue>, TKey> ();
+ list = new LinkedList<TValue> ();
+ }
+
+ //for debugging: public int Count { get { return dict.Count; } }
+
+ void Evict ()
+ {
+ var last = list.Last;
+ if (last == null)
+ return;
+
+ var key = revdict [last];
+
+ dict.Remove (key);
+ revdict.Remove (last);
+ list.RemoveLast ();
+ DisposeValue (last.Value);
+ evictions++;
+
+ if (!String.IsNullOrEmpty (EvictionWarning) && !eviction_warning_shown && (evictions >= entry_limit)) {
+ Console.Error.WriteLine ("WARNING: " + EvictionWarning);
+ eviction_warning_shown = true;
+ }
+ }
+
+ public void Clear ()
+ {
+ foreach (var element in list) {
+ DisposeValue (element);
+ }
+
+ dict.Clear ();
+ revdict.Clear ();
+ list.Clear ();
+ eviction_warning_shown = false;
+ evictions = 0;
+ }
+
+ void DisposeValue (TValue value)
+ {
+ if (value is IDisposable) {
+ ((IDisposable)value).Dispose ();
+ }
+ }
+
+ public bool TryGetValue (TKey key, out TValue value)
+ {
+ LinkedListNode<TValue> node;
+
+ if (dict.TryGetValue (key, out node)){
+ list.Remove (node);
+ list.AddFirst (node);
+
+ value = node.Value;
+ return true;
+ }
+ value = default (TValue);
+ return false;
+ }
+
+ public void Add (TKey key, TValue value)
+ {
+ LinkedListNode<TValue> node;
+
+ if (dict.TryGetValue (key, out node)){
+
+ // If we already have a key, move it to the front
+ list.Remove (node);
+ list.AddFirst (node);
+
+ // Remove the old value
+ DisposeValue (node.Value);
+
+ node.Value = value;
+ return;
+ }
+
+ if (dict.Count >= entry_limit)
+ Evict ();
+
+ // Adding new node
+ node = new LinkedListNode<TValue> (value);
+ list.AddFirst (node);
+ dict [key] = node;
+ revdict [node] = key;
+ }
+
+ public override string ToString ()
+ {
+ return "LRUCache dict={0} revdict={1} list={2}";
+ }
+ }
+}
// See comment for the cacheLock field at top of System.Web.Caching/Cache.cs
static readonly ReaderWriterLockSlim sectionCacheLock;
-
+
#if !TARGET_J2EE
static IInternalConfigConfigurationFactory configFactory;
static Hashtable configurations = Hashtable.Synchronized (new Hashtable ());
- static Dictionary <int, object> sectionCache = new Dictionary <int, object> ();
static Hashtable configPaths = Hashtable.Synchronized (new Hashtable ());
static bool suppressAppReload;
#else
}
}
}
+
+ const int DEFAULT_SECTION_CACHE_SIZE = 100;
+ const string CACHE_SIZE_OVERRIDING_KEY = "MONO_ASPNET_WEBCONFIG_CACHESIZE";
+ static LruCache<int, object> sectionCache;
static WebConfigurationManager ()
{
+ var section_cache_size = DEFAULT_SECTION_CACHE_SIZE;
+ int section_cache_size_override;
+ bool size_overriden = false;
+ if (int.TryParse (Environment.GetEnvironmentVariable (CACHE_SIZE_OVERRIDING_KEY), out section_cache_size_override)) {
+ section_cache_size = section_cache_size_override;
+ size_overriden = true;
+ Console.WriteLine ("WebConfigurationManager's LRUcache Size overriden to: {0} (via {1})", section_cache_size_override, CACHE_SIZE_OVERRIDING_KEY);
+ }
+ sectionCache = new LruCache<int, object> (section_cache_size);
+ string eviction_warning = "WebConfigurationManager's LRUcache evictions count reached its max size";
+ if (!size_overriden)
+ eviction_warning += String.Format ("{0}Cache Size: {1} (overridable via {2})",
+ Environment.NewLine, section_cache_size, CACHE_SIZE_OVERRIDING_KEY);
+ sectionCache.EvictionWarning = eviction_warning;
+
configFactory = ConfigurationManager.ConfigurationFactory;
_Configuration.SaveStart += ConfigurationSaveHandler;
_Configuration.SaveEnd += ConfigurationSaveHandler;
baseCacheKey ^= configPath.GetHashCode ();
try {
- sectionCacheLock.EnterReadLock ();
+ sectionCacheLock.EnterWriteLock ();
object o;
if (pathPresent) {
if (sectionCache.TryGetValue (baseCacheKey, out o))
return o;
} finally {
- sectionCacheLock.ExitReadLock ();
+ sectionCacheLock.ExitWriteLock ();
}
string cachePath = null;
{
object cachedSection;
+ bool locked = false;
try {
- if (!sectionCacheLock.TryEnterUpgradeableReadLock (SECTION_CACHE_LOCK_TIMEOUT))
+ if (!sectionCacheLock.TryEnterWriteLock (SECTION_CACHE_LOCK_TIMEOUT))
return;
-
+ locked = true;
+
if (sectionCache.TryGetValue (key, out cachedSection) && cachedSection != null)
return;
- try {
- if (!sectionCacheLock.TryEnterWriteLock (SECTION_CACHE_LOCK_TIMEOUT))
- return;
- sectionCache.Add (key, section);
- } finally {
- try {
- sectionCacheLock.ExitWriteLock ();
- } catch (SynchronizationLockException) {
- // we can ignore it here
- }
- }
+ sectionCache.Add (key, section);
} finally {
- try {
- sectionCacheLock.ExitUpgradeableReadLock ();
- } catch (SynchronizationLockException) {
- // we can ignore it here
+ if (locked) {
+ sectionCacheLock.ExitWriteLock ();
}
}
}
System.Web.Configuration_2.0/IConfigMapPathFactory.cs
System.Web.Configuration_2.0/IRemoteWebConfigurationHostServer.cs
System.Web.Configuration_2.0/LowerCaseStringConverter.cs
+System.Web.Configuration_2.0/LruCache.cs
System.Web.Configuration_2.0/MachineKeyRegistryStorage.cs
System.Web.Configuration_2.0/MachineKeySection.cs
System.Web.Configuration_2.0/MachineKeyValidation.cs
// changing last byte (padding)
byte be = encdata [encdata.Length - 1];
encdata [encdata.Length - 1] = ChangeByte (be);
- Assert.IsNull (MachineKeySectionUtils.Decrypt (section, encdata), "bad padding");
+ byte[] result = MachineKeySectionUtils.Decrypt (section, encdata);
+ // this will return null if a bad padding is detected - OTOH since we're using a random key and we
+ // encrypt a random IV it's possible the decrypted stuff will randomly have a "valid" padding (there's
+ // only so much possible values and the bots runs those tests pretty often and give false positive)
+ // To avoid this we fallback to ensure the data is invalid (if should be empty)
+ int total = 0;
+ if (result != null) {
+ for (int i=0; i < result.Length; i++)
+ total += result [i];
+ }
+ Assert.IsTrue (result == null || total != 0, "bad padding");
}
[Test]
--- /dev/null
+//
+// TypeForwarders.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Windows.dll")]
+[assembly: AssemblyDescription ("System.Windows.dll")]
+[assembly: AssemblyDefaultAlias ("System.Windows.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
--- /dev/null
+thisdir = class/System.Windows
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Windows.dll
+LIB_MCS_FLAGS = /r:System
+
+NO_TEST = yes
+
+include ../../build/library.make
--- /dev/null
+AssemblyInfo.cs
+TypeForwarders.cs
+../../build/common/Consts.cs
--- /dev/null
+//
+// TypeForwarders.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.INotifyCollectionChanged))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.ObjectModel.ReadOnlyObservableCollection<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedAction))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventArgs))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Collections.Specialized.NotifyCollectionChangedEventHandler))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Windows.Input.ICommand))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.INotifyDataErrorInfo))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ComponentModel.DataErrorsChangedEventArgs))]
+
--- /dev/null
+//
+// TypeForwarders.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Xml.Serialization.dll")]
+[assembly: AssemblyDescription ("System.Xml.Serialization.dll")]
+[assembly: AssemblyDefaultAlias ("System.Xml.Serialization.dll")]
+
+[assembly: AssemblyCompany (Consts.MonoCompany)]
+[assembly: AssemblyProduct (Consts.MonoProduct)]
+[assembly: AssemblyCopyright (Consts.MonoCopyright)]
+[assembly: AssemblyVersion (Consts.FxVersion)]
+[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: AssemblyDelaySign (true)]
+[assembly: AssemblyKeyFile ("../msfinal.pub")]
+
+[assembly: ReferenceAssembly]
--- /dev/null
+thisdir = class/System.Xml.Serialization
+SUBDIRS =
+include ../../build/rules.make
+
+LIBRARY = System.Xml.Serialization.dll
+LIB_MCS_FLAGS = /r:System.Xml /r:System.ServiceModel
+
+NO_TEST = yes
+
+include ../../build/library.make
--- /dev/null
+AssemblyInfo.cs
+TypeForwarders.cs
+../../build/common/Consts.cs
--- /dev/null
+//
+// TypeForwarders.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlTypeMapping))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlMappingAccess))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializer))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.XmlSerializerFormatAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlArrayItemAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributeOverrides))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlElementAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlAnyElementAttributes))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.Serialization.XmlSerializerNamespaces))]
+
LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
TEST_MCS_FLAGS += -r:System.Configuration
PROFILE_ANY_MOBILE := $(filter monotouch monodroid, $(PROFILE))
-NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch monotouch_runtime monodroid mobile, $(PROFILE))
+NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch_runtime monodroid mobile, $(PROFILE))
endif
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
endif
endif
ifeq (monotouch, $(PROFILE))
-LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME
+LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME -d:SECURITY_DEP
endif
EXTRA_DISTFILES = \
static void FillKeywordTable ()
{
- keywordsTable = new Hashtable ();
- foreach (string keyword in keywords) {
- keywordsTable.Add (keyword, keyword);
+ lock (keywords) {
+ if (keywordsTable == null) {
+ keywordsTable = new Hashtable ();
+ foreach (string keyword in keywords) {
+ keywordsTable.Add (keyword, keyword);
+ }
+ }
}
}
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Ntlm;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Ntlm;
+#endif
using System;
using System.Collections;
using System.Net;
-using MonoSecurity::Mono.Security.Protocol.Ntlm;
namespace Mono.Http
{
//
#if SECURITY_DEP
+
+#if MONOTOUCH
+using System.Security.Cryptography.X509Certificates;
+#else
extern alias PrebuiltSystem;
+using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
+
#endif
using System;
using System.Net.Security;
using System.Security.Authentication;
-#if SECURITY_DEP
-using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-#endif
-
namespace System.Net.Mail {
public class SmtpClient
#if NET_4_0
#if SECURITY_DEP
+#if MONOTOUCH
+#else
extern alias PrebuiltSystem;
-
using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
+#endif
using System.Security.Cryptography.X509Certificates;
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+
+using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
+using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
+using ExchangeAlgorithmType = System.Security.Authentication.ExchangeAlgorithmType;
+
+using MonoCipherAlgorithmType = Mono.Security.Protocol.Tls.CipherAlgorithmType;
+using MonoHashAlgorithmType = Mono.Security.Protocol.Tls.HashAlgorithmType;
+using MonoExchangeAlgorithmType = Mono.Security.Protocol.Tls.ExchangeAlgorithmType;
+using MonoSecurityProtocolType = Mono.Security.Protocol.Tls.SecurityProtocolType;
+#else
extern alias PrebuiltSystem;
extern alias MonoSecurity;
using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;
-using System;
-using System.IO;
-using System.Net;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Principal;
-using System.Security.Cryptography;
-using MonoSecurity::Mono.Security.Protocol.Tls;
-
using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
using ExchangeAlgorithmType = System.Security.Authentication.ExchangeAlgorithmType;
using MonoExchangeAlgorithmType = MonoSecurity::Mono.Security.Protocol.Tls.ExchangeAlgorithmType;
using MonoSecurityProtocolType = MonoSecurity::Mono.Security.Protocol.Tls.SecurityProtocolType;
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
+
+using System;
+using System.IO;
+using System.Net;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+using System.Security.Principal;
+using System.Security.Cryptography;
+
#if NET_4_5
using System.Threading.Tasks;
#endif
return null;
};
- if (validation_callback != null)
+ if (validation_callback != null) {
+#if MONOTOUCH
+ var helper = new ServicePointManager.ChainValidationHelper (this, targetHost);
+ helper.ServerCertificateValidationCallback = validation_callback;
+ s.ServerCertValidation2 += new CertificateValidationCallback2 (helper.ValidateChain);
+#else
s.ServerCertValidationDelegate = delegate (X509Certificate cert, int [] certErrors) {
X509Chain chain = new X509Chain ();
X509Certificate2 x2 = (cert as X509Certificate2);
return validation_callback (this, cert, chain, errors);
};
+#endif
+ }
if (selection_callback != null)
s.ClientCertSelectionDelegate = OnCertificateSelection;
+//
+// ClientWebSocket.cs
+//
+// Author:
+// Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#if NET_4_5
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace System.Net.WebSockets
+{
+ [MonoTODO]
+ public class ClientWebSocket : WebSocket
+ {
+ public ClientWebSocketOptions Options {
+ get { throw new NotImplementedException (); }
+ }
+
+ public Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+
+ #region implemented abstract members of WebSocket
+ public override void Abort ()
+ {
+ throw new NotImplementedException ();
+ }
+ public override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+ public override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+ public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+ public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
+ {
+ throw new NotImplementedException ();
+ }
+ public override void Dispose ()
+ {
+ throw new NotImplementedException ();
+ }
+ public override WebSocketCloseStatus? CloseStatus {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public override string CloseStatusDescription {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public override WebSocketState State {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ public override string SubProtocol {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ #endregion
+ }
+}
+
+#endif
+
// build the hash object (only MD5 is defined in RFC2617)
if ((parser.Algorithm == null) || (parser.Algorithm.ToUpper ().StartsWith ("MD5")))
- hash = HashAlgorithm.Create ("MD5");
+ hash = MD5.Create ();
return true;
}
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Authenticode;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Authenticode;
+#endif
using System.IO;
using System.Net.Sockets;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
-using MonoSecurity::Mono.Security.Authenticode;
namespace System.Net {
sealed class EndPointListener
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
using System.IO;
using System.Net.Sockets;
using System.Threading;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
-using MonoSecurity::Mono.Security.Protocol.Tls;
namespace System.Net {
sealed class HttpConnection
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security.Protocol.Tls;
+#endif
using System.Collections;
using System.Collections.Specialized;
#if NET_4_5
using System.Threading.Tasks;
#endif
-using MonoSecurity::Mono.Security.Protocol.Tls;
namespace System.Net {
public sealed class HttpListenerRequest
if (idx >= 0)
return false;
+ IPAddress ipaddr;
+ if (IPAddress.TryParse (val, out ipaddr))
+ return true;
+
string u = scheme + "://" + val + "/";
return Uri.IsWellFormedUriString (u, UriKind.Absolute);
}
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+using MSX = Mono.Security.X509;
+using Mono.Security.X509.Extensions;
+#else
extern alias MonoSecurity;
-
-using System.Text.RegularExpressions;
using MonoSecurity::Mono.Security.X509.Extensions;
using MonoSecurity::Mono.Security.Protocol.Tls;
using MSX = MonoSecurity::Mono.Security.X509;
#endif
+using System.Text.RegularExpressions;
+#endif
+
using System;
using System.Collections;
using System.Collections.Specialized;
public class ServicePointManager {
class SPKey {
Uri uri; // schema/host/port
+ Uri proxy;
bool use_connect;
- public SPKey (Uri uri, bool use_connect) {
+ public SPKey (Uri uri, Uri proxy, bool use_connect) {
this.uri = uri;
+ this.proxy = proxy;
this.use_connect = use_connect;
}
get { return use_connect; }
}
+ public bool UsesProxy {
+ get { return proxy != null; }
+ }
+
public override int GetHashCode () {
- return uri.GetHashCode () + ((use_connect) ? 1 : 0);
+ int hash = 23;
+ hash = hash * 31 + ((use_connect) ? 1 : 0);
+ hash = hash * 31 + uri.GetHashCode ();
+ hash = hash * 31 + (proxy != null ? proxy.GetHashCode () : 0);
+ return hash;
}
public override bool Equals (object obj) {
return false;
}
- return (uri.Equals (other.uri) && other.use_connect == use_connect);
+ if (!uri.Equals (other.uri))
+ return false;
+ if (use_connect != other.use_connect || UsesProxy != other.UsesProxy)
+ return false;
+ if (UsesProxy && !proxy.Equals (other.proxy))
+ return false;
+ return true;
}
}
ServicePoint sp = null;
lock (servicePoints) {
- SPKey key = new SPKey (origAddress, useConnect);
+ SPKey key = new SPKey (origAddress, usesProxy ? address : null, useConnect);
sp = servicePoints [key] as ServicePoint;
if (sp != null)
return sp;
internal class ChainValidationHelper {
object sender;
string host;
+ RemoteCertificateValidationCallback cb;
#if !MONOTOUCH
static bool is_macosx = System.IO.File.Exists (OSX509Certificates.SecurityLibrary);
}
#endif
- public ChainValidationHelper (object sender)
+ public ChainValidationHelper (object sender, string hostName)
{
this.sender = sender;
+ host = hostName;
}
- public string Host {
+ public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
get {
- if (host == null && sender is HttpWebRequest)
- host = ((HttpWebRequest) sender).Address.Host;
- return host;
+ if (cb == null)
+ cb = ServicePointManager.ServerCertificateValidationCallback;
+ return cb;
}
-
- set { host = value; }
+ set { cb = value; }
}
// Used when the obsolete ICertificatePolicy is set to DefaultCertificatePolicy
return null;
ICertificatePolicy policy = ServicePointManager.CertificatePolicy;
- RemoteCertificateValidationCallback cb = ServicePointManager.ServerCertificateValidationCallback;
X509Certificate2 leaf = new X509Certificate2 (certs [0].RawData);
int status11 = 0; // Error code passed to the obsolete ICertificatePolicy callback
// the certificates that the server provided (which generally does not include the root) so, only
// if there's a user callback, we'll create the X509Chain but won't build it
// ref: https://bugzilla.xamarin.com/show_bug.cgi?id=7245
- if (cb != null) {
+ if (ServerCertificateValidationCallback != null) {
#endif
chain = new X509Chain ();
chain.ChainPolicy = new X509ChainPolicy ();
status11 = -2146762490; //CERT_E_PURPOSE 0x800B0106
}
- if (!CheckServerIdentity (certs [0], Host)) {
+ if (!CheckServerIdentity (certs [0], host)) {
errors |= SslPolicyErrors.RemoteCertificateNameMismatch;
status11 = -2146762481; // CERT_E_CN_NO_MATCH 0x800B010F
}
// Ideally we should return the SecTrustResult
OSX509Certificates.SecTrustResult trustResult = OSX509Certificates.SecTrustResult.Deny;
try {
- trustResult = OSX509Certificates.TrustEvaluateSsl (certs, Host);
+ trustResult = OSX509Certificates.TrustEvaluateSsl (certs, host);
// We could use the other values of trustResult to pass this extra information
// to the .NET 2 callback for values like SecTrustResult.Confirm
result = (trustResult == OSX509Certificates.SecTrustResult.Proceed ||
user_denied = !result && !(policy is DefaultCertificatePolicy);
}
// If there's a 2.0 callback, it takes precedence
- if (cb != null) {
- result = cb (sender, leaf, chain, errors);
+ if (ServerCertificateValidationCallback != null) {
+ result = ServerCertificateValidationCallback (sender, leaf, chain, errors);
user_denied = !result;
}
return new ValidationResult (result, user_denied, status11);
int nread = 0;
long notify_total = 0;
- while ((nread = st.Read (buffer, 0, length)) != 0){
- if (async){
- notify_total += nread;
+ while ((nread = st.Read (buffer, 0, length)) != 0) {
+ notify_total += nread;
+ if (async)
OnDownloadProgressChanged (
new DownloadProgressChangedEventArgs (notify_total, response.ContentLength, userToken));
-
- }
f.Write (buffer, 0, nread);
}
+
+ if (cLength > 0 && notify_total < cLength)
+ throw new WebException ("Download aborted prematurely.", WebExceptionStatus.ReceiveFailure);
} catch (ThreadInterruptedException){
if (request != null)
request.Abort ();
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security.Protocol.Tls;
+#else
extern alias MonoSecurity;
-
using MonoSecurity::Mono.Security.Protocol.Tls;
#endif
+#endif
+
using System.IO;
using System.Collections;
using System.Net.Sockets;
Exception connect_exception;
static object classLock = new object ();
static Type sslStream;
+#if !MONOTOUCH
static PropertyInfo piClient;
static PropertyInfo piServer;
static PropertyInfo piTrustFailure;
+#endif
#if MONOTOUCH
- static MethodInfo start_wwan;
-
- static WebConnection ()
- {
- Type type = Type.GetType ("MonoTouch.ObjCRuntime.Runtime, monotouch");
- if (type != null)
- start_wwan = type.GetMethod ("StartWWAN", new Type [] { typeof (System.Uri) });
- }
+ [System.Runtime.InteropServices.DllImport ("__Internal")]
+ static extern void monotouch_start_wwan (string uri);
#endif
public WebConnection (WebConnectionGroup group, ServicePoint sPoint)
if (hostEntry == null) {
#if MONOTOUCH
- if (start_wwan != null) {
- start_wwan.Invoke (null, new object [1] { sPoint.Address });
- hostEntry = sPoint.HostEntry;
- }
+ monotouch_start_wwan (sPoint.Address.ToString ());
+ hostEntry = sPoint.HostEntry;
if (hostEntry == null) {
#endif
status = sPoint.UsesProxy ? WebExceptionStatus.ProxyNameResolutionFailure :
#else
// HttpsClientStream is an internal glue class in Mono.Security.dll
sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " +
- Consts.AssemblyMono_Security, false);
+ Consts.AssemblySystem, false);
if (sslStream == null) {
string msg = "Missing Mono.Security.dll assembly. " +
"Support for SSL/TLS is unavailable.";
+ Console.WriteLine (msg);
throw new NotSupportedException (msg);
}
#endif
+#if !MONOTOUCH
piClient = sslStream.GetProperty ("SelectedClientCertificate");
piServer = sslStream.GetProperty ("ServerCertificate");
piTrustFailure = sslStream.GetProperty ("TrustFailure");
+#endif
}
}
if (!ok)
return false;
}
-
+#if SECURITY_DEP
+#if MONOTOUCH
+ nstream = new HttpsClientStream (serverStream, request.ClientCertificates, request, buffer);
+#else
object[] args = new object [4] { serverStream,
- request.ClientCertificates,
- request, buffer};
+ request.ClientCertificates,
+ request, buffer};
nstream = (Stream) Activator.CreateInstance (sslStream, args);
-#if SECURITY_DEP
+#endif
SslClientStream scs = (SslClientStream) nstream;
- var helper = new ServicePointManager.ChainValidationHelper (request);
+ var helper = new ServicePointManager.ChainValidationHelper (request, request.Address.Host);
scs.ServerCertValidation2 += new CertificateValidationCallback2 (helper.ValidateChain);
#endif
certsAvailable = false;
cnc.position = 0;
- WebConnectionStream stream = new WebConnectionStream (cnc);
+ WebConnectionStream stream = new WebConnectionStream (cnc, data);
bool expect_content = ExpectContent (data.StatusCode, data.request.Method);
string tencoding = null;
if (expect_content)
internal void GetCertificates ()
{
// here the SSL negotiation have been done
+#if SECURITY_DEP && MONOTOUCH
+ HttpsClientStream s = (nstream as HttpsClientStream);
+ X509Certificate client = s.SelectedClientCertificate;
+ X509Certificate server = s.ServerCertificate;
+#else
X509Certificate client = (X509Certificate) piClient.GetValue (nstream, null);
X509Certificate server = (X509Certificate) piServer.GetValue (nstream, null);
+#endif
sPoint.SetCertificates (client, server);
certsAvailable = (server != null);
}
}
int nbytes = 0;
+ bool done = false;
WebAsyncResult wr = null;
IAsyncResult nsAsync = ((WebAsyncResult) result).InnerAsyncResult;
if (chunkedRead && (nsAsync is WebAsyncResult)) {
wr = (WebAsyncResult) nsAsync;
IAsyncResult inner = wr.InnerAsyncResult;
- if (inner != null && !(inner is WebAsyncResult))
+ if (inner != null && !(inner is WebAsyncResult)) {
nbytes = s.EndRead (inner);
+ done = nbytes == 0;
+ }
} else if (!(nsAsync is WebAsyncResult)) {
nbytes = s.EndRead (nsAsync);
wr = (WebAsyncResult) result;
+ done = nbytes == 0;
}
if (chunkedRead) {
- bool done = (nbytes == 0);
try {
chunkStream.WriteAndReadBack (wr.Buffer, wr.Offset, wr.Size, ref nbytes);
if (!done && nbytes == 0 && chunkStream.WantMore)
}
// if SSL is in use then check for TrustFailure
- if (ssl && (bool) piTrustFailure.GetValue (nstream, null)) {
- wes = WebExceptionStatus.TrustFailure;
- msg = "Trust failure";
+ if (ssl) {
+#if SECURITY_DEP && MONOTOUCH
+ HttpsClientStream https = (nstream as HttpsClientStream);
+ if (https.TrustFailure) {
+#else
+ if ((bool) piTrustFailure.GetValue (nstream, null)) {
+#endif
+ wes = WebExceptionStatus.TrustFailure;
+ msg = "Trust failure";
+ }
}
HandleError (wes, e, msg);
AsyncCallback cb_wrapper; // Calls to ReadCallbackWrapper or WriteCallbacWrapper
internal bool IgnoreIOErrors;
- public WebConnectionStream (WebConnection cnc)
- {
- if (cnc.Data == null)
- throw new InvalidOperationException ("cnc.Data was not initialized");
- if (cnc.Data.Headers == null)
- throw new InvalidOperationException ("cnc.Data.Headers was not initialized");
- if (cnc.Data.request == null)
- throw new InvalidOperationException ("cnc.Data.request was not initialized");
+ public WebConnectionStream (WebConnection cnc, WebConnectionData data)
+ {
+ if (data == null)
+ throw new InvalidOperationException ("data was not initialized");
+ if (data.Headers == null)
+ throw new InvalidOperationException ("data.Headers was not initialized");
+ if (data.request == null)
+ throw new InvalidOperationException ("data.request was not initialized");
isRead = true;
cb_wrapper = new AsyncCallback (ReadCallbackWrapper);
pending = new ManualResetEvent (true);
- this.request = cnc.Data.request;
+ this.request = data.request;
read_timeout = request.ReadWriteTimeout;
write_timeout = read_timeout;
this.cnc = cnc;
- string contentType = cnc.Data.Headers ["Transfer-Encoding"];
+ string contentType = data.Headers ["Transfer-Encoding"];
bool chunkedRead = (contentType != null && contentType.IndexOf ("chunked", StringComparison.OrdinalIgnoreCase) != -1);
- string clength = cnc.Data.Headers ["Content-Length"];
+ string clength = data.Headers ["Content-Length"];
if (!chunkedRead && clength != null && clength != "") {
try {
contentLength = Int32.Parse (clength);
//
#if SECURITY_DEP
+#if MONOTOUCH
+using MSX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
+using MSX = MonoSecurity::Mono.Security.X509;
+#endif
using System;
using System.Runtime.InteropServices;
-using MSX = MonoSecurity::Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+using MSX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
-
using MonoSecurity::Mono.Security;
using MonoSecurity::Mono.Security.Cryptography;
using MSX = MonoSecurity::Mono.Security.X509;
+#endif
namespace System.Security.Cryptography.X509Certificates {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using MX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
using System.Collections;
using System.Text;
-using MonoSecurity::Mono.Security;
-using MX = MonoSecurity::Mono.Security.X509;
-
namespace System.Security.Cryptography.X509Certificates {
[MonoTODO ("Some X500DistinguishedNameFlags options aren't supported, like DoNotUsePlusSign, DoNotUseQuotes and ForceUTF8Encoding")]
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
using System.Text;
-using MonoSecurity::Mono.Security;
-
namespace System.Security.Cryptography.X509Certificates {
public sealed class X509BasicConstraintsExtension : X509Extension {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+using MX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
using MonoSecurity::Mono.Security;
using MX = MonoSecurity::Mono.Security.X509;
#endif
+#endif
+
using System.IO;
using System.Text;
namespace System.Security.Cryptography.X509Certificates {
+#if NET_4_0
+ [Serializable]
+#endif
public class X509Certificate2 : X509Certificate {
#if !SECURITY_DEP
// Used in Mono.Security HttpsClientStream
if (_cert == null)
throw new CryptographicException (empty_error);
- X509Chain chain = (X509Chain) CryptoConfig.CreateFromName ("X509Chain");
+ X509Chain chain = X509Chain.Create ();
if (!chain.Build (this))
return false;
// TODO - check chain and other stuff ???
#if SECURITY_DEP
+#if MONOTOUCH
+using MX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
using System.Collections;
using System.Text;
-using MX = MonoSecurity::Mono.Security.X509;
-
namespace System.Security.Cryptography.X509Certificates {
public class X509Chain {
public static X509Chain Create ()
{
+#if FULL_AOT_RUNTIME
+ return new X509Chain ();
+#else
return (X509Chain) CryptoConfig.CreateFromName ("X509Chain");
+#endif
}
// private stuff
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
using System.Text;
-using MonoSecurity::Mono.Security;
-
namespace System.Security.Cryptography.X509Certificates {
public sealed class X509EnhancedKeyUsageExtension : X509Extension {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using MX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
using System.Collections;
-using Mono.Security;
-using MX = Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
_list = new ArrayList ();
}
- internal X509ExtensionCollection (MonoSecurity::Mono.Security.X509.X509Certificate cert)
+ internal X509ExtensionCollection (MX.X509Certificate cert)
{
_list = new ArrayList (cert.Extensions.Count);
if (cert.Extensions.Count == 0)
return;
- foreach (MonoSecurity::Mono.Security.X509.X509Extension ext in cert.Extensions) {
+ foreach (MX.X509Extension ext in cert.Extensions) {
bool critical = ext.Critical;
string oid = ext.Oid;
byte[] raw_data = null;
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+#endif
using System.Text;
-using MonoSecurity::Mono.Security;
-
namespace System.Security.Cryptography.X509Certificates {
public sealed class X509KeyUsageExtension : X509Extension {
#if SECURITY_DEP
+#if MONOTOUCH
+using MX = Mono.Security.X509;
+#else
extern alias MonoSecurity;
+using MX = MonoSecurity::Mono.Security.X509;
+#endif
using System.Security.Permissions;
-using MX = MonoSecurity::Mono.Security.X509;
namespace System.Security.Cryptography.X509Certificates {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+#else
extern alias MonoSecurity;
-
-using System.Text;
-
using MonoSecurity::Mono.Security;
using MonoSecurity::Mono.Security.Cryptography;
+#endif
+
+using System.Text;
namespace System.Security.Cryptography.X509Certificates {
#if SECURITY_DEP
+#if MONOTOUCH
+using Mono.Security;
+using Mono.Security.Cryptography;
+#else
extern alias MonoSecurity;
+using MonoSecurity::Mono.Security;
+using MonoSecurity::Mono.Security.Cryptography;
+#endif
using System.Security.Cryptography.X509Certificates;
using System.Text;
-using MonoSecurity::Mono.Security;
-using MonoSecurity::Mono.Security.Cryptography;
-
namespace System.Security.Cryptography {
internal enum AsnDecodeStatus {
using System.Text;
using System.Collections;
using System.Reflection;
+#if !FULL_AOT_RUNTIME
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization;
using RegularExpression = System.Text.RegularExpressions.Syntax.RegularExpression;
success = false;
break;
}
+
+ if (success && isAbsoluteUri && (path.Length > 0))
+ path = EscapeString (path);
}
}
client.BeginReceive (BRCallback, client);
- IPEndPoint ep = new IPEndPoint (Dns.GetHostEntry (string.Empty).AddressList[0], 1237);
+ IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1237);
byte[] send_bytes = new byte[] {10, 11, 12, 13};
client.Send (send_bytes, send_bytes.Length, ep);
public void Available ()
{
UdpClient client = new UdpClient (1238);
- IPEndPoint ep = new IPEndPoint (Dns.GetHostEntry (string.Empty).AddressList[0], 1238);
+ IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1238);
byte[] bytes = new byte[] {10, 11, 12, 13};
client.Send (bytes, bytes.Length, ep);
Assert.AreEqual (null, req.Headers.Get ("Date"));
}
+
+ [Test]
+ // Bug #12393
+ public void TestIPv6Host ()
+ {
+ var address = "2001:0000:0000:0001:0001:0001:0157:0000";
+ var address2 = '[' + address + ']';
+ var uri = new Uri (string.Format ("http://{0}/test.css", address2));
+ var hwr = (HttpWebRequest)WebRequest.Create (uri);
+
+ hwr.Host = address2;
+ Assert.AreEqual (address2, hwr.Host, "#1");
+ }
+
+ [Test]
+ // Bug #12393
+ [Category ("NotWorking")]
+ public void TestIPv6Host2 ()
+ {
+ var address = "2001:0000:0000:0001:0001:0001:0157:0000";
+ var address2 = '[' + address + ']';
+ var uri = new Uri (string.Format ("http://{0}/test.css", address2));
+ var hwr = (HttpWebRequest)WebRequest.Create (uri);
+
+ try {
+ hwr.Host = address;
+ Assert.Fail ("#1");
+ } catch (ArgumentException) {
+ ;
+ }
+ }
#endif
+
+
class ListenerScope : IDisposable {
EventWaitHandle completed;
public HttpListener listener;
public void StaticCreation ()
{
X509Chain c = X509Chain.Create ();
-#if MOBILE
- Assert.IsNull (c);
-#else
CheckDefaultChain (c);
-#endif
}
-#if !MOBILE
[Test]
public void CreateViaCryptoConfig ()
{
Assert.AreEqual (typeof (X509Chain), CryptoConfig.CreateFromName ("X509Chain").GetType (), "X509Chain");
Assert.IsNull (CryptoConfig.CreateFromName ("System.Security.Cryptography.X509Certificates.X509Chain"), "System.Security.Cryptography.X509Certificates.X509Chain");
}
-#endif
}
}
string escaped = uri.GetComponents (UriComponents.Fragment, UriFormat.UriEscaped);
Assert.AreEqual ("id=1%262&sort=asc", escaped, "UriEscaped");
}
+
+ [Test]
+ // Bug #12631
+ public void LocalPathWithBaseUrl ()
+ {
+ var mainUri = new Uri ("http://www.imdb.com");
+ var uriPath = "/title/tt0106521";
+
+ Uri result;
+ Assert.IsTrue (Uri.TryCreate (mainUri, uriPath, out result), "#1");
+ Assert.AreEqual ("http://www.imdb.com/title/tt0106521", result.ToString (), "#2");
+ }
}
}
uri = new Uri ("http://dummy.com");
Assert.IsTrue (Uri.TryCreate (relative, UriKind.Relative, out uri), "relative-Relative");
Assert.AreEqual (relative, uri.OriginalString, "relative-RelativeOrAbsolute-OriginalString");
+
+ Assert.IsTrue (Uri.TryCreate ("http://mono-project.com/☕", UriKind.Absolute, out uri), "highunicode-Absolute");
+ Assert.AreEqual("http://mono-project.com/%E2%98%95", uri.AbsoluteUri, "highunicode-Absolute-AbsoluteUri");
}
[Test] // TryCreate (String, UriKind, Uri)
#include mobile_System.dll.sources
MonoTouch/MonoPInvokeCallbackAttribute.cs
+../Mono.Security/Mono.Security.Authenticode/PrivateKey.cs
+../Mono.Security/Mono.Security.Cryptography/MD5SHA1.cs
+../Mono.Security/Mono.Security.Cryptography/TlsHMAC.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/ChallengeResponse2.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/MessageBase.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmAuthLevel.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/NtlmFlags.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type1Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type2Message.cs
+../Mono.Security/Mono.Security.Protocol.Ntlm/Type3Message.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Alert.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteCollection.cs
+../Mono.Security/Mono.Security.Protocol.Tls/CipherSuiteFactory.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ClientSessionCache.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ContentType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/Context.cs
+../Mono.Security/Mono.Security.Protocol.Tls/DebugHelper.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ExchangeAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HandshakeState.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HashAlgorithmType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureDeformatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/RSASslSignatureFormatter.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityCompressionType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityParameters.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SecurityProtocolType.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerContext.cs
+../Mono.Security/Mono.Security.Protocol.Tls/ServerRecordProtocol.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslHandshakeHash.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls/SslStreamBase.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsCipherSuite.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsClientSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsException.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsServerSettings.cs
+../Mono.Security/Mono.Security.Protocol.Tls/TlsStream.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/ClientCertificateType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake/HandshakeType.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Client/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsClientKeyExchange.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificate.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerFinished.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHello.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerHelloDone.cs
+../Mono.Security/Mono.Security.Protocol.Tls.Handshake.Server/TlsServerKeyExchange.cs
+../Mono.Security/Mono.Security.X509.Extensions/AuthorityKeyIdentifierExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/ExtendedKeyUsageExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/GeneralNames.cs
+../Mono.Security/Mono.Security.X509.Extensions/NetscapeCertTypeExtension.cs
+../Mono.Security/Mono.Security.X509.Extensions/SubjectAltNameExtension.cs
//
-// System.Collections.DebuggableAttribute.cs
+// ConditionalAttribute.cs
//
// Author:
// Nick Drochak II (ndrochak@gol.com)
//
-// System.Collections.DebuggableAttribute.cs
+// DebuggableAttribute.cs
//
// Author:
// Nick Drochak II (ndrochak@gol.com)
IntPtr handle;
MonoIOError error;
FileAttributes rattr;
-
string s = MonoIO.FindFirst (path, path_with_pattern, out rattr, out error, out handle);
try {
while (s != null) {
if (((rattr & FileAttributes.Directory) == 0) && rattr != 0)
rattr |= FileAttributes.Normal;
- if ((rattr & FileAttributes.ReparsePoint) == 0 && (rattr & kind) != 0)
+ if ((rattr & kind) != 0)
yield return s;
s = MonoIO.FindNext (handle, out rattr, out error);
try {
while (s != null) {
- if ((rattr & FileAttributes.Directory) != 0)
+ if ((rattr & FileAttributes.Directory) != 0 && (rattr & FileAttributes.ReparsePoint) == 0)
foreach (string child in EnumerateKind (s, searchPattern, searchOption, kind))
yield return child;
s = MonoIO.FindNext (handle, out rattr, out error);
return fullpath;
}
+ [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+ // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
+ // http://www.codeproject.com/Tips/223321/Win32-API-GetFullPathName
+ private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull);
+
+ internal static string GetFullPathName(string path)
+ {
+ const int MAX_PATH = 260;
+ StringBuilder buffer = new StringBuilder(MAX_PATH);
+ IntPtr ptr = IntPtr.Zero;
+ int length = GetFullPathName(path, MAX_PATH, buffer, ref ptr);
+ if (length == 0)
+ {
+ int error = Marshal.GetLastWin32Error();
+ throw new IOException("Windows API call to GetFullPathName failed, Windows error code: " + error);
+ }
+ else if (length > MAX_PATH)
+ {
+ buffer = new StringBuilder(length);
+ GetFullPathName(path, length, buffer, ref ptr);
+ }
+ return buffer.ToString();
+ }
+
internal static string WindowsDriveAdjustment (string path)
{
// two special cases to consider when a drive is specified
if (current [0] == path [0])
path = current; // we return it
else
- path += '\\';
+ path = GetFullPathName(path); // we have to use the GetFullPathName Windows API
} else if ((path [2] != Path.DirectorySeparatorChar) && (path [2] != Path.AltDirectorySeparatorChar)) {
// second, the drive + a directory is specified *without* a separator between them (e.g. C:dir).
// If the current directory is on the specified drive...
// then specified directory is appended to the current drive directory
path = Path.Combine (current, path.Substring (2, path.Length - 2));
} else {
- // if not, then just pretend there was a separator (Path.Combine won't work in this case)
- path = String.Concat (path.Substring (0, 2), DirectorySeparatorStr, path.Substring (2, path.Length - 2));
+ // we have to use the GetFullPathName Windows API
+ path = GetFullPathName(path);
}
}
return path;
if (ex.hresult != MonoIO.FileAlreadyExistsHResult || count ++ > 65536)
throw;
}
+ catch (UnauthorizedAccessException ex) {
+ if (count ++ > 65536)
+ throw new IOException (ex.Message, ex);
+ }
} while (f == null);
f.Close();
}
static bool ShouldPrintFullName (Type type) {
- return type.IsClass && (!type.IsPointer ||
- (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested));
+ return type.IsGenericType || (type.IsClass && (!type.IsPointer ||
+ (!type.GetElementType ().IsPrimitive && !type.GetElementType ().IsNested)));
}
public override string ToString () {
#endif
}
+ [Serializable()]
[StructLayout (LayoutKind.Sequential)]
internal class MonoCMethod : ConstructorInfo, ISerializable
{
public void GetResult ()
{
- if (task.Status != TaskStatus.RanToCompletion) {
+ if (!task.IsCompleted)
+ task.WaitCore (Timeout.Infinite, CancellationToken.None);
+
+ if (task.Status != TaskStatus.RanToCompletion)
// Merge current and dispatched stack traces if there is any
ExceptionDispatchInfo.Capture (HandleUnexpectedTaskResult (task)).Throw ();
- }
}
internal static Exception HandleUnexpectedTaskResult (Task task)
case TaskStatus.Faulted:
return task.Exception.InnerException;
default:
- return new InvalidOperationException ("The task has not finished yet");
+ throw new ArgumentException ("Should never be reached");
}
}
#if NET_4_5
+using System.Threading;
using System.Threading.Tasks;
using System.Runtime.ExceptionServices;
public TResult GetResult ()
{
+ if (!task.IsCompleted)
+ task.WaitCore (Timeout.Infinite, CancellationToken.None);
+
if (task.Status != TaskStatus.RanToCompletion)
ExceptionDispatchInfo.Capture (TaskAwaiter.HandleUnexpectedTaskResult (task)).Throw ();
case "tripledes":
case "3des":
return new TripleDESCryptoServiceProvider ();
- default:
+ case "x509chain":
+ name = "System.Security.Cryptography.X509Certificates.X509Chain, System";
+ break;
+ case "aes":
+ name = "System.Security.Cryptography.AesManaged, System.Core";
+ break;
+ }
+
+ try {
+ // last resort, the request type might be available (if care is taken for the type not to be linked
+ // away) and that can allow some 3rd party code to work (e.g. extra algorithms) and make a few more
+ // unit tests happy
+ return Activator.CreateInstance (Type.GetType (name));
+ }
+ catch {
// method doesn't throw any exception
return null;
}
// and for Parent property.
[System.ThreadStatic]
static Task current;
- [System.ThreadStatic]
- static Action<Task> childWorkAdder;
// parent is the outer task in which this task is created
readonly Task parent;
internal void Schedule ()
{
Status = TaskStatus.WaitingToRun;
-
- // If worker is null it means it is a local one, revert to the old behavior
- // If TaskScheduler.Current is not being used, the scheduler was explicitly provided, so we must use that
- if (scheduler != TaskScheduler.Current || childWorkAdder == null || HasFlag (creationOptions, TaskCreationOptions.PreferFairness)) {
- scheduler.QueueTask (this);
- } else {
- /* Like the semantic of the ABP paper describe it, we add ourselves to the bottom
- * of our Parent Task's ThreadWorker deque. It's ok to do that since we are in
- * the correct Thread during the creation
- */
- childWorkAdder (this);
- }
+ scheduler.QueueTask (this);
}
void ThreadStart ()
if (millisecondsTimeout < -1)
throw new ArgumentOutOfRangeException ("millisecondsTimeout");
- bool result = true;
-
- if (!IsCompleted) {
- // If the task is ready to be run and we were supposed to wait on it indefinitely without cancellation, just run it
- if (Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled)
- scheduler.RunInline (this, true);
-
- if (!IsCompleted) {
- var continuation = new ManualResetContinuation ();
- try {
- ContinueWith (continuation);
- result = continuation.Event.Wait (millisecondsTimeout, cancellationToken);
- } finally {
- if (!result)
- RemoveContinuation (continuation);
- continuation.Dispose ();
- }
- }
- }
+ bool result = WaitCore (millisecondsTimeout, cancellationToken);
if (IsCanceled)
throw new AggregateException (new TaskCanceledException (this));
return result;
}
+
+ internal bool WaitCore (int millisecondsTimeout, CancellationToken cancellationToken)
+ {
+ if (IsCompleted)
+ return true;
+
+ // If the task is ready to be run and we were supposed to wait on it indefinitely without cancellation, just run it
+ if (Status == TaskStatus.WaitingToRun && millisecondsTimeout == Timeout.Infinite && scheduler != null && !cancellationToken.CanBeCanceled)
+ scheduler.RunInline (this, true);
+
+ bool result = true;
+
+ if (!IsCompleted) {
+ var continuation = new ManualResetContinuation ();
+ try {
+ ContinueWith (continuation);
+ result = continuation.Event.Wait (millisecondsTimeout, cancellationToken);
+ } finally {
+ if (!result)
+ RemoveContinuation (continuation);
+ continuation.Dispose ();
+ }
+ }
+
+ return result;
+ }
public static void WaitAll (params Task[] tasks)
{
this.maxCount = maxCount;
this.currCount = initialCount;
- this.handle = new ManualResetEvent (initialCount == 0);
+ this.handle = new ManualResetEvent (initialCount > 0);
}
public void Dispose ()
T value;
GetGenericValueImpl (i, out value);
if (item == null){
- if (value == null)
+ if (value == null) {
return true;
+ }
continue;
}
-
- if (item.Equals (value))
+
+ if (item.Equals (value)) {
return true;
+ }
}
return false;
clone = clone.prev;
}
+ clone.SetMulticastInvoke ();
clone.prev = (MulticastDelegate)this.Clone ();
for (clone = clone.prev, orig = this.prev; orig != null; orig = orig.prev) {
{
if (value == null)
throw new ArgumentNullException ("value");
- if (value.length == 0)
+ if (value.Length == 0)
return 0;
if (this.length == 0)
return -1;
- return CultureInfo.CurrentCulture.CompareInfo.IndexOf (this, value, 0, length, CompareOptions.Ordinal);
+ return CultureInfo.CurrentCulture.CompareInfo.IndexOf (this, value, 0, length, CompareOptions.None);
}
public int IndexOf (String value, int startIndex)
public bool Contains (String value)
{
- return IndexOf (value) != -1;
+ if (value == null)
+ throw new ArgumentNullException ("value");
+
+ return IndexOfOrdinalUnchecked (value, 0, Length) != -1;
}
public static bool IsNullOrEmpty (String value)
memcpy4 (dest, src, size);
}
+ /* Used by the runtime */
+ internal static unsafe void bzero (byte *dest, int len) {
+ memset (dest, 0, len);
+ }
+
+ internal static unsafe void bzero_aligned_1 (byte *dest, int len) {
+ ((byte*)dest) [0] = 0;
+ }
+
+ internal static unsafe void bzero_aligned_2 (byte *dest, int len) {
+ ((short*)dest) [0] = 0;
+ }
+
+ internal static unsafe void bzero_aligned_4 (byte *dest, int len) {
+ ((int*)dest) [0] = 0;
+ }
+
+ internal static unsafe void bzero_aligned_8 (byte *dest, int len) {
+ ((long*)dest) [0] = 0;
+ }
+
+ internal static unsafe void memcpy_aligned_1 (byte *dest, byte *src, int size) {
+ ((byte*)dest) [0] = ((byte*)src) [0];
+ }
+
+ internal static unsafe void memcpy_aligned_2 (byte *dest, byte *src, int size) {
+ ((short*)dest) [0] = ((short*)src) [0];
+ }
+
+ internal static unsafe void memcpy_aligned_4 (byte *dest, byte *src, int size) {
+ ((int*)dest) [0] = ((int*)src) [0];
+ }
+
+ internal static unsafe void memcpy_aligned_8 (byte *dest, byte *src, int size) {
+ ((long*)dest) [0] = ((long*)src) [0];
+ }
+
internal static unsafe void CharCopy (char *dest, char *src, int count) {
// Same rules as for memcpy, but with the premise that
// chars can only be aligned to even addresses if their
{
result = TimeSpan.Zero;
- if (formats == null || formats.Length == 0)
+ if (input == null || formats == null || formats.Length == 0)
return false;
Parser p = new Parser (input, formatProvider);
//\r
\r
using System;\r
+using System.Collections.Generic;\r
using System.Diagnostics;\r
using System.Globalization;\r
using System.IO;\r
using System.Text;\r
using System.Threading;\r
\r
+#if !MONOTOUCH\r
+using Mono.Unix;\r
+#endif\r
using NUnit.Framework;\r
\r
namespace MonoTests.System.IO\r
if (Directory.Exists (TempFolder))\r
Directory.Delete (TempFolder, true);\r
}\r
+#if !MONOTOUCH\r
+ [Test] //BXC #12461\r
+ public void EnumerateFilesListSymlinks ()\r
+ {\r
+ if (!RunningOnUnix)\r
+ return;\r
\r
+ var afile = Path.Combine (TempFolder, "afile.src");\r
+ var bfile = Path.Combine (TempFolder, "bfile.src");\r
+ var cdir = Path.Combine (TempFolder, "cdir.src");\r
+\r
+ File.AppendAllText (afile, "hello");\r
+ var info = new UnixFileInfo (afile);\r
+ info.CreateSymbolicLink (bfile);\r
+ Directory.CreateDirectory (cdir);\r
+\r
+ var files0 = Directory.GetFiles (TempFolder, "*.src");\r
+ Array.Sort (files0);\r
+ Assert.AreEqual (2, files0.Length, "#1");\r
+ Assert.AreEqual (afile, files0 [0], "#2");\r
+ Assert.AreEqual (bfile, files0 [1], "#3");\r
+\r
+#if NET_4_0\r
+ var files1 = new List<string> (Directory.EnumerateFiles (TempFolder, "*.src")).ToArray ();\r
+ Array.Sort (files1);\r
+ Assert.AreEqual (2, files1.Length, "#1.b");\r
+ Assert.AreEqual (afile, files1 [0], "#2.b");\r
+ Assert.AreEqual (bfile, files1 [1], "#3.b");\r
+#endif\r
+\r
+ var files2 = Directory.GetFileSystemEntries (TempFolder, "*.src");\r
+ Array.Sort (files2);\r
+ Assert.AreEqual (3, files2.Length, "#1.c");\r
+ Assert.AreEqual (afile, files2 [0], "#2.c");\r
+ Assert.AreEqual (bfile, files2 [1], "#3.c");\r
+ Assert.AreEqual (cdir, files2 [2], "#4.c");\r
+\r
+#if NET_4_0\r
+ var files3 = new List<string> (Directory.EnumerateFileSystemEntries (TempFolder, "*.src")).ToArray ();\r
+ Array.Sort (files3);\r
+ Assert.AreEqual (3, files3.Length, "#1.d");\r
+ Assert.AreEqual (afile, files3 [0], "#2.d");\r
+ Assert.AreEqual (bfile, files3 [1], "#3.d");\r
+ Assert.AreEqual (cdir, files3 [2], "#4.d");\r
+#endif\r
+ }\r
+#endif\r
[Test]\r
public void CreateDirectory ()\r
{\r
}
#endif
+
+ public int? Bug12856 ()
+ {
+ return null;
+ }
+
+ [Test] //Bug #12856
+ public void MethodToStringShouldPrintFullNameOfGenericStructs ()
+ {
+ var m = GetType ().GetMethod ("Bug12856");
+ Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1");
+ }
}
#if NET_2_0
}
}
- [Test]
- public void GetResultNotCompleted ()
- {
- TaskAwaiter awaiter;
-
- var task = new Task (() => { });
- awaiter = task.GetAwaiter ();
-
- try {
- awaiter.GetResult ();
- Assert.Fail ();
- } catch (InvalidOperationException) {
- }
- }
-
[Test]
public void GetResultCanceled ()
{
}
}
- [Test]
- public void GetResultNotCompleted ()
- {
- TaskAwaiter<int> awaiter;
-
- task = new Task<int> (() => 1);
- awaiter = task.GetAwaiter ();
-
- try {
- awaiter.GetResult ();
- Assert.Fail ();
- } catch (InvalidOperationException) {
- }
- }
-
[Test]
public void GetResultCanceled ()
{
}
YieldAwaitable.YieldAwaiter a;
+ SynchronizationContext sc;
[SetUp]
public void Setup ()
{
+ sc = SynchronizationContext.Current;
a = new YieldAwaitable ().GetAwaiter ();
}
+ [TearDown]
+ public void TearDown ()
+ {
+ SynchronizationContext.SetSynchronizationContext (sc);
+ }
+
[Test]
public void IsCompleted ()
{
public void OnCompleted_2 ()
{
TaskScheduler scheduler = null;
+ SynchronizationContext.SetSynchronizationContext (null);
+
var mre = new ManualResetEvent (false);
a.OnCompleted (() => {
{
var scheduler = new MyScheduler ();
TaskScheduler ran_scheduler = null;
+ SynchronizationContext.SetSynchronizationContext (null);
var t = Task.Factory.StartNew (() => {
var mre = new ManualResetEvent (false);
var mre = new ManualResetEvent (false);
var context = new MyContext ();
- var old = SynchronizationContext.Current;
- try {
- SynchronizationContext.SetSynchronizationContext (context);
- a.OnCompleted (() => {
- context_ran = SynchronizationContext.Current;
- mre.Set ();
- });
-
- Assert.IsTrue (mre.WaitOne (1000), "#1");
-
- } finally {
- SynchronizationContext.SetSynchronizationContext (old);
- }
+ SynchronizationContext.SetSynchronizationContext (context);
+ a.OnCompleted (() => {
+ context_ran = SynchronizationContext.Current;
+ mre.Set ();
+ });
+ Assert.IsTrue (mre.WaitOne (1000), "#1");
Assert.IsNull (context_ran, "#2");
}
}
}
[Test]
+#if __IOS__
+ [Ignore ("https://bugzilla.xamarin.com/show_bug.cgi?id=12789")]
+#endif
public void SerializeRoundTrip ()
{
WindowsIdentity wi = WindowsIdentity.GetCurrent ();
using System;
using System.Threading;
-using System.Threading.Tasks;
using NUnit.Framework;
namespace MonoTests.System.Threading
}
#endif
+ public class StuffToPick
+ {
+ public StuffToPick () {}
+ public void Method () {}
+ public int Property { get; set; }
+ public event Action Event;
+ public int Field;
+ public void GenericMethod<T> () {}
+ }
+
+ public class StuffToPick<T>
+ {
+ public StuffToPick () {}
+ public void Method () {}
+ public int Property { get; set; }
+ public event Action Event;
+ public int Field;
+ public void GenericMethod<T> () {}
+ }
+
+ static void TestSerialization (CrossDomainTester tester, object o)
+ {
+ Assert.AreSame (o, tester.ReturnArg0 (o), "serializing_type_" + o.GetType ());
+ }
+
+ [Test] //BXC #12611
+ public void ReflectionObjectsAreSerializableTest ()
+ {
+ ad = CreateTestDomain (tempDir, true);
+ CrossDomainTester tester = CreateCrossDomainTester (ad);
+
+ TestSerialization (tester, typeof (StuffToPick));
+ TestSerialization (tester, typeof (StuffToPick).GetConstructor(new Type [0]));
+ TestSerialization (tester, typeof (StuffToPick).GetMethod ("Method"));
+ TestSerialization (tester, typeof (StuffToPick).GetProperty ("Property"));
+ TestSerialization (tester, typeof (StuffToPick).GetEvent ("Event"));
+ TestSerialization (tester, typeof (StuffToPick).GetField ("Field"));
+ TestSerialization (tester, typeof (StuffToPick).GetMethod ("GenericMethod"));
+
+ TestSerialization (tester, typeof (StuffToPick<>));
+ TestSerialization (tester, typeof (StuffToPick<>).GetConstructor(new Type [0]));
+ TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("Method"));
+ TestSerialization (tester, typeof (StuffToPick<>).GetProperty ("Property"));
+ TestSerialization (tester, typeof (StuffToPick<>).GetEvent ("Event"));
+ TestSerialization (tester, typeof (StuffToPick<>).GetField ("Field"));
+ TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("GenericMethod"));
+
+ TestSerialization (tester, typeof (StuffToPick<int>));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetConstructor(new Type [0]));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("Method"));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetProperty ("Property"));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetEvent ("Event"));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetField ("Field"));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("GenericMethod"));
+ }
+
+ [Test] //BXC #12611
+ [Category ("NotWorking")] // Serialization can't handle generic methods
+ public void GenericReflectionObjectsAreSerializableTest ()
+ {
+ ad = CreateTestDomain (tempDir, true);
+ CrossDomainTester tester = CreateCrossDomainTester (ad);
+
+ TestSerialization (tester, typeof (StuffToPick).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+ TestSerialization (tester, typeof (StuffToPick<>).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+ TestSerialization (tester, typeof (StuffToPick<int>).GetMethod ("GenericMethod").MakeGenericMethod (typeof (int)));
+ }
+
private static AppDomain CreateTestDomain (string baseDirectory, bool assemblyResolver)
{
AppDomainSetup setup = new AppDomainSetup ();
return true;
}
}
+
+ public object ReturnArg0 (object obj)
+ {
+ return obj;
+ }
}
[Serializable ()]
res = del1( ref val );\r
Assert.AreEqual("abbcbbd", val , "#A05");\r
}\r
+\r
+ [Test] //Bug #12536\r
+ public void TestCombineBothDirections ()\r
+ {\r
+ MyDelegate dela = new MyDelegate( MethodA );\r
+ MyDelegate delb = new MyDelegate( MethodB );\r
+ MyDelegate delc = new MyDelegate( MethodC );\r
+ MyDelegate deld = new MyDelegate( MethodD );\r
+\r
+ string val;\r
+ char res;\r
+\r
+ MyDelegate a = dela + delb;\r
+ val = "";\r
+ res = a (ref val);\r
+ Assert.AreEqual ("ab", val, "#1");\r
+ Assert.AreEqual ('b', res, "#2");\r
+\r
+ MyDelegate b = delc + deld;\r
+ val = "";\r
+ res = b (ref val);\r
+ Assert.AreEqual ("cd", val, "#3");\r
+ Assert.AreEqual ('d', res, "#4");\r
+\r
+ MyDelegate c = a + b;\r
+ val = "";\r
+ res = c (ref val);\r
+ Assert.AreEqual ("abcd", val, "#5");\r
+ Assert.AreEqual ('d', res, "#6");\r
+ }\r
}\r
}\r
Assert.IsTrue ("ABC".Contains ("ABC"));
Assert.IsTrue ("ABC".Contains ("AB"));
Assert.IsTrue (!"ABC".Contains ("AD"));
- Assert.IsTrue (!"encyclop�dia".Contains("encyclopaedia"));
+ Assert.IsTrue (!"encyclopædia".Contains("encyclopaedia"));
+ }
+
+ [Test]
+ public void IndexOfIsCultureAwareWhileContainsIsNot ()
+ {
+ string a = "encyclopædia";
+ string b = "encyclopaedia";
+ Assert.IsFalse (a.Contains (b), "#1");
+ Assert.IsTrue (a.Contains ("æ"), "#1.1");
+ Assert.IsFalse (b.Contains ("æ"), "#1.2");
+ Assert.AreEqual (0, a.IndexOf (b), "#2");
+ Assert.AreEqual (8, a.IndexOf ('æ'), "#3");
+ Assert.AreEqual (-1, b.IndexOf ('æ'), "#4");
+ Assert.AreEqual (8, a.IndexOf ("æ"), "#5");
+ Assert.AreEqual (8, b.IndexOf ("æ"), "#6");
+
+ Assert.AreEqual (0, CultureInfo.CurrentCulture.CompareInfo.IndexOf (a, b, 0, a.Length, CompareOptions.None), "#7");
+ Assert.AreEqual (-1, CultureInfo.CurrentCulture.CompareInfo.IndexOf (a, b, 0, a.Length, CompareOptions.Ordinal), "#8");
}
[Test]
TryParseExactHelper ("10:12", new string [0], true, "dontcare");
TryParseExactHelper ("10:12", new string [] { String.Empty }, true, "dontcare");
TryParseExactHelper ("10:12", new string [] { null }, true, "dontcare");
+
+ TryParseExactHelper (null, new string [] { null }, true, "dontcare");
}
void TryParseExactHelper (string input, string [] formats, bool error, string expected, IFormatProvider formatProvider = null,
--- /dev/null
+#include corlib.dll.sources
\ No newline at end of file
/r:System.Xml.Linq.dll \
/r:System.Configuration.dll
+CLEAN_FILES += $(the_lib).config
+
TEST_MCS_FLAGS = /r:System.dll /r:System.Core.dll /r:System.Xml.dll
DOC_SOURCE_DIRS = \
public class ExtensionObject
{
bool quiet = true;
+ Dictionary<string, System.Reflection.Assembly> assemblyCache = new Dictionary<string, System.Reflection.Assembly> ();
public string Colorize(string code, string lang)
{
System.Reflection.Assembly assembly = null;
try {
- assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+ if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
+ assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+ if (assembly != null)
+ assemblyCache[assemblyname] = assembly;
+ }
} catch (Exception) {
// nothing.
}
if (assemblyname == string.Empty)
return string.Empty;
- var assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+ System.Reflection.Assembly assembly;
+ if (!assemblyCache.TryGetValue (assemblyname, out assembly)) {
+ assembly = System.Reflection.Assembly.LoadWithPartialName(assemblyname);
+ if (assembly != null)
+ assemblyCache[assemblyname] = assembly;
+ }
+
if (assembly == null)
return string.Empty;
public static int GetNodeLevel (Node node)
{
int i = 0;
- for (; !node.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase); i++)
+ for (; !node.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase); i++) {
node = node.Parent;
+ if (node == null)
+ return i - 1;
+ }
return i - 1;
}
Node GetNodeTypeParent (Node node)
{
// Type nodes are always at level 2 so we just need to get there
- while (node != null && node.Parent != null && !node.Parent.Parent.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase))
+ while (node != null && node.Parent != null
+ && !node.Parent.Parent.Element.StartsWith ("root:/", StringComparison.OrdinalIgnoreCase) && node.Parent.Parent.Parent != null)
node = node.Parent;
return node;
}
<xsl:param name="id" />
<h2>Syntax</h2>
<div class="Signature">
- <xsl:attribute name="id">
- <xsl:copy-of select="$id" />
- </xsl:attribute>
+ <xsl:if test="$id != ''">
+ <xsl:attribute name="id">
+ <xsl:copy-of select="$id" />
+ </xsl:attribute>
+ </xsl:if>
<xsl:copy-of select="$content" />
</div>
</xsl:template>
using Monodoc;
using Monodoc.Generators;
+using Monodoc.Providers;
// Used by ReachabilityWithCrefsTest
// using HtmlAgilityPack;
Assert.IsTrue (rootTree.RenderUrl ("T:System.IComparable{T}", generator, out result), "#6");
}
+ [Test]
+ public void PublicUrlOnUnattachedHelpSourceRoot ()
+ {
+ // Unattached help source have no root:/ URL attributed
+ var hs = new EcmaHelpSource (Path.Combine (BaseDir, "sources", "netdocs"), false);
+ var rootTree = RootTree.LoadTree (Path.GetFullPath (BaseDir), false);
+ hs.RootTree = rootTree;
+ Assert.IsNull (hs.Tree.RootNode.PublicUrl);
+ var nsChildUrl = hs.Tree.RootNode.ChildNodes.First ().PublicUrl;
+ Assert.IsNotNull (nsChildUrl);
+ StringAssert.StartsWith ("N:", nsChildUrl);
+ // Verify GetNodeTypeParent
+ var typeNode = hs.Tree.RootNode.ChildNodes.First ().ChildNodes.First ();
+ var metaNode = typeNode.ChildNodes.First (cn => cn.Element == "M");
+ StringAssert.StartsWith (typeNode.PublicUrl, metaNode.PublicUrl);
+ }
+
/*
[Test, Ignore ("Mono documentation is full of syntax errors so we can't use it reliably for this test")]
public void ReachabilityWithCrefsTest ()
$ csharp -v -v
This will turn on the parser debugging output and will
- generate a lot of data when parsing its input.
+ generate a lot of data when parsing its input (make sure that
+ your parser has been compiled with the -v flag, see above for
+ details).
To start with a new completion scheme, type your C# code and
then hit the tab key to trigger the completion engine. In the
We then rebuild our compiler:
(cd mcs/; make cs-parser.jay)
- (cd tools/csharplib; make install)
+ (cd class/Mono.CSharp; make install)
And re-run csharp:
+++ /dev/null
-// CS0019: Operator `==' cannot be applied to operands of type `int' and `null'
-// Line: 10
-// Compiler options: -langversion:ISO-1
-
-class C
-{
- static int Foo { get { return 3; } set {} }
-
- static void Main ()
- {
- if (Foo == null) {}
- }
-}
+++ /dev/null
-// CS0019: Operator `+' cannot be applied to operands of type `null' and `MyTypeImplicitOnly?'
-// Line: 13
-
-struct MyTypeImplicitOnly
-{
-}
-
-class C
-{
- static void Main ()
- {
- MyTypeImplicitOnly? mt = null;
- mt = null + mt;
- }
-}
--- /dev/null
+// CS0019: Operator `==' cannot be applied to operands of type `S' and `S'
+// Line: 22
+
+struct S
+{
+ public static implicit operator E (S s)
+ {
+ return 0;
+ }
+}
+
+public enum E
+{
+}
+
+class C
+{
+ public static void Main ()
+ {
+ S s;
+ S s2;
+ var x = s == s2;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0019: Operator `&&' cannot be applied to operands of type `S?' and `S?'
+// Line: 20
+
+struct S
+{
+ public static S operator & (S s, S i)
+ {
+ return s;
+ }
+}
+
+class C
+{
+ public static void Main ()
+ {
+ S? s = new S ();
+ S? s2 = null;
+
+ var res = s && s2;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0029: Cannot implicitly convert type `string' to `MyTypeImplicitOnly?'
+// Line: 13
+
+struct MyTypeImplicitOnly
+{
+}
+
+class C
+{
+ static void Main ()
+ {
+ MyTypeImplicitOnly? mt = null;
+ mt = null + mt;
+ }
+}
--- /dev/null
+// CS0034: Operator `==' is ambiguous on operands of type `Foo' and `Foo'
+// Line: 23
+
+public struct Foo
+{
+ public static implicit operator int? (Foo f)
+ {
+ return 1;
+ }
+
+ public static implicit operator bool? (Foo f)
+ {
+ return false;
+ }
+}
+
+class C
+{
+ public static void Main ()
+ {
+ Foo f;
+ Foo f2;
+ var v = f == f2;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0120: An object reference is required to access non-static member `MainClass.Callback()'
+// Line: 9
+
+using System;
+
+class MainClass : BaseClass
+{
+ public MainClass (string a, Action callback)
+ : base (a, () => Callback ())
+ {
+ }
+
+ private void Callback ()
+ {
+ }
+}
+
+public class BaseClass
+{
+ public BaseClass (string a, int b)
+ {
+ }
+
+ public BaseClass (string a, Action callback)
+ {
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0161: `T.Main()': not all code paths return a value
+// Line: 6
+// CSC bug: The error is not reported even if it should as in other unreachable cases
+
+class T {
+ public static int Main ()
+ {
+ switch (1) {
+ case 1:
+ return 0;
+ default:
+ break;
+ }
+ }
+}
--- /dev/null
+// CS0266: Cannot implicitly convert type `E?' to `E'. An explicit conversion exists (are you missing a cast?)
+// Line: 13
+
+enum E
+{
+}
+
+class C
+{
+ public static void Main ()
+ {
+ E e = 0;
+ E r = e + null;
+ }
+}
--- /dev/null
+// CS0266: Cannot implicitly convert type `int?' to `E'. An explicit conversion exists (are you missing a cast?)
+// Line: 13
+
+enum E
+{
+}
+
+class C
+{
+ public static void Main ()
+ {
+ E e = 0;
+ E r = e - null;
+ }
+}
--- /dev/null
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 14
+// Compiler options: -warnaserror -warn:2
+
+public enum E
+{
+}
+
+class C
+{
+ public static void Main ()
+ {
+ E? e = null;
+ var res = e - null;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0458: The result of the expression is always `null' of type `short?'
+// Line: 24
+// Compiler options: -warnaserror -warn:2
+
+struct S
+{
+ public static short operator + (S s, S i)
+ {
+ return 2;
+ }
+
+ public static int? operator + (S? s, int? i)
+ {
+ return 2;
+ }
+
+}
+
+class C
+{
+ public static void Main ()
+ {
+ S? s = new S ();
+ var x = s + (S?)null;
+ }
+}
\ No newline at end of file
--- /dev/null
+// CS0458: The result of the expression is always `null' of type `int?'
+// Line: 9
+// Compiler options: -warnaserror -warn:2
+
+public class C
+{
+ public static void Main ()
+ {
+ int? s = null;
+ int? v = s + null;
+ }
+}
--- /dev/null
+// CS0464: The result of comparing type `int?' with null is always `false'
+// Line: 10
+// Compiler options: -warnaserror -warn:2
+
+class C
+{
+ public static void Main ()
+ {
+ int? k = 1;
+ var x = k > null;
+ }
+}
\ No newline at end of file
-// CS0464: The result of comparing type `int' with null is always `false'
+// CS0464: The result of comparing type `int?' with null is always `false'
// Line: 9
// Compiler options: -warnaserror -warn:2
-// CS0472: The result of comparing value type `int' with null is always `false'
+// CS0472: The result of comparing value type `long' with null is always `false'
// Line: 9
// Compiler options: -warnaserror -warn:2
-// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value.'
+// CS0647: Error during emitting `System.Runtime.CompilerServices.MethodImplAttribute' attribute. The reason is `Incorrect argument value'
// Line: 8
using System.Runtime.CompilerServices;
class Test
{
- [MethodImplAttribute(444)]
+ [MethodImplAttribute(445)]
public void test ()
{
}
--- /dev/null
+// 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
--- /dev/null
+// CS0658: `value' is invalid attribute target. All attributes in this attribute section will be ignored
+// Line : 5
+// Compiler options: -warnaserror -warn:1
+
+[reply] ["asd"]
\ No newline at end of file
// CS1661: Cannot convert `lambda expression' to delegate type `C.WithOutParam' since there is a parameter mismatch
// Line: 10
-
class C
{
delegate void WithOutParam (out string value);
static void Main()
{
WithOutParam o = (string l) => { return; };
- }
+ }
}
--- /dev/null
+// CS1661: Cannot convert `anonymous method' to delegate type `System.Predicate<T>' since there is a parameter mismatch
+// Line: 8
+
+class Test<T>
+{
+ void test (Test<T> t, System.Predicate<T> p)
+ {
+ test (t, delegate (Test<T> item) {
+ return false;
+ });
+ }
+}
var hoisted = localVariable.HoistedVariant;
if (hoisted != null && hoisted.Storey != this && hoisted.Storey is StateMachine) {
- // TODO: It's too late the field is defined in HoistedLocalVariable ctor
+ //
+ // Variable is already hoisted but we need it in storey which can be shared
+ //
hoisted.Storey.hoisted_locals.Remove (hoisted);
+ hoisted.Storey.Members.Remove (hoisted.Field);
hoisted = null;
}
this.field = field;
}
+ public Field Field {
+ get {
+ return field;
+ }
+ }
+
public AnonymousMethodStorey Storey {
get {
return storey;
#region Properties
- public Field Field {
- get {
- return field;
- }
- }
-
public bool IsAssigned { get; set; }
public ParameterReference Parameter {
: base (storey, field)
{
}
-
- public Field Field {
- get {
- return field;
- }
- }
}
//
return false;
if (p_mod == Parameter.Modifier.NONE)
- ec.Report.Error (1677, loc, "Parameter `{0}' should not be declared with the `{1}' keyword",
- (i + 1).ToString (), Parameter.GetModifierSignature (Parameters.FixedParameters [i].ModFlags));
+ ec.Report.Error (1677, Parameters[i].Location, "Parameter `{0}' should not be declared with the `{1}' keyword",
+ (i + 1).ToString (), Parameter.GetModifierSignature (Parameters [i].ModFlags));
else
- ec.Report.Error (1676, loc, "Parameter `{0}' must be declared with the `{1}' keyword",
+ ec.Report.Error (1676, Parameters[i].Location, "Parameter `{0}' must be declared with the `{1}' keyword",
(i+1).ToString (), Parameter.GetModifierSignature (p_mod));
error = true;
}
TypeSpec type = invoke_pd.Types [i];
- // We assume that generic parameters are always inflated
- if (TypeManager.IsGenericParameter (type))
- continue;
-
- if (TypeManager.HasElementType (type) && TypeManager.IsGenericParameter (TypeManager.GetElementType (type)))
+ //
+ // Assumes that generic mvar parameters are always inflated
+ //
+ if (ImplicitDelegateCreation.ContainsMethodTypeParameter (type))
continue;
if (!TypeSpecComparer.IsEqual (invoke_pd.Types [i], Parameters.Types [i])) {
if (ignore_errors)
return false;
- ec.Report.Error (1678, loc, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
+ ec.Report.Error (1678, Parameters [i].Location, "Parameter `{0}' is declared as type `{1}' but should be `{2}'",
(i+1).ToString (),
Parameters.Types [i].GetSignatureForError (),
invoke_pd.Types [i].GetSignatureForError ());
if (src_block.HasCapturedThis) {
//
// Remove hoisted 'this' request when simple instance method is
- // enough (no hoisted variables only 'this')
+ // enough. No hoisted variables only 'this' and don't need to
+ // propagate this to value type state machine.
//
- if (src_block.ParametersBlock.StateMachine == null)
+ StateMachine sm_parent = null;
+ var pb = src_block.ParametersBlock;
+ do {
+ sm_parent = pb.StateMachine;
+ pb = pb.Parent == null ? null : pb.Parent.ParametersBlock;
+ } while (sm_parent == null && pb != null);
+
+ if (sm_parent == null) {
top_block.RemoveThisReferenceFromChildrenBlock (src_block);
-
- //
- // Special case where parent class is used to emit instance method
- // because currect storey is of value type (async host). We cannot
- // use ldftn on non-boxed instances either to share mutated state
- //
- if (sm != null && sm.Kind == MemberKind.Struct) {
- parent = sm.Parent.PartialContainer;
+ } else if (sm_parent.Kind == MemberKind.Struct) {
+ //
+ // Special case where parent class is used to emit instance method
+ // because currect storey is of value type (async host). We cannot
+ // use ldftn on non-boxed instances either to share mutated state
+ //
+ parent = sm_parent.Parent.PartialContainer;
}
}
if (loaded.Contains (key))
continue;
- // A corlib assembly is the first assembly which contains System.Object
- if (corlib_assembly == null && HasObjectType (a)) {
- corlib_assembly = a;
- continue;
- }
-
loaded.Add (key);
}
+ if (corlib_assembly == null) {
+ //
+ // Requires second pass because HasObjectType can trigger assembly load event
+ //
+ for (int i = 0; i < loaded.Count; ++i) {
+ var assembly = loaded [i];
+
+ //
+ // corlib assembly is the first referenced assembly which contains System.Object
+ //
+ if (HasObjectType (assembly.Item2)) {
+ corlib_assembly = assembly.Item2;
+ loaded.RemoveAt (i);
+ break;
+ }
+ }
+ }
+
foreach (var entry in module.Compiler.Settings.AssemblyReferencesAliases) {
a = LoadAssemblyFile (entry.Item2, false);
if (a == null)
// Otherwise, if the selected operator is a predefined operator
//
Binary b = source as Binary;
- if (b == null && source is ReducedExpression)
- b = ((ReducedExpression) source).OriginalExpression as Binary;
+ if (b == null) {
+ if (source is ReducedExpression)
+ b = ((ReducedExpression) source).OriginalExpression as Binary;
+ else if (source is Nullable.LiftedBinaryOperator) {
+ var po = ((Nullable.LiftedBinaryOperator) source);
+ if (po.UserOperator == null)
+ b = po.Binary;
+ } else if (source is TypeCast) {
+ b = ((TypeCast) source).Child as Binary;
+ }
+ }
if (b != null) {
//
return HasSecurityAttribute && IsSecurityActionValid ();
}
+ static bool IsValidMethodImplOption (int value)
+ {
+ //
+ // Allow to use AggressiveInlining on any runtime/corlib
+ //
+ MethodImplOptions all = (MethodImplOptions) 256;
+ foreach (MethodImplOptions v in System.Enum.GetValues (typeof (MethodImplOptions))) {
+ all |= v;
+ }
+
+ return ((MethodImplOptions) value | all) == all;
+ }
+
static bool IsValidArgumentType (TypeSpec t)
{
if (t.IsArray) {
if (string.IsNullOrEmpty (value))
Error_AttributeEmitError ("DllName cannot be empty or null");
}
- } else if (Type == predefined.MethodImpl && pt.BuiltinType == BuiltinTypeSpec.Type.Short &&
- !System.Enum.IsDefined (typeof (MethodImplOptions), ((Constant) arg_expr).GetValue ().ToString ())) {
- Error_AttributeEmitError ("Incorrect argument value.");
- return;
+ } else if (Type == predefined.MethodImpl) {
+ if (pos_args.Count == 1) {
+ var value = (int) ((Constant) arg_expr).GetValueAsLong ();
+
+ if (!IsValidMethodImplOption (value)) {
+ Error_AttributeEmitError ("Incorrect argument value");
+ }
+ }
}
}
if (ac != null) {
element = GetTransformationFlags (ac.Element);
if (element == null)
- return null;
+ return new bool[] { false, false };
bool[] res = new bool[element.Length + 1];
res[0] = false;
switch (oper){
case Binary.Operator.BitwiseOr:
//
- // bool? operator &(bool? x, bool? y);
+ // bool? operator |(bool? x, bool? y);
//
if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
(rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
- var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ var b = new Binary (oper, left, right).ResolveOperator (ec);
// false | null => null
// null | false => null
//
if ((lt.BuiltinType == BuiltinTypeSpec.Type.Bool && right is NullLiteral) ||
(rt.BuiltinType == BuiltinTypeSpec.Type.Bool && left is NullLiteral)) {
- var b = new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ var b = new Binary (oper, left, right).ResolveOperator (ec);
// false & null => false
// null & false => false
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
if (!DoBinaryNumericPromotions (ec, ref left, ref right))
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
IntConstant ic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
// null << value => null
if (left is NullLiteral)
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
if (left is NullLiteral && right is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
IntConstant sic = right.ConvertImplicitly (ec.BuiltinTypes.Int) as IntConstant;
// null >> value => null
if (left is NullLiteral)
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, left, right).ResolveOperator (ec);
left = left.ConvertImplicitly (ec.BuiltinTypes.Int);
if (left.Type.BuiltinType == BuiltinTypeSpec.Type.Int)
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
if (left is NullLiteral) {
var lifted_int = new Nullable.NullableType (ec.BuiltinTypes.Int, loc);
lifted_int.ResolveAsType (ec);
- return (Constant) new Nullable.LiftedBinaryOperator (oper, lifted_int, right).Resolve (ec);
- }
-
- if (left is Nullable.LiftedNull) {
- return (Constant) new Nullable.LiftedBinaryOperator (oper, left, right).Resolve (ec);
+ return (Constant) new Binary (oper, lifted_int, right).ResolveOperator (ec);
}
}
}
bool pair_found = false;
- for (int ii = i + 1; ii < members.Count; ++ii) {
+ for (int ii = 0; ii < members.Count; ++ii) {
var o_b = members[ii] as Operator;
if (o_b == null || o_b.OperatorType != matching_type)
continue;
public void BeginCatchBlock (TypeSpec type)
{
+ if (IsAnonymousStoreyMutateRequired)
+ type = CurrentAnonymousMethod.Storey.Mutator.Mutate (type);
+
ig.BeginCatchBlock (type.GetMetaInfo ());
}
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
-// Marek Safar (marek.safar@seznam.cz)
+// Marek Safar (marek.safar@gmail.com)
//
// Copyright 2001-2003 Ximian, Inc.
// Copyright 2003-2008 Novell, Inc.
-// Copyright 2011 Xamarin Inc
+// Copyright 2011-2013 Xamarin Inc
//
using System;
if (this.type == type)
return this;
- if (Convert.ImplicitNumericConversion (this, type) == null)
+ if (!Convert.ImplicitNumericConversionExists (this.type, type))
return null;
bool fail;
}
if (expr_type != expr.Type)
- return new Nullable.Lifted (conv, unwrap, target_type).Resolve (ec);
+ return new Nullable.LiftedConversion (conv, unwrap, target_type).Resolve (ec);
return Nullable.Wrap.Create (conv, target_type);
}
TypeSpec source_type = source.Type;
TypeSpec target_type = target;
Expression source_type_expr;
+ bool nullable_source = false;
if (source_type.IsNullableType) {
// No unwrapping conversion S? -> T for non-reference types
if (implicitOnly && !TypeSpec.IsReferenceType (target_type) && !target_type.IsNullableType) {
source_type_expr = source;
} else {
- source_type_expr = Nullable.Unwrap.Create (source);
+ source_type_expr = Nullable.Unwrap.CreateUnwrapped (source);
source_type = source_type_expr.Type;
+ nullable_source = true;
}
} else {
source_type_expr = source;
//
if (t_x != target_type) {
//
- // User operator is of T?, no need to lift it
+ // User operator is of T?
//
- if (t_x == target && t_x.IsNullableType)
- return source;
+ if (t_x.IsNullableType && target.IsNullableType) {
+ //
+ // User operator return type does not match target type we need
+ // yet another conversion. This should happen for promoted numeric
+ // types only
+ //
+ if (t_x != target) {
+ var unwrap = Nullable.Unwrap.CreateUnwrapped (source);
- source = implicitOnly ?
- ImplicitConversionStandard (ec, source, target_type, loc) :
- ExplicitConversionStandard (ec, source, target_type, loc);
+ source = implicitOnly ?
+ ImplicitConversionStandard (ec, unwrap, target_type, loc) :
+ ExplicitConversionStandard (ec, unwrap, target_type, loc);
- if (source == null)
- return null;
+ if (source == null)
+ return null;
+
+ source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec);
+ }
+ } else {
+ source = implicitOnly ?
+ ImplicitConversionStandard (ec, source, target_type, loc) :
+ ExplicitConversionStandard (ec, source, target_type, loc);
+
+ if (source == null)
+ return null;
+ }
}
+
//
- // Source expression is of nullable type, lift the result in the case it's null and
- // not nullable/lifted user operator is used
+ // Source expression is of nullable type and underlying conversion returns
+ // only non-nullable type we need to lift it manually
//
- if (source_type_expr is Nullable.Unwrap && !s_x.IsNullableType && (TypeSpec.IsReferenceType (target) || target_type != target))
- source = new Nullable.Lifted (source, source_type_expr, target).Resolve (ec);
- else if (target_type != target)
+ if (nullable_source && !s_x.IsNullableType)
+ return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec);
+
+ //
+ // Target is of nullable type but source type is not, wrap the result expression
+ //
+ if (target.IsNullableType && !t_x.IsNullableType)
source = Nullable.Wrap.Create (source, target);
return source;
Expression am = ame.Compatible (ec, target_type);
if (am != null)
return am.Resolve (ec);
+
+ // Avoid CS1503 after CS1661
+ return ErrorExpression.Instance;
}
if (expr_type == InternalType.Arglist && target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec)
if (e == null)
return null;
- return new Nullable.Lifted (e, unwrap, target_type).Resolve (ec);
+ return new Nullable.LiftedConversion (e, unwrap, target_type).Resolve (ec);
}
if (expr_type.BuiltinType == BuiltinTypeSpec.Type.Object) {
return new UnboxCast (expr, target_type);
var sect = (List<Attribute>) $2;
if (attrs == null)
attrs = new Attributes (sect);
- else
+ else if (sect != null)
attrs.AddAttributes (sect);
$$ = attrs;
}
}
| error
{
- $$ = CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1));
+ CheckAttributeTarget (GetTokenName (yyToken), GetLocation ($1));
$$ = null;
}
;
$$ = new Throw ((Expression) $2, GetLocation ($1));
lbag.AddStatement ($$, GetLocation ($3));
}
+ | THROW expression error
+ {
+ Error_SyntaxError (yyToken);
+ $$ = new Throw ((Expression) $2, GetLocation ($1));
+ }
| THROW error
{
Error_SyntaxError (yyToken);
public const int EvalCompilationUnitParserCharacter = 0x100001;
public const int EvalUsingDeclarationsParserCharacter = 0x100002;
public const int DocumentationXref = 0x100003;
+
+ const int UnicodeLS = 0x2028;
+ const int UnicodePS = 0x2029;
//
// XML documentation buffer. The save point is used to divide
x = reader.Read ();
}
- if (x == '\r') {
- if (peek_char () == '\n') {
- putback_char = -1;
- }
+ if (x <= 13) {
+ if (x == '\r') {
+ if (peek_char () == '\n') {
+ putback_char = -1;
+ }
- x = '\n';
- advance_line ();
- } else if (x == '\n') {
+ x = '\n';
+ advance_line ();
+ } else if (x == '\n') {
+ advance_line ();
+ } else {
+ col++;
+ }
+ } else if (x >= UnicodeLS && x <= UnicodePS) {
advance_line ();
} else {
col++;
}
+
return x;
}
throw new InternalErrorException (string.Format ("Secondary putback [{0}] putting back [{1}] is not allowed", (char)putback_char, (char) c), Location);
}
- if (c == '\n' || col == 0) {
+ if (c == '\n' || col == 0 || (c >= UnicodeLS && c <= UnicodePS)) {
// It won't happen though.
line--;
ref_line--;
int has_identifier_argument = (int)(cmd & PreprocessorDirective.RequiresArgument);
int pos = 0;
- while (c != -1 && c != '\n') {
+ while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
if (c == '\\' && has_identifier_argument >= 0) {
if (has_identifier_argument != 0) {
has_identifier_argument = 1;
// Eat single-line comments
//
get_char ();
- do {
- c = get_char ();
- } while (c != -1 && c != '\n');
-
+ ReadToEndOfLine ();
break;
}
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
-
+ ReadToEndOfLine ();
return false;
}
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
-
+ ReadToEndOfLine ();
return new_line != 0;
}
c = 0;
}
- if (c != '\n' && c != '/' && c != '"') {
+ if (c != '\n' && c != '/' && c != '"' && c != UnicodeLS && c != UnicodePS) {
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
+ ReadToEndOfLine ();
Report.Error (1578, loc, "Filename, single-line comment or end-of-line expected");
return true;
}
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
+
} else if (c == '/') {
ReadSingleLineComment ();
} else {
//
// Eat any remaining characters to continue parsing on next line
//
- while (c != -1 && c != '\n') {
- c = get_char ();
- }
+ ReadToEndOfLine ();
Error_EndLineExpected ();
return true;
string TokenizeFileName (ref int c)
{
var string_builder = new StringBuilder ();
- while (c != -1 && c != '\n') {
+ while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS) {
c = get_char ();
if (c == '"') {
c = get_char ();
Report.Warning (1692, 1, Location, "Invalid number");
// Read everything till the end of the line or file
- do {
- c = get_char ();
- } while (c != -1 && c != '\n');
+ ReadToEndOfLine ();
}
}
return number;
}
+ void ReadToEndOfLine ()
+ {
+ int c;
+ do {
+ c = get_char ();
+ } while (c != -1 && c != '\n' && c != UnicodeLS && c != UnicodePS);
+ }
+
void ReadSingleLineComment ()
{
if (peek_char () != '/')
Report.Warning (1696, 1, Location, "Single-line comment or end-of-line expected");
// Read everything till the end of the line or file
- int c;
- do {
- c = get_char ();
- } while (c != -1 && c != '\n');
+ ReadToEndOfLine ();
}
/// <summary>
var loc = Location;
- if (c == '\n' || c == '/') {
+ if (c == '\n' || c == '/' || c == UnicodeLS || c == UnicodePS) {
if (c == '/')
ReadSingleLineComment ();
Report.RegisterWarningRegion (loc).WarningEnable (loc, code, context);
}
}
- } while (code >= 0 && c != '\n' && c != -1);
+ } while (code >= 0 && c != '\n' && c != -1 && c != UnicodeLS && c != UnicodePS);
}
return;
Report.Warning (1634, 1, Location, "Expected disable or restore");
// Eat any remaining characters on the line
- while (c != '\n' && c != -1)
- c = get_char ();
+ ReadToEndOfLine ();
return;
}
return Token.LITERAL;
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
if (!quoted) {
Report.Error (1010, Location, "Newline in constant");
case '\v':
case '\r':
case '\n':
+ case UnicodeLS:
+ case UnicodePS:
case '/':
next = peek_token ();
if (next == Token.COMMA || next == Token.CLOSE_BRACKET)
case Token.FOREACH:
case Token.TYPEOF:
case Token.WHILE:
+ case Token.SWITCH:
case Token.USING:
case Token.DEFAULT:
case Token.DELEGATE:
}
}
- while ((d = get_char ()) != -1 && d != '\n');
+ ReadToEndOfLine ();
any_token_seen |= tokens_seen;
tokens_seen = false;
if (docAppend)
xml_comment_buffer.Append ((char) d);
- if (d == '\n'){
+ if (d == '\n' || d == UnicodeLS || d == UnicodePS){
any_token_seen |= tokens_seen;
tokens_seen = false;
//
return is_number (c, false);
case '\n': // white space
+ case UnicodeLS:
+ case UnicodePS:
any_token_seen |= tokens_seen;
tokens_seen = false;
comments_seen = false;
continue;
}
- if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' )
+ if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\v' || c == UnicodeLS || c == UnicodePS)
continue;
if (c == '#') {
return Token.LITERAL;
}
- if (c == '\n') {
+ if (c == '\n' || c == UnicodeLS || c == UnicodePS) {
Report.Error (1010, start_location, "Newline in constant");
return Token.ERROR;
}
// Try to recover, read until newline or next "'"
while ((c = get_char ()) != -1) {
- if (c == '\n' || c == '\'')
+ if (c == '\n' || c == '\'' || c == UnicodeLS || c == UnicodePS)
break;
}
}
//
// Returns true when type is MVAR or has MVAR reference
//
- static bool ContainsMethodTypeParameter (TypeSpec type)
+ public static bool ContainsMethodTypeParameter (TypeSpec type)
{
var tps = type as TypeParameterSpec;
if (tps != null)
return e;
}
+ public Constant ResolveLabelConstant (ResolveContext rc)
+ {
+ var expr = Resolve (rc);
+ if (expr == null)
+ return null;
+
+ Constant c = expr as Constant;
+ if (c == null) {
+ if (c.type != InternalType.ErrorType)
+ rc.Report.Error (150, StartLocation, "A constant value is expected");
+
+ return null;
+ }
+
+ return c;
+ }
+
public virtual void EncodeAttributeValue (IMemberContext rc, AttributeEncoder enc, TypeSpec targetType)
{
rc.Module.Compiler.Report.Error (182, loc,
public static Expression Create (Expression child, TypeSpec type)
{
Constant c = child as Constant;
- if (c != null)
- return new EmptyConstantCast (c, type);
+ if (c != null) {
+ var enum_constant = c as EnumConstant;
+ if (enum_constant != null)
+ c = enum_constant.Child;
+
+ if (!(c is ReducedExpression.ReducedConstantExpression)) {
+ if (c.Type == type)
+ return c;
+
+ var res = c.ConvertImplicitly (type);
+ if (res != null)
+ return res;
+ }
+ }
EmptyCast e = child as EmptyCast;
if (e != null)
public override void Emit (EmitContext ec)
{
base.Emit (ec);
+ Emit (ec, mode);
+ }
+ public static void Emit (EmitContext ec, Mode mode)
+ {
if (ec.HasSet (EmitContext.Options.CheckedScope)) {
switch (mode){
case Mode.I1_U1: ec.Emit (OpCodes.Conv_Ovf_U1); break;
//
public class ReducedExpression : Expression
{
- sealed class ReducedConstantExpression : EmptyConstantCast
+ public sealed class ReducedConstantExpression : EmptyConstantCast
{
readonly Expression orig_expr;
// is used as argument or delegate conversion
//
if (!Convert.ImplicitConversionExists (ec, argument.Expr, parameter)) {
- return 2;
+ return parameter.IsDelegate && argument.Expr is AnonymousMethodExpression ? 2 : 3;
}
}
{
protected readonly TypeSpec left;
protected readonly TypeSpec right;
+ protected readonly TypeSpec left_unwrap;
+ protected readonly TypeSpec right_unwrap;
public readonly Operator OperatorsMask;
public TypeSpec ReturnType;
if ((op_mask & Operator.ValuesOnlyMask) != 0)
throw new InternalErrorException ("Only masked values can be used");
+ if ((op_mask & Operator.NullableMask) != 0) {
+ left_unwrap = Nullable.NullableInfo.GetUnderlyingType (ltype);
+ right_unwrap = Nullable.NullableInfo.GetUnderlyingType (rtype);
+ } else {
+ left_unwrap = ltype;
+ right_unwrap = rtype;
+ }
+
this.left = ltype;
this.right = rtype;
this.OperatorsMask = op_mask;
this.ReturnType = return_type;
}
- public virtual Expression ConvertResult (ResolveContext ec, Binary b)
+ public bool IsLifted {
+ get {
+ return (OperatorsMask & Operator.NullableMask) != 0;
+ }
+ }
+
+ public virtual Expression ConvertResult (ResolveContext rc, Binary b)
{
+ Constant c;
+
+ var left_expr = b.left;
+ var right_expr = b.right;
+
b.type = ReturnType;
- b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
- b.right = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
+ if (IsLifted) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+ }
+
+ if (right_expr.IsNull) {
+ if ((b.oper & Operator.EqualityMask) != 0) {
+ if (!left_expr.Type.IsNullableType && left_expr.Type == left_unwrap)
+ return b.CreateLiftedValueTypeResult (rc, left_unwrap);
+ } else if ((b.oper & Operator.BitwiseMask) != 0) {
+ if (left_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+ } else {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+ return b.CreateLiftedValueTypeResult (rc, left);
+ }
+ } else if (left_expr.IsNull) {
+ if ((b.oper & Operator.EqualityMask) != 0) {
+ if (!right_expr.Type.IsNullableType && right_expr.Type == right_unwrap)
+ return b.CreateLiftedValueTypeResult (rc, right_unwrap);
+ } else if ((b.oper & Operator.BitwiseMask) != 0) {
+ if (right_unwrap.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+ } else {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ if ((b.Oper & (Operator.ArithmeticMask | Operator.ShiftMask)) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, b);
+
+ return b.CreateLiftedValueTypeResult (rc, right);
+ }
+ }
+ }
//
// A user operators does not support multiple user conversions, but decimal type
// is considered to be predefined type therefore we apply predefined operators rules
// and then look for decimal user-operator implementation
//
- if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal)
- return b.ResolveUserOperator (ec, b.left, b.right);
+ if (left.BuiltinType == BuiltinTypeSpec.Type.Decimal) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
+ return b.ResolveUserOperator (rc, b.left, b.right);
+ }
- var c = b.right as Constant;
+ c = right_expr as Constant;
if (c != null) {
- if (c.IsDefaultValue && (b.oper == Operator.Addition || b.oper == Operator.Subtraction || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
- return ReducedExpression.Create (b.left, b).Resolve (ec);
+ if (c.IsDefaultValue) {
+ //
+ // Optimizes
+ //
+ // (expr + 0) to expr
+ // (expr - 0) to expr
+ // (bool? | false) to bool?
+ //
+ if (b.oper == Operator.Addition || b.oper == Operator.Subtraction ||
+ (b.oper == Operator.BitwiseOr && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+ }
+ } else {
+ //
+ // Optimizes
+ //
+ // (bool? & true) to bool?
+ //
+ if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+ }
+ }
+
if ((b.oper == Operator.Multiply || b.oper == Operator.Division) && c.IsOneInteger)
- return ReducedExpression.Create (b.left, b).Resolve (ec);
- return b;
+ return ReducedExpression.Create (b.left, b).Resolve (rc);
+
+ if ((b.oper & Operator.ShiftMask) != 0 && c is IntConstant) {
+ b.right = new IntConstant (rc.BuiltinTypes, ((IntConstant) c).Value & GetShiftMask (left_unwrap), b.right.Location);
+ }
}
c = b.left as Constant;
if (c != null) {
- if (c.IsDefaultValue && (b.oper == Operator.Addition || (b.oper == Operator.BitwiseOr && !(b is Nullable.LiftedBinaryOperator))))
- return ReducedExpression.Create (b.right, b).Resolve (ec);
+ if (c.IsDefaultValue) {
+ //
+ // Optimizes
+ //
+ // (0 + expr) to expr
+ // (false | bool?) to bool?
+ //
+ if (b.oper == Operator.Addition ||
+ (b.oper == Operator.BitwiseOr && right_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && c is BoolConstant)) {
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+ } else {
+ //
+ // Optimizes
+ //
+ // (true & bool?) to bool?
+ //
+ if (IsLifted && left_unwrap.BuiltinType == BuiltinTypeSpec.Type.Bool && b.oper == Operator.BitwiseAnd) {
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+ }
+
if (b.oper == Operator.Multiply && c.IsOneInteger)
- return ReducedExpression.Create (b.right, b).Resolve (ec);
- return b;
+ return ReducedExpression.Create (b.right, b).Resolve (rc);
+ }
+
+ if (IsLifted) {
+ var lifted = new Nullable.LiftedBinaryOperator (b);
+
+ TypeSpec ltype, rtype;
+ if (b.left.Type.IsNullableType) {
+ lifted.UnwrapLeft = new Nullable.Unwrap (b.left);
+ ltype = left_unwrap;
+ } else {
+ ltype = left;
+ }
+
+ if (b.right.Type.IsNullableType) {
+ lifted.UnwrapRight = new Nullable.Unwrap (b.right);
+ rtype = right_unwrap;
+ } else {
+ rtype = right;
+ }
+
+ lifted.Left = b.left.IsNull ?
+ b.left :
+ Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? b.left, ltype, b.left.Location);
+
+ lifted.Right = b.right.IsNull ?
+ b.right :
+ Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? b.right, rtype, b.right.Location);
+
+ return lifted.Resolve (rc);
}
+ b.left = Convert.ImplicitConversion (rc, b.left, left, b.left.Location);
+ b.right = Convert.ImplicitConversion (rc, b.right, right, b.right.Location);
+
return b;
}
public PredefinedOperator ResolveBetterOperator (ResolveContext ec, PredefinedOperator best_operator)
{
+ if ((OperatorsMask & Operator.DecomposedMask) != 0)
+ return best_operator;
+
+ if ((best_operator.OperatorsMask & Operator.DecomposedMask) != 0)
+ return this;
+
int result = 0;
if (left != null && best_operator.left != null) {
- result = OverloadResolver.BetterTypeConversion (ec, best_operator.left, left);
+ result = OverloadResolver.BetterTypeConversion (ec, best_operator.left_unwrap, left_unwrap);
}
//
// When second argument is same as the first one, the result is same
//
if (right != null && (left != right || best_operator.left != best_operator.right)) {
- result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right, right);
+ result |= OverloadResolver.BetterTypeConversion (ec, best_operator.right_unwrap, right_unwrap);
}
if (result == 0 || result > 2)
}
}
- sealed class PredefinedShiftOperator : PredefinedOperator
- {
- public PredefinedShiftOperator (TypeSpec ltype, TypeSpec rtype, Operator op_mask)
- : base (ltype, rtype, op_mask)
- {
- }
-
- public override Expression ConvertResult (ResolveContext ec, Binary b)
- {
- b.left = Convert.ImplicitConversion (ec, b.left, left, b.left.Location);
-
- Expression expr_tree_expr = Convert.ImplicitConversion (ec, b.right, right, b.right.Location);
-
- int right_mask = left.BuiltinType == BuiltinTypeSpec.Type.Int || left.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
-
- //
- // b = b.left >> b.right & (0x1f|0x3f)
- //
- b.right = new Binary (Operator.BitwiseAnd,
- b.right, new IntConstant (ec.BuiltinTypes, right_mask, b.right.Location)).Resolve (ec);
-
- //
- // Expression tree representation does not use & mask
- //
- b.right = ReducedExpression.Create (b.right, expr_tree_expr).Resolve (ec);
- b.type = ReturnType;
-
- //
- // Optimize shift by 0
- //
- var c = b.right as Constant;
- if (c != null && c.IsDefaultValue)
- return ReducedExpression.Create (b.left, b).Resolve (ec);
-
- return b;
- }
- }
-
sealed class PredefinedEqualityOperator : PredefinedOperator
{
MethodSpec equal_method, inequal_method;
LogicalMask = 1 << 10,
AdditionMask = 1 << 11,
SubtractionMask = 1 << 12,
- RelationalMask = 1 << 13
+ RelationalMask = 1 << 13,
+
+ DecomposedMask = 1 << 19,
+ NullableMask = 1 << 20,
}
- protected enum State
+ enum State : byte
{
None = 0,
Compound = 1 << 1,
- LeftNullLifted = 1 << 2,
- RightNullLifted = 1 << 3
}
readonly Operator oper;
- protected Expression left, right;
- protected State state;
- Expression enum_conversion;
+ Expression left, right;
+ State state;
+ ConvCast.Mode enum_conversion;
public Binary (Operator oper, Expression left, Expression right, bool isCompound)
: this (oper, left, right)
oper, l, r);
}
- protected void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
+ void Error_OperatorCannotBeApplied (ResolveContext ec, Expression left, Expression right)
{
Error_OperatorCannotBeApplied (ec, left, right, OperName (oper), loc);
}
return left.ContainsEmitWithAwait () || right.ContainsEmitWithAwait ();
}
- public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l)
+ public static void EmitOperatorOpcode (EmitContext ec, Operator oper, TypeSpec l, Expression right)
{
OpCode opcode;
break;
case Operator.RightShift:
+ if (!(right is IntConstant)) {
+ ec.EmitInt (GetShiftMask (l));
+ ec.Emit (OpCodes.And);
+ }
+
if (IsUnsigned (l))
opcode = OpCodes.Shr_Un;
else
break;
case Operator.LeftShift:
+ if (!(right is IntConstant)) {
+ ec.EmitInt (GetShiftMask (l));
+ ec.Emit (OpCodes.And);
+ }
+
opcode = OpCodes.Shl;
break;
ec.Emit (opcode);
}
+ static int GetShiftMask (TypeSpec type)
+ {
+ return type.BuiltinType == BuiltinTypeSpec.Type.Int || type.BuiltinType == BuiltinTypeSpec.Type.UInt ? 0x1f : 0x3f;
+ }
+
static bool IsUnsigned (TypeSpec t)
{
switch (t.BuiltinType) {
return t.BuiltinType == BuiltinTypeSpec.Type.Float || t.BuiltinType == BuiltinTypeSpec.Type.Double;
}
- Expression ResolveOperator (ResolveContext ec)
+ public Expression ResolveOperator (ResolveContext rc)
{
+ eclass = ExprClass.Value;
+
TypeSpec l = left.Type;
TypeSpec r = right.Type;
Expression expr;
//
// Handles predefined primitive types
//
- if (BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r)) {
+ if ((BuiltinTypeSpec.IsPrimitiveType (l) || (l.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (l)))) &&
+ (BuiltinTypeSpec.IsPrimitiveType (r) || (r.IsNullableType && BuiltinTypeSpec.IsPrimitiveType (Nullable.NullableInfo.GetUnderlyingType (r))))) {
if ((oper & Operator.ShiftMask) == 0) {
- if (l.BuiltinType != BuiltinTypeSpec.Type.Bool && !DoBinaryOperatorPromotion (ec))
+ if (!DoBinaryOperatorPromotion (rc))
return null;
- primitives_only = true;
+ primitives_only = BuiltinTypeSpec.IsPrimitiveType (l) && BuiltinTypeSpec.IsPrimitiveType (r);
}
} else {
// Pointers
if (l.IsPointer || r.IsPointer)
- return ResolveOperatorPointer (ec, l, r);
+ return ResolveOperatorPointer (rc, l, r);
- // Enums
bool lenum = l.IsEnum;
bool renum = r.IsEnum;
- if (lenum || renum) {
- expr = ResolveOperatorEnum (ec, lenum, renum, l, r);
+ if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
+ //
+ // Enumerations
+ //
+ if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+ expr = ResolveSingleEnumOperators (rc, lenum, renum, l, r);
- if (expr != null)
- return expr;
- }
+ if (expr == null)
+ return null;
- // Delegates
- if ((oper == Operator.Addition || oper == Operator.Subtraction) && (l.IsDelegate || r.IsDelegate)) {
-
- expr = ResolveOperatorDelegate (ec, l, r);
+ if ((oper & Operator.BitwiseMask) != 0) {
+ expr = EmptyCast.Create (expr, type);
+ AddEnumResultCast (type);
+
+ if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) {
+ expr = OptimizeAndOperation (expr);
+ }
+ }
- // TODO: Can this be ambiguous
- if (expr != null)
+ left = ConvertEnumOperandToUnderlyingType (rc, left);
+ right = ConvertEnumOperandToUnderlyingType (rc, right);
return expr;
+ }
+ } else if ((oper == Operator.Addition || oper == Operator.Subtraction)) {
+ if (IsEnumOrNullableEnum (l) || IsEnumOrNullableEnum (r)) {
+ //
+ // Enumerations
+ //
+ expr = ResolveEnumOperators (rc, lenum, renum, l, r);
+
+ //
+ // We cannot break here there is also Enum + String possible match
+ // which is not ambiguous with predefined enum operators
+ //
+ if (expr != null) {
+ left = ConvertEnumOperandToUnderlyingType (rc, left);
+ right = ConvertEnumOperandToUnderlyingType (rc, right);
+
+ return expr;
+ }
+ } else if (l.IsDelegate || r.IsDelegate) {
+ //
+ // Delegates
+ //
+ expr = ResolveOperatorDelegate (rc, l, r);
+
+ // TODO: Can this be ambiguous
+ if (expr != null)
+ return expr;
+ }
}
// User operators
- expr = ResolveUserOperator (ec, left, right);
+ expr = ResolveUserOperator (rc, left, right);
if (expr != null)
return expr;
-
- // Predefined reference types equality
- if ((oper & Operator.EqualityMask) != 0) {
- expr = ResolveOperatorEquality (ec, l, r);
- if (expr != null)
- return expr;
- }
}
+
+ //
+ // Equality operators are more complicated
+ //
+ if ((oper & Operator.EqualityMask) != 0) {
+ return ResolveEquality (rc, l, r, primitives_only);
+ }
+
+ expr = ResolveOperatorPredefined (rc, rc.BuiltinTypes.OperatorsBinaryStandard, primitives_only);
+ if (expr != null)
+ return expr;
+
+ if (primitives_only)
+ return null;
+
+ //
+ // Lifted operators have lower priority
+ //
+ return ResolveOperatorPredefined (rc, rc.Module.OperatorsBinaryLifted, false);
+ }
- return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, primitives_only, null);
+ static bool IsEnumOrNullableEnum (TypeSpec type)
+ {
+ return type.IsEnum || (type.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (type).IsEnum);
}
+
// at least one of 'left' or 'right' is an enumeration constant (EnumConstant or SideEffectConstant or ...)
// if 'left' is not an enumeration constant, create one from the type of 'right'
Constant EnumLiftUp (ResolveContext ec, Constant left, Constant right, Location loc)
public static PredefinedOperator[] CreateStandardOperatorsTable (BuiltinTypes types)
{
TypeSpec bool_type = types.Bool;
- return new PredefinedOperator[] {
- new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask),
+
+ return new [] {
+ new PredefinedOperator (types.Int, Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
new PredefinedOperator (types.UInt, Operator.ArithmeticMask | Operator.BitwiseMask),
new PredefinedOperator (types.Long, Operator.ArithmeticMask | Operator.BitwiseMask),
new PredefinedOperator (types.ULong, Operator.ArithmeticMask | Operator.BitwiseMask),
new PredefinedOperator (types.Decimal, Operator.ComparisonMask, bool_type),
new PredefinedStringOperator (types.String, Operator.AdditionMask, types.String),
- new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
- new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+ // Remaining string operators are in lifted tables
new PredefinedOperator (bool_type, Operator.BitwiseMask | Operator.LogicalMask | Operator.EqualityMask, bool_type),
- new PredefinedShiftOperator (types.Int, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.UInt, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.Long, types.Int, Operator.ShiftMask),
- new PredefinedShiftOperator (types.ULong, types.Int, Operator.ShiftMask)
+ new PredefinedOperator (types.UInt, types.Int, Operator.ShiftMask),
+ new PredefinedOperator (types.Long, types.Int, Operator.ShiftMask),
+ new PredefinedOperator (types.ULong, types.Int, Operator.ShiftMask)
+ };
+
+ }
+ public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module)
+ {
+ var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable == null)
+ return new PredefinedOperator [0];
+
+ var types = module.Compiler.BuiltinTypes;
+ var bool_type = types.Bool;
+
+ var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type });
+ var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+ var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+ var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+ var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+ var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+ var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+ var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+ return new[] {
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ArithmeticMask | Operator.BitwiseMask),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ArithmeticMask),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ArithmeticMask),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ArithmeticMask),
+
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.ComparisonMask, bool_type),
+
+ new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.BitwiseMask, nullable_bool),
+
+ new PredefinedOperator (nullable_uint, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_long, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+ new PredefinedOperator (nullable_ulong, nullable_int, Operator.NullableMask | Operator.ShiftMask),
+
+ //
+ // Not strictly lifted but need to be in second group otherwise expressions like
+ // int + null would resolve to +(object, string) instead of +(int?, int?)
+ //
+ new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
+ new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+
};
}
{
TypeSpec bool_type = types.Bool;
- return new PredefinedOperator[] {
+ return new[] {
new PredefinedEqualityOperator (types.String, bool_type),
new PredefinedEqualityOperator (types.Delegate, bool_type),
- new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type)
+ new PredefinedOperator (bool_type, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Int, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.UInt, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Long, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.ULong, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Float, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Double, Operator.EqualityMask, bool_type),
+ new PredefinedOperator (types.Decimal, Operator.EqualityMask, bool_type),
+ };
+ }
+
+ public static PredefinedOperator[] CreateEqualityLiftedOperatorsTable (ModuleContainer module)
+ {
+ var nullable = module.PredefinedTypes.Nullable.TypeSpec;
+
+ if (nullable == null)
+ return new PredefinedOperator [0];
+
+ var types = module.Compiler.BuiltinTypes;
+ var bool_type = types.Bool;
+ var nullable_bool = nullable.MakeGenericType (module, new [] { bool_type });
+ var nullable_int = nullable.MakeGenericType (module, new[] { types.Int });
+ var nullable_uint = nullable.MakeGenericType (module, new[] { types.UInt });
+ var nullable_long = nullable.MakeGenericType (module, new[] { types.Long });
+ var nullable_ulong = nullable.MakeGenericType (module, new[] { types.ULong });
+ var nullable_float = nullable.MakeGenericType (module, new[] { types.Float });
+ var nullable_double = nullable.MakeGenericType (module, new[] { types.Double });
+ var nullable_decimal = nullable.MakeGenericType (module, new[] { types.Decimal });
+
+ return new [] {
+ new PredefinedOperator (nullable_bool, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_int, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_uint, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_long, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_ulong, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_float, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_double, Operator.NullableMask | Operator.EqualityMask, bool_type),
+ new PredefinedOperator (nullable_decimal, Operator.NullableMask | Operator.EqualityMask, bool_type)
};
}
//
- // Rules used during binary numeric promotion
+ // 7.2.6.2 Binary numeric promotions
//
- static bool DoNumericPromotion (ResolveContext rc, ref Expression prim_expr, ref Expression second_expr, TypeSpec type)
+ bool DoBinaryOperatorPromotion (ResolveContext rc)
{
- Expression temp;
+ TypeSpec ltype = left.Type;
+ if (ltype.IsNullableType) {
+ ltype = Nullable.NullableInfo.GetUnderlyingType (ltype);
+ }
- Constant c = prim_expr as Constant;
- if (c != null) {
- temp = c.ConvertImplicitly (type);
- if (temp != null) {
- prim_expr = temp;
- return true;
- }
+ //
+ // This is numeric promotion code only
+ //
+ if (ltype.BuiltinType == BuiltinTypeSpec.Type.Bool)
+ return true;
+
+ TypeSpec rtype = right.Type;
+ if (rtype.IsNullableType) {
+ rtype = Nullable.NullableInfo.GetUnderlyingType (rtype);
}
- if (type.BuiltinType == BuiltinTypeSpec.Type.UInt) {
- switch (prim_expr.Type.BuiltinType) {
- case BuiltinTypeSpec.Type.Int:
- case BuiltinTypeSpec.Type.Short:
- case BuiltinTypeSpec.Type.SByte:
- case BuiltinTypeSpec.Type.Long:
- type = rc.BuiltinTypes.Long;
+ var lb = ltype.BuiltinType;
+ var rb = rtype.BuiltinType;
+ TypeSpec type;
+ Expression expr;
- if (type != second_expr.Type) {
- c = second_expr as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (type);
- else
- temp = Convert.ImplicitNumericConversion (second_expr, type);
- if (temp == null)
- return false;
- second_expr = temp;
- }
- break;
+ if (lb == BuiltinTypeSpec.Type.Decimal || rb == BuiltinTypeSpec.Type.Decimal) {
+ type = rc.BuiltinTypes.Decimal;
+ } else if (lb == BuiltinTypeSpec.Type.Double || rb == BuiltinTypeSpec.Type.Double) {
+ type = rc.BuiltinTypes.Double;
+ } else if (lb == BuiltinTypeSpec.Type.Float || rb == BuiltinTypeSpec.Type.Float) {
+ type = rc.BuiltinTypes.Float;
+ } else if (lb == BuiltinTypeSpec.Type.ULong || rb == BuiltinTypeSpec.Type.ULong) {
+ type = rc.BuiltinTypes.ULong;
+
+ if (IsSignedType (lb)) {
+ expr = ConvertSignedConstant (left, type);
+ if (expr == null)
+ return false;
+ left = expr;
+ } else if (IsSignedType (rb)) {
+ expr = ConvertSignedConstant (right, type);
+ if (expr == null)
+ return false;
+ right = expr;
}
- } else if (type.BuiltinType == BuiltinTypeSpec.Type.ULong) {
- //
- // A compile-time error occurs if the other operand is of type sbyte, short, int, or long
- //
- switch (type.BuiltinType) {
- case BuiltinTypeSpec.Type.Int:
- case BuiltinTypeSpec.Type.Long:
- case BuiltinTypeSpec.Type.Short:
- case BuiltinTypeSpec.Type.SByte:
- return false;
+
+ } else if (lb == BuiltinTypeSpec.Type.Long || rb == BuiltinTypeSpec.Type.Long) {
+ type = rc.BuiltinTypes.Long;
+ } else if (lb == BuiltinTypeSpec.Type.UInt || rb == BuiltinTypeSpec.Type.UInt) {
+ type = rc.BuiltinTypes.UInt;
+
+ if (IsSignedType (lb)) {
+ expr = ConvertSignedConstant (left, type);
+ if (expr == null)
+ type = rc.BuiltinTypes.Long;
+ } else if (IsSignedType (rb)) {
+ expr = ConvertSignedConstant (right, type);
+ if (expr == null)
+ type = rc.BuiltinTypes.Long;
}
+ } else {
+ type = rc.BuiltinTypes.Int;
}
- temp = Convert.ImplicitNumericConversion (prim_expr, type);
- if (temp == null)
- return false;
-
- prim_expr = temp;
- return true;
- }
+ if (ltype != type) {
+ expr = PromoteExpression (rc, left, type);
+ if (expr == null)
+ return false;
- //
- // 7.2.6.2 Binary numeric promotions
- //
- public bool DoBinaryOperatorPromotion (ResolveContext ec)
- {
- TypeSpec ltype = left.Type;
- TypeSpec rtype = right.Type;
- Expression temp;
+ left = expr;
+ }
- foreach (TypeSpec t in ec.BuiltinTypes.BinaryPromotionsTypes) {
- if (t == ltype)
- return t == rtype || DoNumericPromotion (ec, ref right, ref left, t);
+ if (rtype != type) {
+ expr = PromoteExpression (rc, right, type);
+ if (expr == null)
+ return false;
- if (t == rtype)
- return t == ltype || DoNumericPromotion (ec, ref left, ref right, t);
+ right = expr;
}
- TypeSpec int32 = ec.BuiltinTypes.Int;
- if (ltype != int32) {
- Constant c = left as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (int32);
- else
- temp = Convert.ImplicitNumericConversion (left, int32);
+ return true;
+ }
- if (temp == null)
- return false;
- left = temp;
+ static bool IsSignedType (BuiltinTypeSpec.Type type)
+ {
+ switch (type) {
+ case BuiltinTypeSpec.Type.Int:
+ case BuiltinTypeSpec.Type.Short:
+ case BuiltinTypeSpec.Type.SByte:
+ case BuiltinTypeSpec.Type.Long:
+ return true;
+ default:
+ return false;
}
+ }
- if (rtype != int32) {
- Constant c = right as Constant;
- if (c != null)
- temp = c.ConvertImplicitly (int32);
- else
- temp = Convert.ImplicitNumericConversion (right, int32);
+ static Expression ConvertSignedConstant (Expression expr, TypeSpec type)
+ {
+ var c = expr as Constant;
+ if (c == null)
+ return null;
- if (temp == null)
- return false;
- right = temp;
+ return c.ConvertImplicitly (type);
+ }
+
+ static Expression PromoteExpression (ResolveContext rc, Expression expr, TypeSpec type)
+ {
+ if (expr.Type.IsNullableType) {
+ return Convert.ImplicitConversionStandard (rc, expr,
+ rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc, new[] { type }), expr.Location);
}
- return true;
+ var c = expr as Constant;
+ if (c != null)
+ return c.ConvertImplicitly (type);
+
+ return Convert.ImplicitNumericConversion (expr, type);
}
protected override Expression DoResolve (ResolveContext ec)
if (right == null)
return null;
- eclass = ExprClass.Value;
Constant rc = right as Constant;
// The conversion rules are ignored in enum context but why
return new DynamicExpressionStatement (this, args, loc).Resolve (ec);
}
- if (ec.Module.Compiler.Settings.Version >= LanguageVersion.ISO_2 &&
- ((left.Type.IsNullableType && (right is NullLiteral || right.Type.IsNullableType || TypeSpec.IsValueType (right.Type))) ||
- (TypeSpec.IsValueType (left.Type) && right is NullLiteral) ||
- (right.Type.IsNullableType && (left is NullLiteral || left.Type.IsNullableType || TypeSpec.IsValueType (left.Type))) ||
- (TypeSpec.IsValueType (right.Type) && left is NullLiteral))) {
- var lifted = new Nullable.LiftedBinaryOperator (oper, left, right);
- lifted.state = state;
- return lifted.Resolve (ec);
- }
-
return DoResolveCore (ec, left, right);
}
- protected Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
+ Expression DoResolveCore (ResolveContext ec, Expression left_orig, Expression right_orig)
{
Expression expr = ResolveOperator (ec);
if (expr == null)
public override SLE.Expression MakeExpression (BuilderContext ctx)
{
+ return MakeExpression (ctx, left, right);
+ }
+
+ public SLE.Expression MakeExpression (BuilderContext ctx, Expression left, Expression right)
+ {
+ Console.WriteLine ("{0} x {1}", left.Type.GetSignatureForError (), right.Type.GetSignatureForError ());
+
var le = left.MakeExpression (ctx);
var re = right.MakeExpression (ctx);
bool is_checked = ctx.HasSet (BuilderContext.Options.CheckedScope);
if (method == null)
return new EmptyExpression (ec.BuiltinTypes.Decimal);
- MethodGroupExpr mg = MethodGroupExpr.CreatePredefined (method, ec.BuiltinTypes.Delegate, loc);
- Expression expr = new UserOperatorCall (mg.BestCandidate, args, CreateExpressionTree, loc);
+ Expression expr = new UserOperatorCall (method, args, CreateExpressionTree, loc);
return new ClassCast (expr, l);
}
//
- // Enumeration operators
+ // Resolves enumeration operators where only single predefined overload exists, handles lifted versions too
//
- Expression ResolveOperatorEnum (ResolveContext ec, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+ Expression ResolveSingleEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
{
//
// bool operator == (E x, E y);
// E operator | (E x, E y);
// E operator ^ (E x, E y);
//
- // U operator - (E e, E f)
- // E operator - (E e, U x)
- // E operator - (U x, E e) // LAMESPEC: Not covered by the specification
- //
- // E operator + (E e, U x)
- // E operator + (U x, E e)
- //
- Expression ltemp = left;
- Expression rtemp = right;
- TypeSpec underlying_type;
- TypeSpec underlying_type_result;
- TypeSpec res_type;
Expression expr;
-
- //
- // LAMESPEC: There is never ambiguous conversion between enum operators
- // the one which contains more enum parameters always wins even if there
- // is an implicit conversion involved
- //
- if ((oper & (Operator.ComparisonMask | Operator.BitwiseMask)) != 0) {
- if (renum) {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- expr = Convert.ImplicitConversion (ec, left, rtype, loc);
- if (expr == null)
- return null;
-
- left = expr;
- ltype = expr.Type;
- } else if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- expr = Convert.ImplicitConversion (ec, right, ltype, loc);
- if (expr == null)
- return null;
+ if ((oper & Operator.ComparisonMask) != 0) {
+ type = rc.BuiltinTypes.Bool;
+ } else {
+ if (lenum)
+ type = ltype;
+ else if (renum)
+ type = rtype;
+ else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+ type = ltype;
+ else
+ type = rtype;
+ }
+
+ if (ltype == rtype) {
+ if (lenum || renum)
+ return this;
+
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
+ }
+ if (renum && !ltype.IsNullableType) {
+ expr = Convert.ImplicitConversion (rc, left, rtype, loc);
+ if (expr != null) {
+ left = expr;
+ return this;
+ }
+ } else if (lenum && !rtype.IsNullableType) {
+ expr = Convert.ImplicitConversion (rc, right, ltype, loc);
+ if (expr != null) {
right = expr;
- rtype = expr.Type;
- } else {
- return null;
+ return this;
}
+ }
- if ((oper & Operator.BitwiseMask) != 0) {
- res_type = ltype;
- underlying_type_result = underlying_type;
- } else {
- res_type = null;
- underlying_type_result = null;
- }
- } else if (oper == Operator.Subtraction) {
- if (renum) {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- if (ltype != rtype) {
- expr = Convert.ImplicitConversion (ec, left, rtype, left.Location);
- if (expr == null) {
- expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
- if (expr == null)
- return null;
-
- res_type = rtype;
- } else {
- res_type = underlying_type;
- }
+ //
+ // Now try lifted version of predefined operator
+ //
+ var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable_type != null) {
+ if (renum && !ltype.IsNullableType) {
+ var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { rtype });
+ expr = Convert.ImplicitConversion (rc, left, lifted_type, loc);
+ if (expr != null) {
left = expr;
- } else {
- res_type = underlying_type;
+ right = Convert.ImplicitConversion (rc, right, lifted_type, loc);
}
- underlying_type_result = underlying_type;
- } else if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- expr = Convert.ImplicitConversion (ec, right, ltype, right.Location);
- if (expr == null || expr is EnumConstant) {
- expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
- if (expr == null)
- return null;
+ if ((oper & Operator.BitwiseMask) != 0)
+ type = lifted_type;
- res_type = ltype;
- } else {
- res_type = underlying_type;
+ if (left.IsNull) {
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ return CreateLiftedValueTypeResult (rc, rtype);
}
- right = expr;
- underlying_type_result = underlying_type;
- } else {
- return null;
- }
- } else if (oper == Operator.Addition) {
- if (lenum) {
- underlying_type = EnumSpec.GetUnderlyingType (ltype);
- res_type = ltype;
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = expr;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
+ }
+ } else if (lenum && !rtype.IsNullableType) {
+ var lifted_type = nullable_type.MakeGenericType (rc.Module, new[] { ltype });
+
+ expr = Convert.ImplicitConversion (rc, right, lifted_type, loc);
+ if (expr != null) {
+ right = expr;
+ left = Convert.ImplicitConversion (rc, left, lifted_type, loc);
+ }
+
+ if ((oper & Operator.BitwiseMask) != 0)
+ type = lifted_type;
+
+ if (right.IsNull) {
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
- if (rtype != underlying_type && (state & (State.RightNullLifted | State.LeftNullLifted)) == 0) {
- expr = Convert.ImplicitConversion (ec, right, underlying_type, right.Location);
+ return CreateLiftedValueTypeResult (rc, ltype);
+ }
+
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = expr;
+ return lifted.Resolve (rc);
+ }
+ } else if (rtype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (rtype).IsEnum) {
+ if (left.IsNull) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+ left = Convert.ImplicitConversion (rc, left, rtype, left.Location);
+
+ if ((oper & Operator.RelationalMask) != 0)
+ return CreateLiftedValueTypeResult (rc, rtype);
+
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ // Equality operators are valid between E? and null
+ expr = left;
+ } else {
+ expr = Convert.ImplicitConversion (rc, left, Nullable.NullableInfo.GetUnderlyingType (rtype), loc);
if (expr == null)
return null;
+ }
- right = expr;
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = expr;
+ lifted.Right = right;
+ return lifted.Resolve (rc);
}
- } else {
- underlying_type = EnumSpec.GetUnderlyingType (rtype);
- res_type = rtype;
- if (ltype != underlying_type) {
- expr = Convert.ImplicitConversion (ec, left, underlying_type, left.Location);
+ } else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum) {
+ if (right.IsNull) {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
+ right = Convert.ImplicitConversion (rc, right, ltype, right.Location);
+
+ if ((oper & Operator.RelationalMask) != 0)
+ return CreateLiftedValueTypeResult (rc, ltype);
+
+ if ((oper & Operator.BitwiseMask) != 0)
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+
+ // Equality operators are valid between E? and null
+ expr = right;
+ } else {
+ expr = Convert.ImplicitConversion (rc, right, Nullable.NullableInfo.GetUnderlyingType (ltype), loc);
if (expr == null)
return null;
+ }
- left = expr;
+ if (expr != null) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = expr;
+ return lifted.Resolve (rc);
}
}
-
- underlying_type_result = underlying_type;
- } else {
- return null;
}
- // Unwrap the constant correctly, so DoBinaryOperatorPromotion can do the magic
- // with constants and expressions
- if (left.Type != underlying_type) {
- if (left is Constant)
- left = ((Constant) left).ConvertExplicitly (false, underlying_type);
+ return null;
+ }
+
+ static Expression ConvertEnumOperandToUnderlyingType (ResolveContext rc, Expression expr)
+ {
+ TypeSpec underlying_type;
+ if (expr.Type.IsNullableType) {
+ var nt = Nullable.NullableInfo.GetUnderlyingType (expr.Type);
+ if (nt.IsEnum)
+ underlying_type = EnumSpec.GetUnderlyingType (nt);
else
- left = EmptyCast.Create (left, underlying_type);
+ underlying_type = nt;
+ } else if (expr.Type.IsEnum) {
+ underlying_type = EnumSpec.GetUnderlyingType (expr.Type);
+ } else {
+ underlying_type = expr.Type;
}
- if (right.Type != underlying_type) {
- if (right is Constant)
- right = ((Constant) right).ConvertExplicitly (false, underlying_type);
- else
- right = EmptyCast.Create (right, underlying_type);
+ switch (underlying_type.BuiltinType) {
+ case BuiltinTypeSpec.Type.SByte:
+ case BuiltinTypeSpec.Type.Byte:
+ case BuiltinTypeSpec.Type.Short:
+ case BuiltinTypeSpec.Type.UShort:
+ underlying_type = rc.BuiltinTypes.Int;
+ break;
}
+ if (expr.Type.IsNullableType)
+ underlying_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { underlying_type });
+
+ if (expr.Type == underlying_type)
+ return expr;
+
+ return EmptyCast.Create (expr, underlying_type);
+ }
+
+ Expression ResolveEnumOperators (ResolveContext rc, bool lenum, bool renum, TypeSpec ltype, TypeSpec rtype)
+ {
+ //
+ // U operator - (E e, E f)
+ // E operator - (E e, U x) // Internal decomposition operator
+ // E operator - (U x, E e) // Internal decomposition operator
//
- // C# specification uses explicit cast syntax which means binary promotion
- // should happen, however it seems that csc does not do that
+ // E operator + (E e, U x)
+ // E operator + (U x, E e)
//
- if (!DoBinaryOperatorPromotion (ec)) {
- left = ltemp;
- right = rtemp;
- return null;
+
+ TypeSpec enum_type;
+
+ if (lenum)
+ enum_type = ltype;
+ else if (renum)
+ enum_type = rtype;
+ else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum)
+ enum_type = ltype;
+ else
+ enum_type = rtype;
+
+ Expression expr;
+ if (!enum_type.IsNullableType) {
+ expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, false), false);
+ if (expr != null) {
+ if (oper == Operator.Subtraction)
+ expr = ConvertEnumSubtractionResult (rc, expr);
+ else
+ expr = ConvertEnumAdditionalResult (expr, enum_type);
+
+ AddEnumResultCast (expr.Type);
+
+ return expr;
+ }
+
+ enum_type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { enum_type });
}
- if (underlying_type_result != null && left.Type != underlying_type_result) {
- enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (left.Type), underlying_type_result);
+ expr = ResolveOperatorPredefined (rc, rc.Module.GetPredefinedEnumAritmeticOperators (enum_type, true), false);
+ if (expr != null) {
+ if (oper == Operator.Subtraction)
+ expr = ConvertEnumSubtractionResult (rc, expr);
+ else
+ expr = ConvertEnumAdditionalResult (expr, enum_type);
+
+ AddEnumResultCast (expr.Type);
}
- expr = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryStandard, true, res_type);
- if (expr == null)
- return null;
+ return expr;
+ }
- if (!IsCompound)
- return expr;
+ static Expression ConvertEnumAdditionalResult (Expression expr, TypeSpec enumType)
+ {
+ return EmptyCast.Create (expr, enumType);
+ }
+ Expression ConvertEnumSubtractionResult (ResolveContext rc, Expression expr)
+ {
//
- // Section: 7.16.2
+ // Enumeration subtraction has different result type based on
+ // best overload
//
+ TypeSpec result_type;
+ if (left.Type == right.Type) {
+ var c = right as EnumConstant;
+ if (c != null && c.IsZeroInteger) {
+ //
+ // LAMESPEC: This is quite unexpected for expression E - 0 the return type is
+ // E which is not what expressions E - 1 or 0 - E return
+ //
+ result_type = left.Type;
+ } else {
+ result_type = left.Type.IsNullableType ?
+ Nullable.NullableInfo.GetEnumUnderlyingType (rc.Module, left.Type) :
+ EnumSpec.GetUnderlyingType (left.Type);
+ }
+ } else if (IsEnumOrNullableEnum (left.Type)) {
+ result_type = left.Type;
+ } else {
+ result_type = right.Type;
+ }
- //
- // If the return type of the selected operator is implicitly convertible to the type of x
- //
- if (Convert.ImplicitConversionExists (ec, expr, ltype))
- return expr;
+ return EmptyCast.Create (expr, result_type);
+ }
- //
- // Otherwise, if the selected operator is a predefined operator, if the return type of the
- // selected operator is explicitly convertible to the type of x, and if y is implicitly
- // convertible to the type of x or the operator is a shift operator, then the operation
- // is evaluated as x = (T)(x op y), where T is the type of x
- //
- expr = Convert.ExplicitConversion (ec, expr, ltype, loc);
- if (expr == null)
- return null;
+ void AddEnumResultCast (TypeSpec type)
+ {
+ if (type.IsNullableType)
+ type = Nullable.NullableInfo.GetUnderlyingType (type);
- if (Convert.ImplicitConversionExists (ec, ltemp, ltype))
- return expr;
+ if (type.IsEnum)
+ type = EnumSpec.GetUnderlyingType (type);
- return null;
+ switch (type.BuiltinType) {
+ case BuiltinTypeSpec.Type.SByte:
+ enum_conversion = ConvCast.Mode.I4_I1;
+ break;
+ case BuiltinTypeSpec.Type.Byte:
+ enum_conversion = ConvCast.Mode.I4_U1;
+ break;
+ case BuiltinTypeSpec.Type.Short:
+ enum_conversion = ConvCast.Mode.I4_I2;
+ break;
+ case BuiltinTypeSpec.Type.UShort:
+ enum_conversion = ConvCast.Mode.I4_U2;
+ break;
+ }
}
//
- // 7.9.6 Reference type equality operators
+ // Equality operators rules
//
- Expression ResolveOperatorEquality (ResolveContext ec, TypeSpec l, TypeSpec r)
+ Expression ResolveEquality (ResolveContext ec, TypeSpec l, TypeSpec r, bool primitives_only)
{
Expression result;
type = ec.BuiltinTypes.Bool;
+ bool no_arg_conv = false;
- //
- // a, Both operands are reference-type values or the value null
- // b, One operand is a value of type T where T is a type-parameter and
- // the other operand is the value null. Furthermore T does not have the
- // value type constraint
- //
- // LAMESPEC: Very confusing details in the specification, basically any
- // reference like type-parameter is allowed
- //
- var tparam_l = l as TypeParameterSpec;
- var tparam_r = r as TypeParameterSpec;
- if (tparam_l != null) {
- if (right is NullLiteral && !tparam_l.HasSpecialStruct) {
- left = new BoxedCast (left, ec.BuiltinTypes.Object);
- return this;
- }
+ if (!primitives_only) {
- if (!tparam_l.IsReferenceType)
- return null;
+ //
+ // a, Both operands are reference-type values or the value null
+ // b, One operand is a value of type T where T is a type-parameter and
+ // the other operand is the value null. Furthermore T does not have the
+ // value type constraint
+ //
+ // LAMESPEC: Very confusing details in the specification, basically any
+ // reference like type-parameter is allowed
+ //
+ var tparam_l = l as TypeParameterSpec;
+ var tparam_r = r as TypeParameterSpec;
+ if (tparam_l != null) {
+ if (right is NullLiteral) {
+ if (tparam_l.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+ return null;
- l = tparam_l.GetEffectiveBase ();
- left = new BoxedCast (left, l);
- } else if (left is NullLiteral && tparam_r == null) {
- if (!TypeSpec.IsReferenceType (r) || r.Kind == MemberKind.InternalCompilerType)
- return null;
+ left = new BoxedCast (left, ec.BuiltinTypes.Object);
+ return this;
+ }
- return this;
- }
+ if (!tparam_l.IsReferenceType)
+ return null;
- if (tparam_r != null) {
- if (left is NullLiteral && !tparam_r.HasSpecialStruct) {
- right = new BoxedCast (right, ec.BuiltinTypes.Object);
- return this;
+ l = tparam_l.GetEffectiveBase ();
+ left = new BoxedCast (left, l);
+ } else if (left is NullLiteral && tparam_r == null) {
+ if (TypeSpec.IsReferenceType (r))
+ return this;
+
+ if (r.Kind == MemberKind.InternalCompilerType)
+ return null;
}
- if (!tparam_r.IsReferenceType)
- return null;
+ if (tparam_r != null) {
+ if (left is NullLiteral) {
+ if (tparam_r.GetEffectiveBase ().BuiltinType == BuiltinTypeSpec.Type.ValueType)
+ return null;
- r = tparam_r.GetEffectiveBase ();
- right = new BoxedCast (right, r);
- } else if (right is NullLiteral) {
- if (!TypeSpec.IsReferenceType (l) || l.Kind == MemberKind.InternalCompilerType)
- return null;
+ right = new BoxedCast (right, ec.BuiltinTypes.Object);
+ return this;
+ }
- return this;
- }
+ if (!tparam_r.IsReferenceType)
+ return null;
- bool no_arg_conv = false;
+ r = tparam_r.GetEffectiveBase ();
+ right = new BoxedCast (right, r);
+ } else if (right is NullLiteral) {
+ if (TypeSpec.IsReferenceType (l))
+ return this;
- //
- // LAMESPEC: method groups can be compared when they convert to other side delegate
- //
- if (l.IsDelegate) {
- if (right.eclass == ExprClass.MethodGroup) {
- result = Convert.ImplicitConversion (ec, right, l, loc);
+ if (l.Kind == MemberKind.InternalCompilerType)
+ return null;
+ }
+
+ //
+ // LAMESPEC: method groups can be compared when they convert to other side delegate
+ //
+ if (l.IsDelegate) {
+ if (right.eclass == ExprClass.MethodGroup) {
+ result = Convert.ImplicitConversion (ec, right, l, loc);
+ if (result == null)
+ return null;
+
+ right = result;
+ r = l;
+ } else if (r.IsDelegate && l != r) {
+ return null;
+ }
+ } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
+ result = Convert.ImplicitConversionRequired (ec, left, r, loc);
if (result == null)
return null;
- right = result;
- r = l;
- } else if (r.IsDelegate && l != r) {
- return null;
+ left = result;
+ l = r;
+ } else {
+ no_arg_conv = l == r && !l.IsStruct;
}
- } else if (left.eclass == ExprClass.MethodGroup && r.IsDelegate) {
- result = Convert.ImplicitConversionRequired (ec, left, r, loc);
- if (result == null)
- return null;
-
- left = result;
- l = r;
- } else {
- no_arg_conv = l == r && !l.IsStruct;
}
//
// not apply when both operands are of same reference type
//
if (r.BuiltinType != BuiltinTypeSpec.Type.Object && l.BuiltinType != BuiltinTypeSpec.Type.Object) {
- result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv, null);
+ result = ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryEquality, no_arg_conv);
+ if (result != null)
+ return result;
+
+ //
+ // Now try lifted version of predefined operators
+ //
+ result = ResolveOperatorPredefined (ec, ec.Module.OperatorsBinaryEqualityLifted, no_arg_conv);
if (result != null)
return result;
+
+ //
+ // The == and != operators permit one operand to be a value of a nullable
+ // type and the other to be the null literal, even if no predefined or user-defined
+ // operator (in unlifted or lifted form) exists for the operation.
+ //
+ if ((l.IsNullableType && right.IsNull) || (r.IsNullableType && left.IsNull)) {
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.Left = left;
+ lifted.Right = right;
+ return lifted.Resolve (ec);
+ }
}
//
return this;
}
- return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false, null);
+ return ResolveOperatorPredefined (ec, ec.BuiltinTypes.OperatorsBinaryUnsafe, false);
}
//
// Build-in operators method overloading
//
- protected virtual Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
+ Expression ResolveOperatorPredefined (ResolveContext ec, PredefinedOperator [] operators, bool primitives_only)
{
PredefinedOperator best_operator = null;
TypeSpec l = left.Type;
if (best_operator == null)
return null;
- Expression expr = best_operator.ConvertResult (ec, this);
+ var expr = best_operator.ConvertResult (ec, this);
- //
- // Optimize &/&& constant expressions with 0 value
- //
- if (oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) {
- Constant rc = right as Constant;
- Constant lc = left as Constant;
- if (((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) && !(this is Nullable.LiftedBinaryOperator)) {
- //
- // The result is a constant with side-effect
- //
- Constant side_effect = rc == null ?
- new SideEffectConstant (lc, right, loc) :
- new SideEffectConstant (rc, left, loc);
+ if ((oper == Operator.BitwiseAnd || oper == Operator.LogicalAnd) && !best_operator.IsLifted) {
+ expr = OptimizeAndOperation (expr);
+ }
- return ReducedExpression.Create (side_effect, expr);
- }
+ return expr;
+ }
+
+ //
+ // Optimize &/&& constant expressions with 0 value
+ //
+ Expression OptimizeAndOperation (Expression expr)
+ {
+ Constant rc = right as Constant;
+ Constant lc = left as Constant;
+ if ((lc != null && lc.IsDefaultValue) || (rc != null && rc.IsDefaultValue)) {
+ //
+ // The result is a constant with side-effect
+ //
+ Constant side_effect = rc == null ?
+ new SideEffectConstant (lc, right, loc) :
+ new SideEffectConstant (rc, left, loc);
+
+ return ReducedExpression.Create (side_effect, expr);
}
- if (enum_type == null)
- return expr;
+ return expr;
+ }
- //
- // HACK: required by enum_conversion
- //
- expr.Type = enum_type;
- return EmptyCast.Create (expr, enum_type);
+ //
+ // Value types can be compared with the null literal because of the lifting
+ // language rules. However the result is always true or false.
+ //
+ public Expression CreateLiftedValueTypeResult (ResolveContext rc, TypeSpec valueType)
+ {
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ type = rc.BuiltinTypes.Bool;
+ return this;
+ }
+
+ // FIXME: Handle side effect constants
+ Constant c = new BoolConstant (rc.BuiltinTypes, Oper == Operator.Inequality, loc);
+
+ if ((Oper & Operator.EqualityMask) != 0) {
+ rc.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
+ valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+ } else {
+ rc.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
+ valueType.GetSignatureForError (), c.GetValueAsLiteral ());
+ }
+
+ return c;
}
//
// Performs user-operator overloading
//
- protected virtual Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
+ Expression ResolveUserOperator (ResolveContext rc, Expression left, Expression right)
{
+ Expression oper_expr;
+
var op = ConvertBinaryToUserOperator (oper);
var l = left.Type;
if (l.IsNullableType)
Arguments args = new Arguments (2);
Argument larg = new Argument (left);
- args.Add (larg);
+ args.Add (larg);
Argument rarg = new Argument (right);
args.Add (rarg);
left_operators = right_operators;
}
- var res = new OverloadResolver (left_operators, OverloadResolver.Restrictions.ProbingOnly |
- OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded, loc);
+ const OverloadResolver.Restrictions restr = OverloadResolver.Restrictions.ProbingOnly |
+ OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded;
- var oper_method = res.ResolveOperator (ec, ref args);
- if (oper_method == null)
- return null;
+ var res = new OverloadResolver (left_operators, restr, loc);
- var llifted = (state & State.LeftNullLifted) != 0;
- var rlifted = (state & State.RightNullLifted) != 0;
- if ((Oper & Operator.EqualityMask) != 0) {
- var parameters = oper_method.Parameters;
- // LAMESPEC: No idea why this is not allowed
- if ((left is Nullable.Unwrap || right is Nullable.Unwrap) && parameters.Types [0] != parameters.Types [1])
+ var oper_method = res.ResolveOperator (rc, ref args);
+ if (oper_method == null) {
+ //
+ // Logical && and || cannot be lifted
+ //
+ if ((oper & Operator.LogicalMask) != 0)
return null;
- // Binary operation was lifted but we have found a user operator
- // which requires value-type argument, we downgrade ourself back to
- // binary operation
- // LAMESPEC: The user operator is not called (it cannot be we are passing null to struct)
- // but compilation succeeds
- if ((llifted && !parameters.Types[0].IsStruct) || (rlifted && !parameters.Types[1].IsStruct)) {
- state &= ~(State.LeftNullLifted | State.RightNullLifted);
+ //
+ // Apply lifted user operators only for liftable types. Implicit conversion
+ // to nullable types is not allowed
+ //
+ if (!IsLiftedOperatorApplicable ())
+ return null;
+
+ // TODO: Cache the result in module container
+ var lifted_methods = CreateLiftedOperators (rc, left_operators);
+ if (lifted_methods == null)
+ return null;
+
+ res = new OverloadResolver (lifted_methods, restr | OverloadResolver.Restrictions.ProbingOnly, loc);
+
+ oper_method = res.ResolveOperator (rc, ref args);
+ if (oper_method == null)
+ return null;
+
+ MethodSpec best_original = null;
+ foreach (MethodSpec ms in left_operators) {
+ if (ms.MemberDefinition == oper_method.MemberDefinition) {
+ best_original = ms;
+ break;
+ }
+ }
+
+ if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ //
+ // Expression trees use lifted notation in this case
+ //
+ this.left = Convert.ImplicitConversion (rc, left, oper_method.Parameters.Types[0], left.Location);
+ this.right = Convert.ImplicitConversion (rc, right, oper_method.Parameters.Types[1], left.Location);
}
- }
- Expression oper_expr;
+ var ptypes = best_original.Parameters.Types;
+
+ if (left.IsNull || right.IsNull) {
+ //
+ // The lifted operator produces the value false if one or both operands are null for
+ // relational operators.
+ //
+ if ((oper & Operator.ComparisonMask) != 0) {
+ //
+ // CSC BUG: This should be different warning, csc reports CS0458 with bool? which is wrong
+ // because return type is actually bool
+ //
+ // For some reason CSC does not report this warning for equality operators
+ //
+ return CreateLiftedValueTypeResult (rc, left.IsNull ? ptypes [1] : ptypes [0]);
+ }
+
+ // The lifted operator produces a null value if one or both operands are null
+ //
+ if ((oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0) {
+ type = oper_method.ReturnType;
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ }
+ }
+
+ type = oper_method.ReturnType;
+ var lifted = new Nullable.LiftedBinaryOperator (this);
+ lifted.UserOperator = best_original;
+
+ if (left.Type.IsNullableType && !ptypes[0].IsNullableType) {
+ lifted.UnwrapLeft = new Nullable.Unwrap (left);
+ }
+
+ if (right.Type.IsNullableType && !ptypes[1].IsNullableType) {
+ lifted.UnwrapRight = new Nullable.Unwrap (right);
+ }
- // TODO: CreateExpressionTree is allocated every time
+ lifted.Left = Convert.ImplicitConversion (rc, lifted.UnwrapLeft ?? left, ptypes[0], left.Location);
+ lifted.Right = Convert.ImplicitConversion (rc, lifted.UnwrapRight ?? right, ptypes[1], right.Location);
+
+ return lifted.Resolve (rc);
+ }
+
if ((oper & Operator.LogicalMask) != 0) {
+ // TODO: CreateExpressionTree is allocated every time
oper_expr = new ConditionalLogicalOperator (oper_method, args, CreateExpressionTree,
- oper == Operator.LogicalAnd, loc).Resolve (ec);
+ oper == Operator.LogicalAnd, loc).Resolve (rc);
} else {
oper_expr = new UserOperatorCall (oper_method, args, CreateExpressionTree, loc);
}
- if (!llifted)
- this.left = larg.Expr;
-
- if (!rlifted)
- this.right = rarg.Expr;
+ this.left = larg.Expr;
+ this.right = rarg.Expr;
return oper_expr;
}
+ bool IsLiftedOperatorApplicable ()
+ {
+ if (left.Type.IsNullableType) {
+ if ((oper & Operator.EqualityMask) != 0)
+ return !right.IsNull;
+
+ return true;
+ }
+
+ if (right.Type.IsNullableType) {
+ if ((oper & Operator.EqualityMask) != 0)
+ return !left.IsNull;
+
+ return true;
+ }
+
+ if (TypeSpec.IsValueType (left.Type))
+ return right.IsNull;
+
+ if (TypeSpec.IsValueType (right.Type))
+ return left.IsNull;
+
+ return false;
+ }
+
+ List<MemberSpec> CreateLiftedOperators (ResolveContext rc, IList<MemberSpec> operators)
+ {
+ var nullable_type = rc.Module.PredefinedTypes.Nullable.TypeSpec;
+ if (nullable_type == null)
+ return null;
+
+ //
+ // Lifted operators permit predefined and user-defined operators that operate
+ // on non-nullable value types to also be used with nullable forms of those types.
+ // Lifted operators are constructed from predefined and user-defined operators
+ // that meet certain requirements
+ //
+ List<MemberSpec> lifted = null;
+ foreach (MethodSpec oper in operators) {
+ TypeSpec rt;
+ if ((Oper & Operator.ComparisonMask) != 0) {
+ //
+ // Result type must be of type bool for lifted comparison operators
+ //
+ rt = oper.ReturnType;
+ if (rt.BuiltinType != BuiltinTypeSpec.Type.Bool)
+ continue;
+ } else {
+ if (!TypeSpec.IsNonNullableValueType (oper.ReturnType))
+ continue;
+
+ rt = null;
+ }
+
+ var ptypes = oper.Parameters.Types;
+ if (!TypeSpec.IsNonNullableValueType (ptypes [0]) || !TypeSpec.IsNonNullableValueType (ptypes [1]))
+ continue;
+
+ //
+ // LAMESPEC: I am not sure why but for equality operators to be lifted
+ // both types have to match
+ //
+ if ((Oper & Operator.EqualityMask) != 0 && ptypes [0] != ptypes [1])
+ continue;
+
+ if (lifted == null)
+ lifted = new List<MemberSpec> ();
+
+ //
+ // The lifted form is constructed by adding a single ? modifier to each operand and
+ // result type except for comparison operators where return type is bool
+ //
+ if (rt == null)
+ rt = nullable_type.MakeGenericType (rc.Module, new[] { oper.ReturnType });
+
+ var parameters = ParametersCompiled.CreateFullyResolved (
+ nullable_type.MakeGenericType (rc.Module, new [] { ptypes[0] }),
+ nullable_type.MakeGenericType (rc.Module, new [] { ptypes[1] }));
+
+ var lifted_op = new MethodSpec (oper.Kind, oper.DeclaringType, oper.MemberDefinition,
+ rt, parameters, oper.Modifiers);
+
+ lifted.Add (lifted_op);
+ }
+
+ return lifted;
+ }
+
//
// Merge two sets of user operators into one, they are mostly distinguish
// except when they share base type and it contains an operator
}
public override void Emit (EmitContext ec)
- {
- EmitOperator (ec, left.Type);
- }
-
- protected virtual void EmitOperator (EmitContext ec, TypeSpec l)
{
if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
left = left.EmitToField (ec);
}
}
+ EmitOperator (ec, left, right);
+ }
+
+ public void EmitOperator (EmitContext ec, Expression left, Expression right)
+ {
left.Emit (ec);
right.Emit (ec);
- EmitOperatorOpcode (ec, oper, l);
+
+ EmitOperatorOpcode (ec, oper, left.Type, right);
//
- // Nullable enum could require underlying type cast and we cannot simply wrap binary
- // expression because that would wrap lifted binary operation
+ // Emit result enumerable conversion this way because it's quite complicated get it
+ // to resolved tree because expression tree cannot see it.
//
- if (enum_conversion != null)
- enum_conversion.Emit (ec);
+ if (enum_conversion != 0)
+ ConvCast.Emit (ec, enum_conversion);
}
public override void EmitSideEffect (EmitContext ec)
return CreateExpressionTree (ec, null);
}
- Expression CreateExpressionTree (ResolveContext ec, Expression method)
+ public Expression CreateExpressionTree (ResolveContext ec, Expression method)
{
string method_name;
bool lift_arg = false;
if (rtype.BuiltinType == BuiltinTypeSpec.Type.Long || rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
ec.Emit (OpCodes.Conv_I8);
- Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype);
+ Binary.EmitOperatorOpcode (ec, Binary.Operator.Multiply, rtype, right);
}
if (left_const == null) {
else if (rtype.BuiltinType == BuiltinTypeSpec.Type.ULong)
ec.Emit (OpCodes.Conv_U);
- Binary.EmitOperatorOpcode (ec, op, op_type);
+ Binary.EmitOperatorOpcode (ec, op, op_type, right);
}
}
}
// TODO: Should be just Add
GetAssemblyDefinition (assembly);
- var all_types = assembly.GetTypes ();
- ImportTypes (all_types, targetNamespace, true);
-
- all_types = assembly.ManifestModule.__GetExportedTypes ();
- if (all_types.Length != 0)
- ImportForwardedTypes (all_types, targetNamespace);
+ try {
+ var all_types = assembly.GetTypes ();
+ ImportTypes (all_types, targetNamespace, true);
+
+ all_types = assembly.ManifestModule.__GetExportedTypes ();
+ if (all_types.Length != 0)
+ ImportForwardedTypes (all_types, targetNamespace);
+ } catch (Exception e) {
+ throw new InternalErrorException (e, "Failed to import assembly `{0}'", assembly.FullName);
+ }
}
public ImportedModuleDefinition ImportModule (Module module, RootNamespace targetNamespace)
<ItemGroup>\r
<Compile Include="..\build\common\Consts.cs">\r
</Compile>\r
- <Compile Include="..\class\corlib\Mono.Security.Cryptography\CryptoConvert.cs">\r
+ <Compile Include="..\class\Mono.Security\Mono.Security.Cryptography\CryptoConvert.cs">\r
<Link>CryptoConvert.cs</Link>\r
</Compile>\r
<Compile Include="..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs">\r
PredefinedTypes predefined_types;
PredefinedMembers predefined_members;
+ public Binary.PredefinedOperator[] OperatorsBinaryEqualityLifted;
+ public Binary.PredefinedOperator[] OperatorsBinaryLifted;
+
static readonly string[] attribute_targets = new string[] { "assembly", "module" };
public ModuleContainer (CompilerContext context)
return "<module>";
}
+ public Binary.PredefinedOperator[] GetPredefinedEnumAritmeticOperators (TypeSpec enumType, bool nullable)
+ {
+ TypeSpec underlying;
+ Binary.Operator mask = 0;
+
+ if (nullable) {
+ underlying = Nullable.NullableInfo.GetEnumUnderlyingType (this, enumType);
+ mask = Binary.Operator.NullableMask;
+ } else {
+ underlying = EnumSpec.GetUnderlyingType (enumType);
+ }
+
+ var operators = new[] {
+ new Binary.PredefinedOperator (enumType, underlying,
+ mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+ new Binary.PredefinedOperator (underlying, enumType,
+ mask | Binary.Operator.AdditionMask | Binary.Operator.SubtractionMask | Binary.Operator.DecomposedMask, enumType),
+ new Binary.PredefinedOperator (enumType, mask | Binary.Operator.SubtractionMask, underlying)
+ };
+
+ return operators;
+ }
+
public void InitializePredefinedTypes ()
{
predefined_attributes = new PredefinedAttributes (this);
predefined_types = new PredefinedTypes (this);
predefined_members = new PredefinedMembers (this);
+
+ OperatorsBinaryEqualityLifted = Binary.CreateEqualityLiftedOperatorsTable (this);
+ OperatorsBinaryLifted = Binary.CreateStandardLiftedOperatorsTable (this);
}
public override bool IsClsComplianceRequired ()
//
using System;
+using SLE = System.Linq.Expressions;
#if STATIC
using IKVM.Reflection.Emit;
{
return ((InflatedTypeSpec) nullableType).TypeArguments[0];
}
+
+ public static TypeSpec GetEnumUnderlyingType (ModuleContainer module, TypeSpec nullableEnum)
+ {
+ return module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (module,
+ new[] { EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)) });
+ }
}
public class Unwrap : Expression, IMemoryLocation
Expression expr;
LocalTemporary temp;
+ Expression temp_field;
readonly bool useDefaultValue;
- Unwrap (Expression expr, bool useDefaultValue)
+ public Unwrap (Expression expr, bool useDefaultValue = true)
{
this.expr = expr;
this.loc = expr.Location;
return expr.ContainsEmitWithAwait ();
}
+ // TODO: REMOVE
public static Expression Create (Expression expr)
{
//
return Create (expr, false);
}
+ public static Expression CreateUnwrapped (Expression expr)
+ {
+ //
+ // Avoid unwraping and wraping of same type
+ //
+ Wrap wrap = expr as Wrap;
+ if (wrap != null)
+ return wrap.Child;
+
+ return Create (expr, true);
+ }
+
public static Unwrap Create (Expression expr, bool useDefaultValue)
{
return new Unwrap (expr, useDefaultValue);
call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null);
}
+ public override Expression EmitToField (EmitContext ec)
+ {
+ if (temp_field == null)
+ temp_field = this.expr.EmitToField (ec);
+
+ return this;
+ }
+
public override bool Equals (object obj)
{
Unwrap uw = obj as Unwrap;
}
}
- void Store (EmitContext ec)
+ public void Store (EmitContext ec)
{
- if (temp != null)
+ if (temp != null || temp_field != null)
return;
if (expr is VariableReference)
public void Load (EmitContext ec)
{
- if (expr is VariableReference)
+ if (temp_field != null)
+ temp_field.Emit (ec);
+ else if (expr is VariableReference)
expr.Emit (ec);
else
LocalVariable.Emit (ec);
}
- public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
+ public override SLE.Expression MakeExpression (BuilderContext ctx)
{
return expr.MakeExpression (ctx);
}
public void AddressOf (EmitContext ec, AddressOp mode)
{
- IMemoryLocation ml = expr as VariableReference;
+ IMemoryLocation ml;
+
+ if (temp_field != null) {
+ ml = temp_field as IMemoryLocation;
+ if (ml == null) {
+ var lt = new LocalTemporary (temp_field.Type);
+ temp_field.Emit (ec);
+ lt.Store (ec);
+ ml = lt;
+ }
+ } else {
+ ml = expr as VariableReference;
+ }
+
if (ml != null)
ml.AddressOf (ec, mode);
else
//
LocalTemporary LocalVariable {
get {
- if (temp == null)
+ if (temp == null && temp_field == null)
temp = new LocalTemporary (expr.Type);
return temp;
}
return child_cast.CreateExpressionTree (ec);
}
+ var user_cast = child as UserCast;
+ if (user_cast != null) {
+ child.Type = type;
+ return user_cast.CreateExpressionTree (ec);
+ }
+
return base.CreateExpressionTree (ec);
}
return new LiftedNull (nullable, loc);
}
- public static Constant CreateFromExpression (ResolveContext ec, Expression e)
+ public static Constant CreateFromExpression (ResolveContext rc, Expression e)
{
- ec.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
- e.Type.GetSignatureForError ());
+ if (!rc.HasSet (ResolveContext.Options.ExpressionTreeConversion)) {
+ rc.Report.Warning (458, 2, e.Location, "The result of the expression is always `null' of type `{0}'",
+ e.Type.GetSignatureForError ());
+ }
return ReducedExpression.Create (Create (e.Type, e.Location), e);
}
//
// Generic lifting expression, supports all S/S? -> T/T? cases
//
- public class Lifted : Expression, IMemoryLocation
+ public class LiftedConversion : Expression, IMemoryLocation
{
Expression expr, null_value;
Unwrap unwrap;
- public Lifted (Expression expr, Unwrap unwrap, TypeSpec type)
+ public LiftedConversion (Expression expr, Unwrap unwrap, TypeSpec type)
{
this.expr = expr;
this.unwrap = unwrap;
this.type = type;
}
- public Lifted (Expression expr, Expression unwrap, TypeSpec type)
+ public LiftedConversion (Expression expr, Expression unwrap, TypeSpec type)
: this (expr, unwrap as Unwrap, type)
{
}
// Wrap target for T?
if (type.IsNullableType) {
- expr = Wrap.Create (expr, type);
- if (expr == null)
- return null;
+ if (!expr.Type.IsNullableType) {
+ expr = Wrap.Create (expr, type);
+ if (expr == null)
+ return null;
+ }
null_value = LiftedNull.Create (type, loc);
} else if (TypeSpec.IsValueType (type)) {
ec.MarkLabel (is_null_label);
null_value.Emit (ec);
+
ec.MarkLabel (end_label);
}
}
}
- public class LiftedBinaryOperator : Binary
+ //
+ // Lifted version of binary operators
+ //
+ class LiftedBinaryOperator : Expression
{
- Unwrap left_unwrap, right_unwrap;
- Expression left_orig, right_orig;
- Expression user_operator;
- MethodSpec wrap_ctor;
-
- public LiftedBinaryOperator (Binary.Operator op, Expression left, Expression right)
- : base (op, left, right)
+ public LiftedBinaryOperator (Binary b)
{
+ this.Binary = b;
+ this.loc = b.Location;
}
- bool IsBitwiseBoolean {
- get {
- return (Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) &&
- ((left_unwrap != null && left_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
- (right_unwrap != null && right_unwrap.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
- }
- }
+ public Binary Binary { get; private set; }
- bool IsLeftNullLifted {
- get {
- return (state & State.LeftNullLifted) != 0;
- }
- }
+ public Expression Left { get; set; }
- bool IsRightNullLifted {
- get {
- return (state & State.RightNullLifted) != 0;
- }
- }
+ public Expression Right { get; set; }
- public override Expression CreateExpressionTree (ResolveContext ec)
- {
- if (user_operator != null)
- return user_operator.CreateExpressionTree (ec);
+ public Unwrap UnwrapLeft { get; set; }
- return base.CreateExpressionTree (ec);
- }
+ public Unwrap UnwrapRight { get; set; }
- //
- // CSC 2 has this behavior, it allows structs to be compared
- // with the null literal *outside* of a generics context and
- // inlines that as true or false.
- //
- Constant CreateNullConstant (ResolveContext ec, Expression expr)
- {
- // FIXME: Handle side effect constants
- Constant c = new BoolConstant (ec.BuiltinTypes, Oper == Operator.Inequality, loc);
+ public MethodSpec UserOperator { get; set; }
- if ((Oper & Operator.EqualityMask) != 0) {
- ec.Report.Warning (472, 2, loc, "The result of comparing value type `{0}' with null is always `{1}'",
- expr.Type.GetSignatureForError (), c.GetValueAsLiteral ());
- } else {
- ec.Report.Warning (464, 2, loc, "The result of comparing type `{0}' with null is always `{1}'",
- expr.Type.GetSignatureForError (), c.GetValueAsLiteral ());
+ bool IsBitwiseBoolean {
+ get {
+ return (Binary.Oper == Binary.Operator.BitwiseAnd || Binary.Oper == Binary.Operator.BitwiseOr) &&
+ ((UnwrapLeft != null && UnwrapLeft.Type.BuiltinType == BuiltinTypeSpec.Type.Bool) ||
+ (UnwrapRight != null && UnwrapRight.Type.BuiltinType == BuiltinTypeSpec.Type.Bool));
}
-
- return ReducedExpression.Create (c, this);
}
- protected override Expression DoResolve (ResolveContext ec)
+ public override bool ContainsEmitWithAwait ()
{
- if ((Oper & Operator.LogicalMask) != 0) {
- Error_OperatorCannotBeApplied (ec, left, right);
- return null;
- }
-
- bool use_default_call = (Oper & (Operator.BitwiseMask | Operator.EqualityMask)) != 0;
- left_orig = left;
- if (left.Type.IsNullableType) {
- left = left_unwrap = Unwrap.Create (left, use_default_call);
- if (left == null)
- return null;
- }
-
- right_orig = right;
- if (right.Type.IsNullableType) {
- right = right_unwrap = Unwrap.Create (right, use_default_call);
- if (right == null)
- return null;
- }
-
- //
- // Some details are in 6.4.2, 7.2.7
- // Arguments can be lifted for equal operators when the return type is bool and both
- // arguments are of same type
- //
- if (left_orig is NullLiteral) {
- left = right;
- state |= State.LeftNullLifted;
- type = ec.BuiltinTypes.Bool;
- }
-
- if (right_orig.IsNull) {
- if ((Oper & Operator.ShiftMask) != 0)
- right = new EmptyExpression (ec.BuiltinTypes.Int);
- else
- right = left;
-
- state |= State.RightNullLifted;
- type = ec.BuiltinTypes.Bool;
- }
-
- eclass = ExprClass.Value;
- return DoResolveCore (ec, left_orig, right_orig);
+ return Left.ContainsEmitWithAwait () || Right.ContainsEmitWithAwait ();
}
- void EmitBitwiseBoolean (EmitContext ec)
+ public override Expression CreateExpressionTree (ResolveContext rc)
{
- Label load_left = ec.DefineLabel ();
- Label load_right = ec.DefineLabel ();
- Label end_label = ec.DefineLabel ();
-
- // null & value, null | value
- if (left_unwrap == null) {
- left_unwrap = right_unwrap;
- right_unwrap = null;
- right = left;
- }
-
- left_unwrap.Emit (ec);
- ec.Emit (OpCodes.Brtrue, load_right);
-
- // value & null, value | null
- if (right_unwrap != null) {
- right_unwrap.Emit (ec);
- ec.Emit (OpCodes.Brtrue_S, load_left);
- }
-
- left_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse_S, load_right);
-
- // load left
- ec.MarkLabel (load_left);
+ if (UserOperator != null) {
+ Arguments args = new Arguments (2);
+ args.Add (new Argument (Binary.Left));
+ args.Add (new Argument (Binary.Right));
- if (Oper == Operator.BitwiseAnd) {
- left_unwrap.Load (ec);
- } else {
- if (right_unwrap == null) {
- right.Emit (ec);
- if (right is EmptyConstantCast || right is EmptyCast)
- ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- } else {
- right_unwrap.Load (ec);
- right_unwrap = left_unwrap;
- }
- }
- ec.Emit (OpCodes.Br_S, end_label);
-
- // load right
- ec.MarkLabel (load_right);
- if (right_unwrap == null) {
- if (Oper == Operator.BitwiseAnd) {
- right.Emit (ec);
- if (right is EmptyConstantCast || right is EmptyCast)
- ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- } else {
- left_unwrap.Load (ec);
- }
- } else {
- right_unwrap.Load (ec);
+ var method = new UserOperatorCall (UserOperator, args, Binary.CreateExpressionTree, loc);
+ return method.CreateExpressionTree (rc);
}
- ec.MarkLabel (end_label);
+ return Binary.CreateExpressionTree (rc);
}
- //
- // Emits optimized equality or inequality operator when possible
- //
- void EmitEquality (EmitContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- //
- // Either left or right is null
- //
- if (left_unwrap != null && (IsRightNullLifted || right.IsNull)) {
- left_unwrap.EmitCheck (ec);
- if (Oper == Binary.Operator.Equality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
- }
- return;
- }
-
- if (right_unwrap != null && (IsLeftNullLifted || left.IsNull)) {
- right_unwrap.EmitCheck (ec);
- if (Oper == Binary.Operator.Equality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
- }
- return;
- }
-
- Label dissimilar_label = ec.DefineLabel ();
- Label end_label = ec.DefineLabel ();
+ if (rc.IsRuntimeBinder) {
+ if (UnwrapLeft == null && !Left.Type.IsNullableType)
+ Left = Wrap.Create (Left, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Left.Type }));
- if (user_operator != null) {
- user_operator.Emit (ec);
- ec.Emit (Oper == Operator.Equality ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, dissimilar_label);
+ if (UnwrapRight == null && !Right.Type.IsNullableType)
+ Right = Wrap.Create (Right, rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { Right.Type }));
} else {
- if (ec.HasSet (BuilderContext.Options.AsyncBody) && right.ContainsEmitWithAwait ()) {
- left = left.EmitToField (ec);
- right = right.EmitToField (ec);
+ if (UnwrapLeft == null && Left != null && Left.Type.IsNullableType) {
+ Left = Unwrap.CreateUnwrapped (Left);
+ UnwrapLeft = Left as Unwrap;
}
- left.Emit (ec);
- right.Emit (ec);
-
- ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
- }
-
- if (left_unwrap != null)
- left_unwrap.EmitCheck (ec);
-
- if (right_unwrap != null)
- right_unwrap.EmitCheck (ec);
-
- if (left_unwrap != null && right_unwrap != null) {
- if (Oper == Operator.Inequality)
- ec.Emit (OpCodes.Xor);
- else
- ec.Emit (OpCodes.Ceq);
- } else {
- if (Oper == Operator.Inequality) {
- ec.EmitInt (0);
- ec.Emit (OpCodes.Ceq);
+ if (UnwrapRight == null && Right != null && Right.Type.IsNullableType) {
+ Right = Unwrap.CreateUnwrapped (Right);
+ UnwrapRight = Right as Unwrap;
}
}
- ec.Emit (OpCodes.Br_S, end_label);
-
- ec.MarkLabel (dissimilar_label);
- if (Oper == Operator.Inequality)
- ec.EmitInt (1);
- else
- ec.EmitInt (0);
+ type = Binary.Type;
+ eclass = Binary.eclass;
- ec.MarkLabel (end_label);
+ return this;
}
-
- public override void EmitBranchable (EmitContext ec, Label target, bool onTrue)
- {
- Emit (ec);
- ec.Emit (onTrue ? OpCodes.Brtrue : OpCodes.Brfalse, target);
- }
public override void Emit (EmitContext ec)
{
- //
- // Optimize same expression operation
- //
- if (right_unwrap != null && right.Equals (left))
- right_unwrap = left_unwrap;
-
- if (user_operator == null && IsBitwiseBoolean) {
+ if (IsBitwiseBoolean && UserOperator == null) {
EmitBitwiseBoolean (ec);
return;
}
- if ((Oper & Operator.EqualityMask) != 0) {
+ if ((Binary.Oper & Binary.Operator.EqualityMask) != 0) {
EmitEquality (ec);
return;
}
Label is_null_label = ec.DefineLabel ();
Label end_label = ec.DefineLabel ();
- if (left_unwrap != null) {
- left_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse, is_null_label);
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
+
+ if (UnwrapLeft != null) {
+ UnwrapLeft.EmitCheck (ec);
}
//
// Don't emit HasValue check when left and right expressions are same
//
- if (right_unwrap != null && !left.Equals (right)) {
- right_unwrap.EmitCheck (ec);
- ec.Emit (OpCodes.Brfalse, is_null_label);
+ if (UnwrapRight != null && !Binary.Left.Equals (Binary.Right)) {
+ UnwrapRight.EmitCheck (ec);
+ if (UnwrapLeft != null) {
+ ec.Emit (OpCodes.And);
+ }
}
- EmitOperator (ec, left.Type);
+ ec.Emit (OpCodes.Brfalse, is_null_label);
+
+ if (UserOperator != null) {
+ var args = new Arguments (2);
+ args.Add (new Argument (Left));
+ args.Add (new Argument (Right));
+
+ var call = new CallEmitter ();
+ call.EmitPredefined (ec, UserOperator, args);
+ } else {
+ Binary.EmitOperator (ec, Left, Right);
+ }
- if (wrap_ctor != null)
- ec.Emit (OpCodes.Newobj, wrap_ctor);
+ //
+ // Wrap the result when the operator return type is nullable type
+ //
+ if (type.IsNullableType)
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
ec.Emit (OpCodes.Br_S, end_label);
ec.MarkLabel (is_null_label);
- if ((Oper & Operator.ComparisonMask) != 0) {
+ if ((Binary.Oper & Binary.Operator.ComparisonMask) != 0) {
ec.EmitInt (0);
} else {
LiftedNull.Create (type, loc).Emit (ec);
ec.MarkLabel (end_label);
}
- protected override void EmitOperator (EmitContext ec, TypeSpec l)
+ void EmitBitwiseBoolean (EmitContext ec)
{
- if (user_operator != null) {
- user_operator.Emit (ec);
- return;
- }
+ Label load_left = ec.DefineLabel ();
+ Label load_right = ec.DefineLabel ();
+ Label end_label = ec.DefineLabel ();
+ Label is_null_label = ec.DefineLabel ();
- if (left.Type.IsNullableType) {
- l = NullableInfo.GetUnderlyingType (left.Type);
- left = EmptyCast.Create (left, l);
- }
+ bool or = Binary.Oper == Binary.Operator.BitwiseOr;
- if (right.Type.IsNullableType) {
- right = EmptyCast.Create (right, NullableInfo.GetUnderlyingType (right.Type));
- }
+ //
+ // Both operands are bool? types
+ //
+ if (UnwrapLeft != null && UnwrapRight != null) {
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
- base.EmitOperator (ec, l);
- }
+ Left.Emit (ec);
+ ec.Emit (OpCodes.Brtrue_S, load_right);
- Expression LiftResult (ResolveContext ec, Expression res_expr)
- {
- TypeSpec lifted_type;
+ Right.Emit (ec);
+ ec.Emit (OpCodes.Brtrue_S, load_left);
- //
- // Avoid double conversion
- //
- if (left_unwrap == null || IsLeftNullLifted || left_unwrap.Type != left.Type || (left_unwrap != null && IsRightNullLifted)) {
- lifted_type = new NullableType (left.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
+ UnwrapLeft.EmitCheck (ec);
+ ec.Emit (OpCodes.Brfalse_S, load_right);
- if (left is UserCast || left is EmptyCast || left is OpcodeCast)
- left.Type = lifted_type;
+ // load left
+ ec.MarkLabel (load_left);
+ if (or)
+ UnwrapRight.Load (ec);
else
- left = EmptyCast.Create (left, lifted_type);
- }
+ UnwrapLeft.Load (ec);
- if (left != right && (right_unwrap == null || IsRightNullLifted || right_unwrap.Type != right.Type || (right_unwrap != null && IsLeftNullLifted))) {
- lifted_type = new NullableType (right.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
-
- var r = right;
- if (r is ReducedExpression)
- r = ((ReducedExpression) r).OriginalExpression;
+ ec.Emit (OpCodes.Br_S, end_label);
- if (r is UserCast || r is EmptyCast || r is OpcodeCast)
- r.Type = lifted_type;
+ // load right
+ ec.MarkLabel (load_right);
+ if (or)
+ UnwrapLeft.Load (ec);
else
- right = EmptyCast.Create (right, lifted_type);
+ UnwrapRight.Load (ec);
+
+ ec.MarkLabel (end_label);
+ return;
}
- if ((Oper & Operator.ComparisonMask) == 0) {
- lifted_type = new NullableType (res_expr.Type, loc).ResolveAsType (ec);
- if (lifted_type == null)
- return null;
+ //
+ // Faster version when one operand is bool
+ //
+ if (UnwrapLeft == null) {
+ //
+ // (bool, bool?)
+ //
+ // Optimizes remaining (false & bool?), (true | bool?) which are not easy to handle
+ // in binary expression reduction
+ //
+ var c = Left as BoolConstant;
+ if (c != null) {
+ // Keep evaluation order
+ UnwrapRight.Store (ec);
+
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+ } else if (Left.IsNull) {
+ UnwrapRight.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+ UnwrapRight.Load (ec);
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (is_null_label);
+ LiftedNull.Create (type, loc).Emit (ec);
+ } else {
+ Left.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
- wrap_ctor = NullableInfo.GetConstructor (lifted_type);
- type = res_expr.Type = lifted_type;
- }
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
- if (IsLeftNullLifted) {
- left = LiftedNull.Create (right.Type, left.Location);
+ ec.Emit (OpCodes.Br_S, end_label);
+ ec.MarkLabel (load_right);
+ UnwrapRight.Original.Emit (ec);
+ }
+ } else {
//
- // Special case for bool?, the result depends on both null right side and left side value
+ // (bool?, bool)
//
- if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
- return res_expr;
- }
-
- if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
- return LiftedNull.CreateFromExpression (ec, res_expr);
+ // Keep left-right evaluation order
+ UnwrapLeft.Store (ec);
//
- // Value types and null comparison
+ // Optimizes remaining (bool? & false), (bool? | true) which are not easy to handle
+ // in binary expression reduction
//
- if (right_unwrap == null || (Oper & Operator.RelationalMask) != 0)
- return CreateNullConstant (ec, right_orig);
+ var c = Right as BoolConstant;
+ if (c != null) {
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+ } else if (Right.IsNull) {
+ UnwrapLeft.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, is_null_label);
+
+ UnwrapLeft.Load (ec);
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (is_null_label);
+ LiftedNull.Create (type, loc).Emit (ec);
+ } else {
+ Right.Emit (ec);
+ ec.Emit (or ? OpCodes.Brfalse_S : OpCodes.Brtrue_S, load_right);
+
+ ec.EmitInt (or ? 1 : 0);
+ ec.Emit (OpCodes.Newobj, NullableInfo.GetConstructor (type));
+
+ ec.Emit (OpCodes.Br_S, end_label);
+
+ ec.MarkLabel (load_right);
+
+ UnwrapLeft.Load (ec);
+ }
}
- if (IsRightNullLifted) {
- right = LiftedNull.Create (left.Type, right.Location);
+ ec.MarkLabel (end_label);
+ }
+ //
+ // Emits optimized equality or inequality operator when possible
+ //
+ void EmitEquality (EmitContext ec)
+ {
+ //
+ // Either left or right is null
+ //
+ if (UnwrapLeft != null && Binary.Right.IsNull) { // TODO: Optimize for EmitBranchable
//
- // Special case for bool?, the result depends on both null right side and left side value
+ // left.HasValue == false
//
- if ((Oper == Operator.BitwiseAnd || Oper == Operator.BitwiseOr) && NullableInfo.GetUnderlyingType (type).BuiltinType == BuiltinTypeSpec.Type.Bool) {
- return res_expr;
+ UnwrapLeft.EmitCheck (ec);
+ if (Binary.Oper == Binary.Operator.Equality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
}
+ return;
+ }
- if ((Oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0)
- return LiftedNull.CreateFromExpression (ec, res_expr);
-
+ if (UnwrapRight != null && Binary.Left.IsNull) {
//
- // Value types and null comparison
+ // right.HasValue == false
//
- if (left_unwrap == null || (Oper & Operator.RelationalMask) != 0)
- return CreateNullConstant (ec, left_orig);
+ UnwrapRight.EmitCheck (ec);
+ if (Binary.Oper == Binary.Operator.Equality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
+ }
+ return;
}
- return res_expr;
- }
+ Label dissimilar_label = ec.DefineLabel ();
+ Label end_label = ec.DefineLabel ();
- protected override Expression ResolveOperatorPredefined (ResolveContext ec, Binary.PredefinedOperator [] operators, bool primitives_only, TypeSpec enum_type)
- {
- Expression e = base.ResolveOperatorPredefined (ec, operators, primitives_only, enum_type);
+ if (UserOperator != null) {
+ var left = Left;
- if (e == this || enum_type != null)
- return LiftResult (ec, e);
+ if (UnwrapLeft != null) {
+ UnwrapLeft.EmitCheck (ec);
+ } else {
+ // Keep evaluation order same
+ if (!(Left is VariableReference)) {
+ Left.Emit (ec);
+ var lt = new LocalTemporary (Left.Type);
+ lt.Store (ec);
+ left = lt;
+ }
+ }
- //
- // 7.9.9 Equality operators and null
- //
- // The == and != operators permit one operand to be a value of a nullable type and
- // the other to be the null literal, even if no predefined or user-defined operator
- // (in unlifted or lifted form) exists for the operation.
- //
- if (e == null && (Oper & Operator.EqualityMask) != 0) {
- if ((IsLeftNullLifted && right_unwrap != null) || (IsRightNullLifted && left_unwrap != null))
- return LiftResult (ec, this);
- }
+ if (UnwrapRight != null) {
+ UnwrapRight.EmitCheck (ec);
- return e;
- }
+ if (UnwrapLeft != null) {
+ ec.Emit (OpCodes.Bne_Un, dissimilar_label);
- protected override Expression ResolveUserOperator (ResolveContext ec, Expression left, Expression right)
- {
- //
- // Try original types first for exact match without unwrapping
- //
- Expression expr = base.ResolveUserOperator (ec, left_orig, right_orig);
- if (expr != null)
- return expr;
+ Label compare_label = ec.DefineLabel ();
+ UnwrapLeft.EmitCheck (ec);
+ ec.Emit (OpCodes.Brtrue, compare_label);
- State orig_state = state;
+ if (Binary.Oper == Binary.Operator.Equality)
+ ec.EmitInt (1);
+ else
+ ec.EmitInt (0);
- //
- // One side is a nullable type, try to match underlying types
- //
- if (left_unwrap != null || right_unwrap != null || (state & (State.RightNullLifted | State.LeftNullLifted)) != 0) {
- expr = base.ResolveUserOperator (ec, left, right);
+ ec.Emit (OpCodes.Br, end_label);
+
+ ec.MarkLabel (compare_label);
+ } else {
+ ec.Emit (OpCodes.Brfalse, dissimilar_label);
+ }
+ } else {
+ ec.Emit (OpCodes.Brfalse, dissimilar_label);
+ }
+
+ var args = new Arguments (2);
+ args.Add (new Argument (left));
+ args.Add (new Argument (Right));
+
+ var call = new CallEmitter ();
+ call.EmitPredefined (ec, UserOperator, args);
+ } else {
+ if (ec.HasSet (BuilderContext.Options.AsyncBody) && Binary.Right.ContainsEmitWithAwait ()) {
+ Left = Left.EmitToField (ec);
+ Right = Right.EmitToField (ec);
+ }
+
+ //
+ // Emit underlying value comparison first.
+ //
+ // For this code: int? a = 1; bool b = a == 1;
+ //
+ // We emit something similar to this. Expressions with side effects have local
+ // variable created by Unwrap expression
+ //
+ // left.GetValueOrDefault ()
+ // right
+ // bne.un.s dissimilar_label
+ // left.HasValue
+ // br.s end_label
+ // dissimilar_label:
+ // ldc.i4.0
+ // end_label:
+ //
+
+ Left.Emit (ec);
+ Right.Emit (ec);
+
+ ec.Emit (OpCodes.Bne_Un_S, dissimilar_label);
+
+ //
+ // Check both left and right expressions for Unwrap call in which
+ // case we need to run get_HasValue() check because the type is
+ // nullable and could have null value
+ //
+ if (UnwrapLeft != null)
+ UnwrapLeft.EmitCheck (ec);
+
+ if (UnwrapRight != null)
+ UnwrapRight.EmitCheck (ec);
+
+ if (UnwrapLeft != null && UnwrapRight != null) {
+ if (Binary.Oper == Binary.Operator.Inequality)
+ ec.Emit (OpCodes.Xor);
+ else
+ ec.Emit (OpCodes.Ceq);
+ } else {
+ if (Binary.Oper == Binary.Operator.Inequality) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
+ }
+ }
}
- if (expr == null)
- return null;
+ ec.Emit (OpCodes.Br_S, end_label);
- //
- // Lift the result in the case it can be null and predefined or user operator
- // result type is of a value type
- //
- if (!TypeSpec.IsValueType (expr.Type))
- return null;
+ ec.MarkLabel (dissimilar_label);
+ if (Binary.Oper == Binary.Operator.Inequality)
+ ec.EmitInt (1);
+ else
+ ec.EmitInt (0);
- if (state != orig_state)
- return expr;
+ ec.MarkLabel (end_label);
+ }
- expr = LiftResult (ec, expr);
- if (expr is Constant)
- return expr;
+ public override SLE.Expression MakeExpression (BuilderContext ctx)
+ {
+ Console.WriteLine (":{0} x {1}", Left.GetType (), Right.GetType ());
- type = expr.Type;
- user_operator = expr;
- return this;
+ return Binary.MakeExpression (ctx, Left, Right);
}
}
return;
}
- base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ base.ApplyToExtraTarget (a, ctor, cdata, pa);
}
public override ParametersCompiled ParameterInfo {
return;
}
- base.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ base.ApplyToExtraTarget (a, ctor, cdata, pa);
}
public override AttributeTargets AttributeTargets {
}
ec.StartFlowBranching (FlowBranching.BranchingType.Block, loc);
+ ec.CurrentBranching.CurrentUsageVector.Goto ();
bool ok = Resolve (ec);
ec.KillFlowBranching ();
return false;
}
- if (ec.Switch.DefaultLabel == null) {
- FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
- return false;
- }
+ ec.Switch.RegisterGotoCase (null, null);
return true;
}
/// </summary>
public class GotoCase : Statement {
Expression expr;
- SwitchLabel sl;
public GotoCase (Expression e, Location l)
{
return this.expr;
}
}
+
+ public SwitchLabel Label { get; set; }
public override bool Resolve (BlockContext ec)
{
ec.CurrentBranching.CurrentUsageVector.Goto ();
- expr = expr.Resolve (ec);
- if (expr == null)
- return false;
-
- Constant c = expr as Constant;
+ Constant c = expr.ResolveLabelConstant (ec);
if (c == null) {
- ec.Report.Error (150, expr.Location, "A constant value is expected");
return false;
}
}
- sl = ec.Switch.ResolveGotoCase (ec, res);
+ ec.Switch.RegisterGotoCase (this, res);
return true;
}
protected override void DoEmit (EmitContext ec)
{
- ec.Emit (OpCodes.Br, sl.GetILLabel (ec));
+ ec.Emit (OpCodes.Br, Label.GetILLabel (ec));
}
protected override void CloneTo (CloneContext clonectx, Statement t)
scope_initializers.Add (s);
}
}
+
+ public void InsertStatement (int index, Statement s)
+ {
+ statements.Insert (index, s);
+ }
public void AddStatement (Statement s)
{
if (pb.StateMachine == storey)
break;
+ //
+ // If we are state machine with no parent we can hook into we don't
+ // add reference but capture this directly
+ //
+ ExplicitBlock parent_storey_block = pb;
+ while (parent_storey_block.Parent != null) {
+ parent_storey_block = parent_storey_block.Parent.Explicit;
+ if (parent_storey_block.AnonymousMethodStorey != null) {
+ break;
+ }
+ }
+
+ if (parent_storey_block.AnonymousMethodStorey == null) {
+ pb.StateMachine.AddCapturedThisField (ec);
+ b.HasCapturedThis = true;
+ continue;
+ }
+
pb.StateMachine.AddParentStoreyReference (ec, storey);
}
public override bool Resolve (BlockContext bc)
{
+ if (ResolveAndReduce (bc))
+ bc.Switch.RegisterLabel (bc, this);
+
bc.CurrentBranching.CurrentUsageVector.ResetBarrier ();
return base.Resolve (bc);
// Resolves the expression, reduces it to a literal if possible
// and then converts it to the requested type.
//
- public bool ResolveAndReduce (ResolveContext ec, TypeSpec required_type, bool allow_nullable)
- {
- Expression e = label.Resolve (ec);
-
- if (e == null)
- return false;
+ bool ResolveAndReduce (ResolveContext rc)
+ {
+ if (IsDefault)
+ return true;
- Constant c = e as Constant;
- if (c == null){
- ec.Report.Error (150, loc, "A constant value is expected");
+ var c = label.ResolveLabelConstant (rc);
+ if (c == null)
return false;
- }
- if (allow_nullable && c is NullLiteral) {
+ if (rc.Switch.IsNullable && c is NullLiteral) {
converted = c;
return true;
}
- converted = c.ImplicitConversionRequired (ec, required_type, loc);
+ converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType, loc);
return converted != null;
}
- public void Error_AlreadyOccurs (ResolveContext ec, TypeSpec switch_type, SwitchLabel collision_with)
+ public void Error_AlreadyOccurs (ResolveContext ec, SwitchLabel collision_with)
{
string label;
if (converted == null)
Dictionary<string, SwitchLabel> string_labels;
List<SwitchLabel> case_labels;
+ List<Tuple<GotoCase, Constant>> goto_cases;
+
/// <summary>
/// The governing switch type
/// </summary>
};
}
- //
- // Performs the basic sanity checks on the switch statement
- // (looks for duplicate keys and non-constant expressions).
- //
- // It also returns a hashtable with the keys that we will later
- // use to compute the switch tables
- //
- bool ResolveLabels (ResolveContext ec, Constant value)
+ public void RegisterLabel (ResolveContext rc, SwitchLabel sl)
{
- bool error = false;
- if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
- string_labels = new Dictionary<string, SwitchLabel> ();
- } else {
- labels = new Dictionary<long, SwitchLabel> ();
- }
+ case_labels.Add (sl);
- case_labels = new List<SwitchLabel> ();
- int default_label_index = -1;
- bool constant_label_found = false;
-
- for (int i = 0; i < block.Statements.Count; ++i) {
- var s = block.Statements[i];
-
- var sl = s as SwitchLabel;
- if (sl == null) {
- continue;
- }
-
- case_labels.Add (sl);
-
- if (sl.IsDefault) {
- if (case_default != null) {
- sl.Error_AlreadyOccurs (ec, SwitchType, case_default);
- error = true;
- }
-
- default_label_index = i;
+ if (sl.IsDefault) {
+ if (case_default != null) {
+ sl.Error_AlreadyOccurs (rc, case_default);
+ } else {
case_default = sl;
- continue;
}
- if (!sl.ResolveAndReduce (ec, SwitchType, IsNullable)) {
- error = true;
- continue;
- }
+ return;
+ }
- try {
- if (string_labels != null) {
- string string_value = sl.Converted.GetValue () as string;
- if (string_value == null)
- case_null = sl;
- else
- string_labels.Add (string_value, sl);
+ try {
+ if (string_labels != null) {
+ string string_value = sl.Converted.GetValue () as string;
+ if (string_value == null)
+ case_null = sl;
+ else
+ string_labels.Add (string_value, sl);
+ } else {
+ if (sl.Converted is NullLiteral) {
+ case_null = sl;
} else {
- if (sl.Converted is NullLiteral) {
- case_null = sl;
- } else {
- labels.Add (sl.Converted.GetValueAsLong (), sl);
- }
+ labels.Add (sl.Converted.GetValueAsLong (), sl);
}
- } catch (ArgumentException) {
- if (string_labels != null)
- sl.Error_AlreadyOccurs (ec, SwitchType, string_labels[(string) sl.Converted.GetValue ()]);
- else
- sl.Error_AlreadyOccurs (ec, SwitchType, labels[sl.Converted.GetValueAsLong ()]);
-
- error = true;
- }
-
- if (value != null) {
- var constant_label = constant_label_found ? null : FindLabel (value);
- if (constant_label == null || constant_label != sl)
- block.Statements[i] = new EmptyStatement (s.loc);
- else
- constant_label_found = true;
}
+ } catch (ArgumentException) {
+ if (string_labels != null)
+ sl.Error_AlreadyOccurs (rc, string_labels[(string) sl.Converted.GetValue ()]);
+ else
+ sl.Error_AlreadyOccurs (rc, labels[sl.Converted.GetValueAsLong ()]);
}
-
- if (value != null && constant_label_found && default_label_index >= 0)
- block.Statements[default_label_index] = new EmptyStatement (case_default.loc);
-
- return !error;
}
//
if (block.Statements.Count == 0)
return true;
- var constant = new_expr as Constant;
+ if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
+ string_labels = new Dictionary<string, SwitchLabel> ();
+ } else {
+ labels = new Dictionary<long, SwitchLabel> ();
+ }
- if (!ResolveLabels (ec, constant))
- return false;
+ case_labels = new List<SwitchLabel> ();
+
+ var constant = new_expr as Constant;
//
// Don't need extra variable for constant switch or switch with
// only default case
//
- if (constant == null && (case_labels.Count - (case_default != null ? 1 : 0)) != 0) {
+ if (constant == null) {
//
// Store switch expression for comparison purposes
//
value = new_expr as VariableReference;
- if (value == null) {
- // Create temporary variable inside switch scope
+ if (value == null && !HasOnlyDefaultSection ()) {
var current_block = ec.CurrentBlock;
ec.CurrentBlock = Block;
+ // Create temporary variable inside switch scope
value = TemporaryVariableReference.Create (SwitchType, ec.CurrentBlock, loc);
value.Resolve (ec);
ec.CurrentBlock = current_block;
ec.EndFlowBranching ();
ec.Switch = old_switch;
+ //
+ // Check if all goto cases are valid. Needs to be done after switch
+ // is resolved becuase goto can jump forward in the scope.
+ //
+ if (goto_cases != null) {
+ foreach (var gc in goto_cases) {
+ if (gc.Item1 == null) {
+ if (DefaultLabel == null) {
+ FlowBranchingBlock.Error_UnknownLabel (loc, "default", ec.Report);
+ }
+
+ continue;
+ }
+
+ var sl = FindLabel (gc.Item2);
+ if (sl == null) {
+ FlowBranchingBlock.Error_UnknownLabel (loc, "case " + gc.Item2.GetValueAsLiteral (), ec.Report);
+ } else {
+ gc.Item1.Label = sl;
+ }
+ }
+ }
+
+ if (constant != null) {
+ ResolveUnreachableSections (ec, constant);
+ }
+
if (!ok)
return false;
}
//
- // Needed to emit anonymous storey initialization before
+ // Anonymous storey initialization has to happen before
// any generated switch dispatch
//
- block.AddScopeStatement (new DispatchStatement (this));
+ block.InsertStatement (0, new DispatchStatement (this));
return true;
}
- public SwitchLabel ResolveGotoCase (ResolveContext rc, Constant value)
+ bool HasOnlyDefaultSection ()
{
- var sl = FindLabel (value);
+ for (int i = 0; i < block.Statements.Count; ++i) {
+ var s = block.Statements[i] as SwitchLabel;
- if (sl == null) {
- FlowBranchingBlock.Error_UnknownLabel (loc, "case " + value.GetValueAsLiteral (), rc.Report);
+ if (s == null || s.IsDefault)
+ continue;
+
+ return false;
}
- return sl;
+ return true;
+ }
+
+ public void RegisterGotoCase (GotoCase gotoCase, Constant value)
+ {
+ if (goto_cases == null)
+ goto_cases = new List<Tuple<GotoCase, Constant>> ();
+
+ goto_cases.Add (Tuple.Create (gotoCase, value));
}
//
string_dictionary = new SimpleAssign (switch_cache_field, initializer.Resolve (ec));
}
+ void ResolveUnreachableSections (BlockContext bc, Constant value)
+ {
+ var constant_label = FindLabel (value) ?? case_default;
+
+ bool found = false;
+ bool unreachable_reported = false;
+ for (int i = 0; i < block.Statements.Count; ++i) {
+ var s = block.Statements[i];
+
+ if (s is SwitchLabel) {
+ if (unreachable_reported) {
+ found = unreachable_reported = false;
+ }
+
+ found |= s == constant_label;
+ continue;
+ }
+
+ if (found) {
+ unreachable_reported = true;
+ continue;
+ }
+
+ if (!unreachable_reported) {
+ unreachable_reported = true;
+ bc.Report.Warning (162, 2, s.loc, "Unreachable code detected");
+ }
+
+ block.Statements[i] = new EmptyStatement (s.loc);
+ }
+ }
+
void DoEmitStringSwitch (EmitContext ec)
{
Label l_initialized = ec.DefineLabel ();
return;
}
- //
- // Mark sequence point explicitly to switch
- //
- ec.Mark (block.StartLocation);
- block.IsCompilerGenerated = true;
-
if (string_dictionary != null) {
DoEmitStringSwitch (ec);
} else if (case_labels.Count < 4 || string_labels != null) {
} else if (new_expr != value) {
value.EmitAssign (ec, new_expr, false, false);
}
+
+
+ //
+ // Next statement is compiler generated we don't need extra
+ // nop when we can use the statement for sequence point
+ //
+ ec.Mark (block.StartLocation);
+ block.IsCompilerGenerated = true;
}
block.Emit (ec);
}
if (best_match == null && reportErrors) {
- Location loc;
- if (found[0].MemberDefinition is MemberCore) {
- loc = ((MemberCore) found[0].MemberDefinition).Location;
+ var found_member = found[0];
+
+ if (found_member.Kind == MemberKind.MissingType) {
+ // CSC: should be different error number
+ module.Compiler.Report.Error (518, "The predefined type `{0}.{1}' is defined in an assembly that is not referenced.", ns, name);
} else {
- loc = Location.Null;
- module.Compiler.Report.SymbolRelatedToPreviousError (found[0]);
- }
+ Location loc;
+ if (found_member.MemberDefinition is MemberCore) {
+ loc = ((MemberCore) found_member.MemberDefinition).Location;
+ } else {
+ loc = Location.Null;
+ module.Compiler.Report.SymbolRelatedToPreviousError (found_member);
+ }
- module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+ module.Compiler.Report.Error (520, loc, "The predefined type `{0}.{1}' is not declared correctly", ns, name);
+ }
}
return best_match;
}
}
+ public static bool IsNonNullableValueType (TypeSpec t)
+ {
+ switch (t.Kind) {
+ case MemberKind.TypeParameter:
+ return ((TypeParameterSpec) t).IsValueType;
+ case MemberKind.Struct:
+ return !t.IsNullableType;
+ case MemberKind.Enum:
+ return true;
+ default:
+ return false;
+ }
+ }
+
public static bool IsValueType (TypeSpec t)
{
switch (t.Kind) {
public dynamic[,] t2;
public Func<dynamic, int, dynamic[]> v;
public I<dynamic>[] iface;
+ public Action<int[], object, dynamic> d2;
}
delegate dynamic Del (dynamic d);
if (!da.TransformFlags.SequenceEqual (new bool[] { false, false, true }))
return 47;
+ da = t.GetMember ("d2")[0].GetCustomAttributes (ca, false)[0] as DynamicAttribute;
+ if (da == null)
+ return 48;
+ if (!da.TransformFlags.SequenceEqual (new bool[] { false, false, false, false, true }))
+ return 49;
+
t = typeof (Del);
if (t.GetMember ("Invoke")[0].GetCustomAttributes (ca, false).Length != 0)
}
}
+struct S
+{
+ public static implicit operator bool?(S arg)
+ {
+ throw new ApplicationException ("should not be called");
+ }
+}
+
class X
{
- public static void Main ()
+ public static int Main ()
{
int a = 3;
int? b = a;
Baz? z2 = (Baz?) f2;
Baz? z3 = (Baz?) f3;
Baz z4 = (Baz) f2;
+
+ S? s = null;
+ bool? g = s;
+ if (g != null)
+ return 1;
+
+ return 0;
}
}
if (res)
return 2;
+ int? re = 3 + (short?) 7;
+ if (re != 10)
+ return 3;
+
+ int a = 2;
+ int b = 2;
+ int? c = (byte?)a + b;
+ if (c != 4)
+ return 4;
+
+ c = a + (ushort?)b;
+ if (c != 4)
+ return 5;
+
return 0;
}
}
--- /dev/null
+using System;
+
+enum E : sbyte
+{
+ V = 1
+}
+
+struct S
+{
+ public static bool operator == (S s, S i)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static bool operator != (S s, S i)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static implicit operator int? (S s)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static implicit operator E? (S s)
+ {
+ return null;
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ E? a = E.V;
+ E? a_n = null;
+ E? b = E.V;
+ E? b_n = null;
+
+ if (a != b)
+ return 1;
+
+ if (a == a_n)
+ return 2;
+
+ if (a_n != b_n)
+ return 3;
+
+ E e = (E) 4;
+ S s;
+ if (e == s)
+ return 10;
+
+ if (s == e)
+ return 11;
+
+ if (e > s)
+ return 12;
+
+ if (s > e)
+ return 13;
+
+ if ((s & e) != null)
+ return 14;
+
+ if ((s & e) != null)
+ return 15;
+
+ Console.WriteLine ("ok");
+
+ return 0;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+
+struct S
+{
+ public static implicit operator int (S arg)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+struct S2
+{
+ public static implicit operator int?(S2 arg)
+ {
+ return 10000;
+ }
+
+ public static implicit operator uint?(S2 arg)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+public struct S3
+{
+ public static int counter;
+
+ public static implicit operator string (S3 s3)
+ {
+ counter++;
+ return "";
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ S? s = null;
+ bool res = s > 1;
+ if (res)
+ return 1;
+
+ S2 s2 = new S2 ();
+
+ var b = s2 >> 3;
+ if (b != 1250)
+ return 2;
+
+ var b2 = s2 >> s2;
+ if (b2 != 0)
+ return 3;
+
+ var b3 = s2 + 1;
+ if (b3 != 10001)
+ return 4;
+
+ var s3 = new S3 ();
+ if ((s3 == null) != false)
+ return 5;
+
+ if ((s3 != null) != true)
+ return 6;
+
+ if (S3.counter != 2)
+ return 7;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+
+struct S
+{
+ public static bool operator == (S s, S i)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static bool operator != (S s, S i)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+struct S2
+{
+ public static int counter;
+
+ public static bool operator == (S2 s, S2 i)
+ {
+ counter++;
+ return true;
+ }
+
+ public static bool operator != (S2 s, S2 i)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+
+struct S3
+{
+ public static int counter;
+
+ public static implicit operator int?(S3 arg)
+ {
+ counter++;
+ return null;
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ S? s = new S ();
+ S? s2 = null;
+ S? s4 = null;
+
+ if ((s == s2) != false)
+ return 1;
+
+ if ((s2 == s) != false)
+ return 2;
+
+ if ((s2 == s4) != true)
+ return 3;
+
+ S x = new S ();
+
+ if ((s2 == x) != false)
+ return 5;
+
+ if ((x == s2) != false)
+ return 6;
+
+ S2? s2_1 = new S2 ();
+ S2? s2_3 = new S2 ();
+ S2 x2 = new S2 ();
+
+ if ((s2_1 == s2_3) != true)
+ return 7;
+
+ if ((s2_1 == x2) != true)
+ return 8;
+
+ if ((x2 == s2_1) != true)
+ return 9;
+
+ if (S2.counter != 3)
+ return 10;
+
+ S3 s3;
+
+ if ((s3 == null) != true)
+ return 20;
+
+ if ((null == s3) != true)
+ return 21;
+
+ if (S3.counter != 2)
+ return 22;
+
+ return 0;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+
+struct S
+{
+ public static implicit operator string (S s)
+ {
+ return "1";
+ }
+
+ public static implicit operator short? (S s)
+ {
+ return 1;
+ }
+
+ public static implicit operator E (S s)
+ {
+ return 0;
+ }
+}
+
+public enum E
+{
+}
+
+class C
+{
+ public static int Main ()
+ {
+ E? e = 0;
+ const E e1 = (E)44;
+ var res = e == e1;
+ if (res != false)
+ return 1;
+
+ res = e1 == e;
+ if (res != false)
+ return 2;
+
+ E e2 = 0;
+ S s;
+ var res2 = e2 & s;
+ if (res2 != 0)
+ return 3;
+
+ res2 = s & e2;
+ if (res2 != 0)
+ return 4;
+
+ return 0;
+ }
+}
\ No newline at end of file
--- /dev/null
+using System;
+
+struct S
+{
+ public static implicit operator short? (S s)
+ {
+ return 0;
+ }
+
+ public static implicit operator short (S s)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+class Program
+{
+ public static int Main ()
+ {
+ S? s = null;
+ S? s2 = new S ();
+
+ long? i = s;
+ if (i != null)
+ return 1;
+
+ double? ui = s2;
+ if (ui == null)
+ return 2;
+
+ return 0;
+ }
+}
\ No newline at end of file
{
throw new ApplicationException ();
}
+
+ public static Foo operator + (Foo d1, Foo d2)
+ {
+ throw new ApplicationException ();
+ }
}
class C
if (!e.Compile ().Invoke ())
return 4;
+ Expression<Func<Foo?>> e2 = () => f + null;
+ if (e2.Compile ().Invoke () != null)
+ return 5;
+
Console.WriteLine ("OK");
return 0;
}
--- /dev/null
+using System;
+using System.Linq;
+using System.Collections.Generic;
+
+public class Test
+{
+ public static int Main ()
+ {
+ var x = Test2 ();
+ if (x.Count () != 0)
+ return 1;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+
+ public static IEnumerable<int> Test2 ()
+ {
+ while (false)
+ yield return 5;
+ }
+}
\ No newline at end of file
{
}
+ [MethodImplAttribute((short)MethodImplOptions.Synchronized)]
+ public void test2 ()
+ {
+ }
+
+ [MethodImplAttribute((byte)32)]
+ public void test3 ()
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
+ public void test4 ()
+ {
+ }
+
public static int Main ()
{
- MethodImplAttributes iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
- return ((iflags & MethodImplAttributes.Synchronized) != 0 ? 0 : 1);
+ MethodImplAttributes iflags;
+ iflags = typeof (Test).GetMethod ("test").GetMethodImplementationFlags ();
+ if ((iflags & MethodImplAttributes.Synchronized) == 0)
+ return 1;
+
+ iflags = typeof (Test).GetMethod ("test2").GetMethodImplementationFlags ();
+ if ((iflags & MethodImplAttributes.Synchronized) == 0)
+ return 2;
+
+ iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+ if ((iflags & MethodImplAttributes.Synchronized) == 0)
+ return 3;
+
+ iflags = typeof (Test).GetMethod ("test3").GetMethodImplementationFlags ();
+ if ((iflags & MethodImplAttributes.Synchronized) == 0)
+ return 4;
+
+ return 0;
}
}
-class T {
- public static int Main ()
+class Test
+{
+ static int test1 ()
{
- switch (1) {
- case 1:
- return 0;
- default:
- break;
+ var s = "Nice";
+ switch (s) {
+ case "HI":
+ const string x = "Nice";
+ return 1;
+ case x:
+ return 2;
}
+
+ return 3;
}
-}
+
+ public const string xx = "Not";
+ static int test2 ()
+ {
+ var s = "Nice";
+ switch (s) {
+ case "HI":
+ const string xx = "Nice";
+ return 1;
+ case xx:
+ return 2;
+ }
+
+ return 3;
+ }
+
+ static int Main ()
+ {
+ if (test1 () != 2)
+ return 1;
+
+ if (test2 () != 2)
+ return 2;
+
+ return 0;
+ }
+}
\ No newline at end of file
};
}
+ static Func<T> Catch_2<T> (T t) where T : Exception
+ {
+ T l = t;
+ return () => {
+ try {
+ throw new NotSupportedException ();
+ } catch (T e) {
+ return l;
+ } catch {
+ throw new ApplicationException ("Should not be reached");
+ }
+ };
+ }
+
static Func<T> Finally<T> (T t)
{
T l = t;
if (t5 () != 3)
return 5;
+ var ex = new NotSupportedException ();
+ var t5_2 = Catch_2 (ex);
+ if (t5_2 () != ex)
+ return 52;
+
var t6 = Finally (5);
if (t6 () != 0)
return 6;
--- /dev/null
+using System;
+
+namespace TestAnonSwitch
+{
+ public class MyClass
+ {
+ public event EventHandler<EventArgs> FirstEvent;
+ public event EventHandler<EventArgs> SecondEvent;
+
+ public void Trigger ()
+ {
+ if (FirstEvent != null)
+ FirstEvent (this, EventArgs.Empty);
+ }
+ }
+
+ public class Tester
+ {
+ MyClass myobj;
+
+ public void Test ()
+ {
+ myobj = new MyClass ();
+ var something = "key";
+
+ switch (something) {
+ case "key":
+ myobj.FirstEvent += (sender, e) => {
+ Console.WriteLine ("FirstEvent: {0}", myobj);
+ };
+ break;
+ case "somethingelse":
+ bool? woot = null;
+ myobj.SecondEvent += (sender, e) => {
+ Console.WriteLine ("woot {0}", woot);
+ };
+ break;
+ }
+
+ myobj.Trigger ();
+ }
+ }
+
+ class MainClass
+ {
+ public static void Main ()
+ {
+ var tester = new Tester ();
+ tester.Test ();
+ }
+ }
+}
--- /dev/null
+using System;
+using System.Threading.Tasks;
+
+class A
+{
+ public Task<int> OpenAsync ()
+ {
+ return Task.FromResult (0);
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ var c = new C ();
+ return c.Foo ().Result;
+ }
+
+ public A Connection
+ {
+ get
+ {
+ return new A ();
+ }
+ }
+
+ async Task<int> Foo ()
+ {
+ {
+ await Test (
+ async () => {
+ await Connection.OpenAsync ();
+ });
+ }
+
+ return 0;
+ }
+
+ T Test<T> (Func<T> func)
+ {
+ return func ();
+ }
+}
+
--- /dev/null
+using System;
+
+class C
+{
+ public static void Main ()
+ {
+ new C ().Test ();
+ }
+
+ void Test ()
+ {
+ var v = new View ();
+ v.Click += async (o, e) => {
+ var b = new Builder ();
+ b.SetButton (() => {
+ Console.WriteLine (this);
+ });
+ };
+ v.Run ();
+ }
+}
+
+class View
+{
+ public event EventHandler Click;
+
+ public void Run ()
+ {
+ Click (null, null);
+ }
+}
+
+class Builder
+{
+ public void SetButton (Action h)
+ {
+ h ();
+ }
+}
--- /dev/null
+using System.Threading.Tasks;
+using System;
+
+public class App
+{
+ X _x = new X ();
+
+ public async Task Test ()
+ {
+ await Task.Run (new Func<Task> (async () => _x.ToString ()));
+ }
+}
+
+class X
+{
+ public static void Main ()
+ {
+ var app = new App ();
+ app.Test ().Wait ();
+ }
+}
</sequencepoints>
<locals />
<scopes>
- <entry index="0" start="0x22" end="0x3c" />
+ <entry index="0" start="0x1" end="0x3c" />
<entry index="1" start="0x28" end="0x2d" />
</scopes>
</method>
</sequencepoints>
<locals />
<scopes>
- <entry index="0" start="0x28" end="0x38" />
+ <entry index="0" start="0x15" end="0x38" />
<entry index="1" start="0x2e" end="0x33" />
</scopes>
</method>
</sequencepoints>
<locals />
<scopes>
- <entry index="0" start="0xb3" end="0xd2" />
+ <entry index="0" start="0x1" end="0xd2" />
<entry index="1" start="0xb9" end="0xbe" />
</scopes>
</method>
</sequencepoints>
<locals />
<scopes>
- <entry index="0" start="0x2c" end="0x3b" />
+ <entry index="0" start="0x1" end="0x3b" />
</scopes>
</method>
<method token="0x600000f">
</type>\r
<type name="Test">\r
<method name="Int32 Main()" attrs="150">\r
- <size>1216</size>\r
+ <size>1292</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<method name="Void Assert[T](T, T, System.String)" attrs="145">\r
<size>99</size>\r
</method>\r
- <method name="Void Assert[T](IList`1, IList`1, System.String)" attrs="145">\r
- <size>257</size>\r
- </method>\r
<method name="Void AssertArgument(System.Runtime.CompilerServices.CallSiteBinder, Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo[], System.String)" attrs="145">\r
<size>172</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Tester">\r
+ <method name="Void Assert[T](System.Collections.Generic.IList`1[T], System.Collections.Generic.IList`1[T], System.String)" attrs="145">\r
+ <size>257</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="dtest-004.cs">\r
<type name="G`1[T]">\r
<method name="Int32 ConvertImplicitReturnTest()" attrs="129">\r
<size>83</size>\r
</method>\r
- <method name="IEnumerable`1 ConvertImplicitReturnTest_2()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="Void ConvertExplicitTest()" attrs="129">\r
<size>503</size>\r
</method>\r
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
- <size>14</size>\r
- </method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>154</size>\r
</method>\r
<method name="Void Reset()" attrs="486">\r
<size>6</size>\r
</method>\r
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+ <size>14</size>\r
+ </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="Int32 <>m__3()" attrs="131">\r
<size>81</size>\r
</method>\r
- <method name="Nullable`1 <>m__4()" attrs="131">\r
- <size>81</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Tester">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] ConvertImplicitReturnTest_2()" attrs="129">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<ConvertImplicitReturnTest_2>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<ConvertExplicitCheckedTest>c__AnonStorey3">\r
+ <method name="System.Nullable`1[System.UInt32] <>m__4()" attrs="131">\r
+ <size>81</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="dtest-007.cs">\r
<type name="D">\r
</method>\r
</type>\r
<type name="DynamicAssignments">\r
- <method name="Void Foo(IA`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>192</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Foo(IA`1[System.Object])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="dtest-018.cs">\r
</method>\r
</type>\r
<type name="C+<Main>c__DynamicSite1+Container0">\r
- <method name="System.Object Invoke(System.Runtime.CompilerServices.CallSite, Nullable`1 ByRef, System.Object)" attrs="454">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
<size>0</size>\r
</method>\r
</type>\r
+ <type name="C+<Main>c__DynamicSite1+Container0">\r
+ <method name="System.Object Invoke(System.Runtime.CompilerServices.CallSite, System.Nullable`1[System.Int32] ByRef, System.Object)" attrs="454">\r
+ <size>0</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="dtest-026.cs">\r
<type name="C">\r
<method name="Void M3[T,U](T, A`1[U])" attrs="145">\r
<size>2</size>\r
</method>\r
- <method name="Void M4[T,U](T, IEquatable`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>577</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void M4[T,U](T, System.IEquatable`1[U])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="dtest-031.cs">\r
</test>\r
<test name="dtest-040.cs">\r
<type name="A">\r
- <method name="S`2 Foo[U](U)" attrs="454">\r
- <size>18</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="B">\r
- <method name="S`2 Foo[T](T)" attrs="198">\r
- <size>38</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="A">\r
+ <method name="S`2[U,System.Object] Foo[U](U)" attrs="454">\r
+ <size>18</size>\r
+ </method>\r
+ </type>\r
+ <type name="B">\r
+ <method name="S`2[T,System.Object] Foo[T](T)" attrs="198">\r
+ <size>38</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="dtest-041.cs">\r
<type name="A`1[AA]">\r
</test>\r
<test name="dtest-044.cs">\r
<type name="C">\r
- <method name="Int32 Test[T,U](T, IComparable`1)" attrs="150">\r
- <size>10</size>\r
- </method>\r
- <method name="Int32 Test_2[T](IList`1, T)" attrs="150">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>868</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Int32 Test[T,U](T, System.IComparable`1[U])" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Int32 Test_2[T](System.Collections.Generic.IList`1[T], T)" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="dtest-045.cs">\r
<method name="Void CLSCompliantMethod(System.Object[])" attrs="134">\r
<size>2</size>\r
</method>\r
- <method name="Void CLSCompliantMethod(IEnumerable`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void CLSCompliantMethod(System.Collections.Generic.IEnumerable`1[System.Object])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="dtest-collectioninit-01.cs">\r
</test>\r
<test name="dtest-iter-01.cs">\r
<type name="Program">\r
- <method name="IEnumerable`1 D1()" attrs="150">\r
- <size>23</size>\r
- </method>\r
- <method name="IEnumerable`1 D2()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<dynamic>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<System.Func<dynamic>>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Program">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] D1()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Func`1[System.Object]] D2()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Program+<D1>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<dynamic>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Program+<D2>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Func`1[System.Object]] System.Collections.Generic.IEnumerable<System.Func<dynamic>>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="dtest-named-01.cs">\r
<type name="Test">\r
</test>\r
<test name="gtest-032.cs">\r
<type name="X">\r
- <method name="Void Test(Bar`2)" attrs="145">\r
- <size>25</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Test(Bar`2[System.Int32,System.String])" attrs="145">\r
+ <size>25</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-033.cs">\r
<type name="X">\r
- <method name="Void Test(Bar`3)" attrs="145">\r
- <size>36</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Test(Bar`3[System.Int64,System.Int32,System.String])" attrs="145">\r
+ <size>36</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-034.cs">\r
<method name="T get_Name()" attrs="2182">\r
<size>15</size>\r
</method>\r
- <method name="IMonkey`1 GetTheMonkey[U](U)" attrs="134">\r
- <size>16</size>\r
- </method>\r
<method name="Void .ctor(T)" attrs="6278">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Zoo`1[T]">\r
+ <method name="IMonkey`1[U] GetTheMonkey[U](U)" attrs="134">\r
+ <size>16</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-040.cs">\r
<type name="Stack`1[T]">\r
- <method name="INode`1 GetNode()" attrs="134">\r
- <size>15</size>\r
- </method>\r
<method name="Stack`1+Foo`1[T,T] GetFoo(T)" attrs="134">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Stack`1[T]">\r
+ <method name="INode`1[T] GetNode()" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-041.cs">\r
<type name="Stack`1[T]">\r
<method name="Void Print(T)" attrs="486">\r
<size>18</size>\r
</method>\r
- <method name="IHello`1 Test[U]()" attrs="486">\r
- <size>14</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Hello`1[T]">\r
+ <method name="IHello`1[U] Test[U]()" attrs="486">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-058.cs">\r
<type name="Foo">\r
</test>\r
<test name="gtest-062.cs">\r
<type name="X">\r
- <method name="IEnumerable`1 Test(Int32, Int64)" attrs="134">\r
- <size>44</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>95</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>116</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="X">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test(Int32, Int64)" attrs="134">\r
+ <size>44</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-063.cs">\r
<type name="Test">\r
</test>\r
<test name="gtest-064.cs">\r
<type name="Foo`1[T]">\r
- <method name="IHello`1 IFoo<T>.GetHello()" attrs="481">\r
- <size>15</size>\r
- </method>\r
<method name="Foo`1+Hello[T] GetHello()" attrs="134">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo`1[T]">\r
+ <method name="IHello`1[T] IFoo<T>.GetHello()" attrs="481">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-065.cs">\r
<type name="ComparablePair`2[T,U]">\r
- <method name="Int32 CompareTo(ComparablePair`2)" attrs="486">\r
- <size>76</size>\r
- </method>\r
- <method name="Boolean Equals(ComparablePair`2)" attrs="134">\r
- <size>81</size>\r
- </method>\r
<method name="System.String ToString()" attrs="198">\r
<size>72</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="ComparablePair`2[T,U]">\r
+ <method name="Int32 CompareTo(ComparablePair`2[T,U])" attrs="486">\r
+ <size>76</size>\r
+ </method>\r
+ <method name="Boolean Equals(ComparablePair`2[T,U])" attrs="134">\r
+ <size>81</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-066.cs">\r
<type name="Foo`1[T]">\r
</test>\r
<test name="gtest-069.cs">\r
<type name="Test`1[T]">\r
- <method name="Int32 Foo(IFoo`1)" attrs="134">\r
- <size>15</size>\r
- </method>\r
<method name="Int32 Foo(IFoo)" attrs="134">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test`1[T]">\r
+ <method name="Int32 Foo(IFoo`1[T])" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-070.cs">\r
<type name="Martin.Test`1[T]">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="MyList`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-074.cs">\r
<type name="Foo`1[T]">\r
</method>\r
</type>\r
<type name="Test`1[T]">\r
- <method name="Foo`1 GetFoo(T)" attrs="134">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test`1[T]">\r
+ <method name="Foo`1[T] GetFoo(T)" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-078.cs">\r
<type name="S">\r
</test>\r
<test name="gtest-080.cs">\r
<type name="Test">\r
- <method name="Void Hello[T](IFoo`1)" attrs="134">\r
- <size>9</size>\r
- </method>\r
- <method name="Void InsertAll[U](IFoo`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Void Hello[T](IFoo`1[T])" attrs="134">\r
+ <size>9</size>\r
+ </method>\r
+ <method name="Void InsertAll[U](IFoo`1[U])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-081.cs">\r
<type name="ArrayList`1[T]">\r
</test>\r
<test name="gtest-084.cs">\r
<type name="HasherBuilder.ByPrototype`1[S]">\r
- <method name="IHasher`1 Examine()" attrs="150">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="ArrayList`1[U]">\r
- <method name="IHasher`1 GetHasher()" attrs="134">\r
- <size>14</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-085.cs">\r
- <type name="ArrayList`1[T]">\r
- <method name="Int32 InsertAll(IFoo`1)" attrs="454">\r
- <size>10</size>\r
- </method>\r
- <method name="Int32 InsertAll[U](IFoo`1)" attrs="454">\r
+ <type name="HasherBuilder.ByPrototype`1[S]">\r
+ <method name="IHasher`1[S] Examine()" attrs="150">\r
<size>10</size>\r
</method>\r
- <method name="Int32 AddAll(IFoo`1)" attrs="454">\r
- <size>16</size>\r
+ </type>\r
+ <type name="ArrayList`1[U]">\r
+ <method name="IHasher`1[U] GetHasher()" attrs="134">\r
+ <size>14</size>\r
</method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-085.cs">\r
+ <type name="ArrayList`1[T]">\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-086.cs">\r
<type name="ArrayList`1[T]">\r
- <method name="Int32 InsertAll(IFoo`1)" attrs="454">\r
+ <method name="Int32 InsertAll(IFoo`1[T])" attrs="454">\r
<size>10</size>\r
</method>\r
- <method name="Int32 InsertAll[U](IFoo`1)" attrs="454">\r
+ <method name="Int32 InsertAll[U](IFoo`1[U])" attrs="454">\r
<size>10</size>\r
</method>\r
- <method name="Int32 AddAll(IFoo`1)" attrs="454">\r
+ <method name="Int32 AddAll(IFoo`1[T])" attrs="454">\r
<size>16</size>\r
</method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-086.cs">\r
+ <type name="ArrayList`1[T]">\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="ArrayList`1[T]">\r
+ <method name="Int32 InsertAll(IFoo`1[T])" attrs="454">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Int32 InsertAll[U](IFoo`1[U])" attrs="454">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Int32 AddAll(IFoo`1[T])" attrs="454">\r
+ <size>16</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-087.cs">\r
<type name="C5.HashedArrayList`1[T]">\r
</test>\r
<test name="gtest-095.cs">\r
<type name="GuardedCollectionValue`1[T]">\r
- <method name="IDirectedEnumerable`1 IDirectedEnumerable<T>.Backwards()" attrs="481">\r
- <size>10</size>\r
- </method>\r
- <method name="IDirectedCollectionValue`1 Backwards()" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="GuardedSequenced`1[T]">\r
- <method name="IDirectedCollectionValue`1 Test()" attrs="134">\r
- <size>20</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="GuardedCollectionValue`1[T]">\r
+ <method name="IDirectedEnumerable`1[T] IDirectedEnumerable<T>.Backwards()" attrs="481">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="IDirectedCollectionValue`1[T] Backwards()" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="GuardedSequenced`1[T]">\r
+ <method name="IDirectedCollectionValue`1[T] Test()" attrs="134">\r
+ <size>20</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-096.cs">\r
<type name="Foo`1[T]">\r
</method>\r
</type>\r
<type name="Hello">\r
- <method name="Void World[U](U, IFoo`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
- <method name="Void World[V](IFoo`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Void Test(Foo)" attrs="134">\r
<size>21</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Hello">\r
+ <method name="Void World[U](U, IFoo`1[U])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void World[V](IFoo`1[V])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-104.cs">\r
<type name="MainClass">\r
</method>\r
</type>\r
<type name="A.KeyValuePairComparer`2[K,V]">\r
- <method name="Int32 Compare(KeyValuePair`2)" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="A.KeyValuePairComparer`2[K,V]">\r
+ <method name="Int32 Compare(A.KeyValuePair`2[K,V])" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-106.cs">\r
<type name="KeyValuePair`2[X,Y]">\r
</method>\r
</type>\r
<type name="KeyValuePairComparer`2[K,V]">\r
- <method name="Int32 Compare(KeyValuePair`2)" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="KeyValuePairComparer`2[K,V]">\r
+ <method name="Int32 Compare(KeyValuePair`2[K,V])" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-107.cs">\r
<type name="Mapper`2[T,V]">\r
</test>\r
<test name="gtest-108.cs">\r
<type name="Test`1[T]">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor(T)" attrs="6278">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-109.cs">\r
<type name="X">\r
</test>\r
<test name="gtest-112.cs">\r
<type name="IC">\r
- <method name="Void Compare(Foo`1)" attrs="486">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</method>\r
</type>\r
<type name="List`1[T]">\r
- <method name="Void Sort(IComparer`1, T)" attrs="454">\r
- <size>9</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Sorting">\r
- <method name="Void IntroSort[T](IComparer`1, T)" attrs="150">\r
- <size>16</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="IC">\r
+ <method name="Void Compare(Foo`1[System.Int32])" attrs="486">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
+ <type name="List`1[T]">\r
+ <method name="Void Sort(IComparer`1[T], T)" attrs="454">\r
+ <size>9</size>\r
+ </method>\r
+ </type>\r
+ <type name="Sorting">\r
+ <method name="Void IntroSort[T](IComparer`1[T], T)" attrs="150">\r
+ <size>16</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-113.cs">\r
<type name="Mapper`2[T,V]">\r
<method name="LinkedList`1[T] op_Addition(LinkedList`1[T], LinkedList`1[T])" attrs="2198">\r
<size>135</size>\r
</method>\r
- <method name="IMyList`1 Map[U](Mapper`2[T,U])" attrs="486">\r
- <size>78</size>\r
- </method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>31</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="LinkedList`1[T]">\r
+ <method name="IMyList`1[U] Map[U](Mapper`2[T,U])" attrs="486">\r
+ <size>78</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-116.cs">\r
<type name="Slow.Test">\r
<method name="Int32 TestC()" attrs="150">\r
<size>46</size>\r
</method>\r
- <method name="Boolean Check1(Nullable`1)" attrs="145">\r
- <size>16</size>\r
- </method>\r
<method name="Boolean Check2[T](E)" attrs="145">\r
<size>23</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Boolean Check1(System.Nullable`1[E])" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-118.cs">\r
</method>\r
</type>\r
<type name="Sequenced`1[T]">\r
- <method name="Boolean Equals(ISequenced`1)" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Sequenced`1[T]">\r
+ <method name="Boolean Equals(ISequenced`1[T])" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-121.cs">\r
<type name="B`1[T]">\r
</method>\r
</type>\r
<type name="M">\r
- <method name="System.Collections.Generic.List`1[T] foo1[T](Filter`1)" attrs="145">\r
- <size>46</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>46</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.List`1[T] foo1[T](Filter`1[T])" attrs="145">\r
+ <size>46</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-127.cs">\r
<test name="gtest-130.cs">\r
<type name="MyTest">\r
<method name="Void Main(System.String[])" attrs="150">\r
- <size>938</size>\r
+ <size>908</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<test name="gtest-131.cs">\r
<type name="MyTest">\r
<method name="Void Main(System.String[])" attrs="150">\r
- <size>1332</size>\r
+ <size>1300</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</test>\r
<test name="gtest-132.cs">\r
<type name="MyTest">\r
- <method name="Nullable`1 Sqrt(Nullable`1)" attrs="150">\r
- <size>68</size>\r
- </method>\r
<method name="Void Main(System.String[])" attrs="150">\r
<size>64</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Nullable`1[System.Int32] Sqrt(System.Nullable`1[System.Int32])" attrs="150">\r
+ <size>68</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-133.cs">\r
<test name="gtest-137.cs">\r
<type name="X">\r
<method name="Int32 Main()" attrs="150">\r
- <size>158</size>\r
+ <size>240</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<test name="gtest-138.cs">\r
<type name="X">\r
<method name="Void Main()" attrs="150">\r
- <size>62</size>\r
+ <size>102</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</type>\r
</test>\r
<test name="gtest-139.cs">\r
+ <type name="Test">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>78</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
<type name="MyStruct">\r
- <method name="Int32 op_Inequality(Nullable`1, System.String)" attrs="2198">\r
+ <method name="Int32 op_Inequality(System.Nullable`1[MyStruct], System.String)" attrs="2198">\r
<size>10</size>\r
</method>\r
- <method name="Int32 op_Equality(Nullable`1, System.String)" attrs="2198">\r
+ <method name="Int32 op_Equality(System.Nullable`1[MyStruct], System.String)" attrs="2198">\r
<size>10</size>\r
</method>\r
- <method name="Int32 op_Inequality(System.String, Nullable`1)" attrs="2198">\r
+ <method name="Int32 op_Inequality(System.String, System.Nullable`1[MyStruct])" attrs="2198">\r
<size>11</size>\r
</method>\r
- <method name="Int32 op_Equality(System.String, Nullable`1)" attrs="2198">\r
+ <method name="Int32 op_Equality(System.String, System.Nullable`1[MyStruct])" attrs="2198">\r
<size>10</size>\r
</method>\r
</type>\r
- <type name="Test">\r
- <method name="Int32 Main()" attrs="150">\r
- <size>78</size>\r
- </method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
- </type>\r
</test>\r
<test name="gtest-140.cs">\r
<type name="X">\r
<method name="Void IsFalse(System.String, Boolean)" attrs="150">\r
<size>19</size>\r
</method>\r
- <method name="Void IsNull[T](System.String, Nullable`1)" attrs="150">\r
- <size>25</size>\r
- </method>\r
- <method name="Void IsNotNull[T](System.String, Nullable`1)" attrs="150">\r
- <size>25</size>\r
- </method>\r
- <method name="Void IsTrue(System.String, Nullable`1)" attrs="150">\r
- <size>37</size>\r
- </method>\r
- <method name="Void IsFalse(System.String, Nullable`1)" attrs="150">\r
- <size>37</size>\r
- </method>\r
<method name="Void .cctor()" attrs="6289">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="X">\r
<method name="Int32 Main()" attrs="150">\r
- <size>2253</size>\r
+ <size>2163</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Assert">\r
+ <method name="Void IsNull[T](System.String, System.Nullable`1[T])" attrs="150">\r
+ <size>25</size>\r
+ </method>\r
+ <method name="Void IsNotNull[T](System.String, System.Nullable`1[T])" attrs="150">\r
+ <size>25</size>\r
+ </method>\r
+ <method name="Void IsTrue(System.String, System.Nullable`1[System.Boolean])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ <method name="Void IsFalse(System.String, System.Nullable`1[System.Boolean])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-143.cs">\r
<type name="X">\r
<method name="Int32 Index()" attrs="145">\r
<size>34</size>\r
</method>\r
- <method name="Nullable`1 get_Item(Int32)" attrs="2177">\r
- <size>15</size>\r
- </method>\r
- <method name="Void set_Item(Int32, Nullable`1)" attrs="2177">\r
- <size>9</size>\r
- </method>\r
<method name="Int32 Test()" attrs="145">\r
- <size>1157</size>\r
+ <size>1276</size>\r
</method>\r
<method name="Int32 Main()" attrs="150">\r
<size>38</size>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Nullable`1[System.Int32] get_Item(Int32)" attrs="2177">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Void set_Item(Int32, System.Nullable`1[System.Int32])" attrs="2177">\r
+ <size>9</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-144.cs">\r
<method name="IFoo IFoo.Hello()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IFoo`1 Hello()" attrs="1478">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</method>\r
</type>\r
<type name="HashBag`1[T]">\r
- <method name="IFoo`1 Hello()" attrs="198">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="EnumerableBase`1[T]">\r
+ <method name="IFoo`1[T] Hello()" attrs="1478">\r
+ <size>0</size>\r
+ </method>\r
+ </type>\r
+ <type name="HashBag`1[T]">\r
+ <method name="IFoo`1[T] Hello()" attrs="198">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-153.cs">\r
<type name="MyClass`1[T]">\r
</test>\r
<test name="gtest-163.cs">\r
<type name="Foo`1[T]">\r
- <method name="IEnumerator`1 getEnumerator(Int32)" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] getEnumerator(Int32)" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-164.cs">\r
<type name="Int2Int">\r
</method>\r
</type>\r
<type name="FunEnumerable">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor(Int32, Int2Int)" attrs="6278">\r
<size>22</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="FunEnumerable">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-165.cs">\r
<type name="C">\r
</method>\r
</type>\r
<type name="X`1[T]">\r
- <method name="IEnumerator`1 Y(IEnumerable`1)" attrs="150">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] Y(System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
<size>15</size>\r
</method>\r
- <method name="T Z(IList`1, Int32)" attrs="150">\r
+ <method name="T Z(System.Collections.Generic.IList`1[T], Int32)" attrs="150">\r
<size>16</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
</type>\r
</test>\r
<test name="gtest-178.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>168</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-182.cs">\r
</test>\r
<test name="gtest-183.cs">\r
<type name="test.Test`1[T]">\r
- <method name="IEnumerable`1 Lookup(T)" attrs="134">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>91</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="test.Test`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Lookup(T)" attrs="134">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="test.Test`1+<Lookup>c__Iterator0[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-184.cs">\r
<type name="X">\r
</type>\r
</test>\r
<test name="gtest-191.cs">\r
- <type name="Test1.Test">\r
- <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
- <size>23</size>\r
- </method>\r
- </type>\r
<type name="Test2.Test`1[S]">\r
- <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test3.Test`1[S]">\r
- <method name="IEnumerable`1 Replace[T](IEnumerable`1, IEnumerable`1)" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test4.Test">\r
- <method name="IEnumerable`1 Replace[T]()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test5.Test">\r
- <method name="IEnumerable`1 Replace[T](T)" attrs="150">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test6.Test">\r
- <method name="IEnumerable`1 Replace[T](T)" attrs="150">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test7.Test">\r
- <method name="IEnumerable`1 Replace[T](T[])" attrs="150">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
</method>\r
</type>\r
<type name="Test3.Test`1+<Replace>c__Iterator2`1[S,T]">\r
- <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<S,T>>.get_Current()" attrs="2529">\r
- <size>14</size>\r
- </method>\r
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
<size>19</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<S,T>>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>77</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>89</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T[]>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>89</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test1.Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test2.Test`1[S]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test3.Test`1[S]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Collections.Generic.KeyValuePair`2[S,T]] Replace[T](System.Collections.Generic.IEnumerable`1[T], System.Collections.Generic.IEnumerable`1[S])" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test4.Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T]()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test5.Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test6.Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Replace[T](T)" attrs="150">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test7.Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T[]] Replace[T](T[])" attrs="150">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test1.Test+<Replace>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test2.Test`1+<Replace>c__Iterator1`1[S,T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test3.Test`1+<Replace>c__Iterator2`1[S,T]">\r
+ <method name="System.Collections.Generic.KeyValuePair`2[S,T] System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<S,T>>.get_Current()" attrs="2529">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[S,T]] System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<S,T>>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test4.Test+<Replace>c__Iterator3`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test5.Test+<Replace>c__Iterator4`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test6.Test+<Replace>c__Iterator5`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test7.Test+<Replace>c__Iterator6`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T[]] System.Collections.Generic.IEnumerable<T[]>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-192.cs">\r
<type name="xX">\r
</test>\r
<test name="gtest-193.cs">\r
<type name="OrderedMultiDictionary`2[T,U]">\r
- <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
- <size>29</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="RedBlackTree`1[S]">\r
- <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<S>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-194.cs">\r
+ <type name="OrderedMultiDictionary`2[T,U]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
+ <size>29</size>\r
+ </method>\r
+ </type>\r
<type name="RedBlackTree`1[S]">\r
- <method name="IEnumerable`1 EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
+ <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
<size>23</size>\r
</method>\r
+ </type>\r
+ <type name="RedBlackTree`1+<EnumerateRange>c__Iterator1[S]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable<S>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-194.cs">\r
+ <type name="RedBlackTree`1[S]">\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</method>\r
</type>\r
<type name="OrderedMultiDictionary`2[T,U]">\r
- <method name="IEnumerator`1 EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
- <size>29</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<S>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="RedBlackTree`1[S]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[S] EnumerateRange(RedBlackTree`1+RangeTester[S])" attrs="134">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="OrderedMultiDictionary`2[T,U]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] EnumerateKeys(RedBlackTree`1+RangeTester[System.Collections.Generic.KeyValuePair`2[T,U]])" attrs="129">\r
+ <size>29</size>\r
+ </method>\r
+ </type>\r
+ <type name="RedBlackTree`1+<EnumerateRange>c__Iterator0[S]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[S] System.Collections.Generic.IEnumerable<S>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-195.cs">\r
<type name="OrderedMultiDictionary`2[T,U]">\r
<method name="Int64 Test()" attrs="134">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor(Int64)" attrs="6278">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="HashSet`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int64] GetEnumerator()" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-202.cs">\r
<type name="Generic`1[T]">\r
<method name="Ret Foo()" attrs="454">\r
<size>10</size>\r
</method>\r
- <method name="Ret`1 Foo[T]()" attrs="454">\r
- <size>10</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="Ret Foo()" attrs="198">\r
<size>10</size>\r
</method>\r
- <method name="Ret`1 Foo[T]()" attrs="198">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="BaseClass">\r
+ <method name="Ret`1[T] Foo[T]()" attrs="454">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="DerivedClass">\r
+ <method name="Ret`1[T] Foo[T]()" attrs="198">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-217.cs">\r
<type name="Fun`2[A1,R]">\r
<method name="Void Main(System.String[])" attrs="150">\r
<size>99</size>\r
</method>\r
- <method name="IEnumerable`1 Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], IEnumerable`1)" attrs="150">\r
- <size>37</size>\r
- </method>\r
- <method name="IEnumerable`1 FromTo(Int32, Int32)" attrs="150">\r
- <size>37</size>\r
- </method>\r
<method name="System.String <Main>m__0(Int32)" attrs="145">\r
<size>22</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Rr>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>215</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>125</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="MyTest">\r
+ <method name="System.Collections.Generic.IEnumerable`1[Rr] Map[Aa,Af,Rf,Rr](Fun`2[Af,Rf], System.Collections.Generic.IEnumerable`1[Aa])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="MyTest+<Map>c__Iterator0`4[Aa,Af,Rf,Rr]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Rr] System.Collections.Generic.IEnumerable<Rr>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
+ <type name="MyTest+<FromTo>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-218.cs">\r
<type name="Foo">\r
</test>\r
<test name="gtest-225.cs">\r
<type name="Set`1[Element]">\r
- <method name="Locator locate(Element)" attrs="132">\r
- <size>39</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>8</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Set`1[Element]">\r
+ <method name="Set`1+Locator[Element] locate(Element)" attrs="132">\r
+ <size>39</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-226.cs">\r
<type name="Container`1[T]">\r
<method name="IFoo GetFoo()" attrs="134">\r
<size>15</size>\r
</method>\r
- <method name="IFoo`1 GetFooGeneric[T]()" attrs="134">\r
- <size>10</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>15</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="IFoo`1[T] GetFooGeneric[T]()" attrs="134">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-235.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="1478">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
<method name="Void raiseItemsAdded(T, Int32)" attrs="452">\r
<size>2</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="1222">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</method>\r
</type>\r
<type name="CircularQueue`1[T]">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void Enqueue(T)" attrs="454">\r
<size>2</size>\r
</method>\r
<method name="Boolean searchoradd(T ByRef, Boolean, Boolean, Boolean)" attrs="129">\r
<size>10</size>\r
</method>\r
- <method name="Void RemoveAll[U](IEnumerable`1)" attrs="454">\r
- <size>8</size>\r
- </method>\r
- <method name="Void AddAll[U](IEnumerable`1)" attrs="454">\r
- <size>65</size>\r
- </method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="EnumerableBase`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1478">\r
+ <size>0</size>\r
+ </method>\r
+ </type>\r
+ <type name="CollectionValueBase`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1222">\r
+ <size>0</size>\r
+ </method>\r
+ </type>\r
+ <type name="CircularQueue`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="HashSet`1[T]">\r
+ <method name="Void RemoveAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="454">\r
+ <size>8</size>\r
+ </method>\r
+ <method name="Void AddAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="454">\r
+ <size>65</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-248.cs">\r
<type name="Foo`1[T]">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="1478">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="ArrayBase`1[T]">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="HashedArrayList`1[T]">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="EnumerableBase`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="1478">\r
+ <size>0</size>\r
+ </method>\r
+ </type>\r
+ <type name="ArrayBase`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="HashedArrayList`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-250.cs">\r
<type name="Fun`2[R,S]">\r
</method>\r
</type>\r
<type name="GuardedIndexedSorted`1[T]">\r
- <method name="IIndexedSorted`1 Map[V](Fun`2[T,V])" attrs="486">\r
- <size>21</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="GuardedIndexedSorted`1[T]">\r
+ <method name="IIndexedSorted`1[V] Map[V](Fun`2[T,V])" attrs="486">\r
+ <size>21</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-251.cs">\r
<type name="SortedIndexedTester`1[T]">\r
- <method name="Void Test(ISorted`1)" attrs="134">\r
- <size>25</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="SortedIndexedTester`1[T]">\r
+ <method name="Void Test(ISorted`1[System.Int32])" attrs="134">\r
+ <size>25</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-252.cs">\r
<type name="EqualityComparer`1[T]">\r
</method>\r
</type>\r
<type name="Extensible`1[V]">\r
- <method name="Void AddAll[W](IEnumerable`1)" attrs="486">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Extensible`1[V]">\r
+ <method name="Void AddAll[W](System.Collections.Generic.IEnumerable`1[W])" attrs="486">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-254.cs">\r
<type name="HashedLinkedList`1[T]">\r
</test>\r
<test name="gtest-256.cs">\r
<type name="Test">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>12</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] GetEnumerator()" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-257.cs">\r
<type name="Tests">\r
</method>\r
</type>\r
<type name="ConvertHelper">\r
- <method name="IEnumerator`1 Test[S,T](S)" attrs="150">\r
- <size>22</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="ConvertHelper">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] Test[S,T](S)" attrs="150">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-264.cs">\r
<type name="BaseList`1[SubType]">\r
</test>\r
<test name="gtest-269.cs">\r
<type name="IrishPub">\r
- <method name="Int64 op_Implicit(Nullable`1)" attrs="2198">\r
- <size>44</size>\r
- </method>\r
- <method name="Nullable`1 op_Implicit(Int64)" attrs="2198">\r
- <size>21</size>\r
- </method>\r
<method name="Void .ctor(IrishBeer)" attrs="6278">\r
<size>9</size>\r
</method>\r
</type>\r
<type name="X">\r
- <method name="Int32 Beer(Nullable`1)" attrs="145">\r
- <size>72</size>\r
- </method>\r
<method name="Int64 PubToLong(IrishPub)" attrs="145">\r
<size>20</size>\r
</method>\r
- <method name="Int32 Test(Nullable`1)" attrs="145">\r
- <size>62</size>\r
- </method>\r
- <method name="Int32 TestWithNull(Nullable`1)" attrs="145">\r
- <size>78</size>\r
- </method>\r
- <method name="Nullable`1 Foo(Boolean)" attrs="145">\r
- <size>37</size>\r
- </method>\r
<method name="Int32 Test(Boolean)" attrs="145">\r
<size>72</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-270.cs">\r
+ <type name="IrishPub">\r
+ <method name="Int64 op_Implicit(System.Nullable`1[IrishPub])" attrs="2198">\r
+ <size>44</size>\r
+ </method>\r
+ <method name="System.Nullable`1[IrishPub] op_Implicit(Int64)" attrs="2198">\r
+ <size>21</size>\r
+ </method>\r
+ </type>\r
<type name="X">\r
- <method name="Int32 Test(Nullable`1)" attrs="145">\r
+ <method name="Int32 Beer(System.Nullable`1[IrishPub])" attrs="145">\r
+ <size>72</size>\r
+ </method>\r
+ <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="145">\r
<size>62</size>\r
</method>\r
+ <method name="Int32 TestWithNull(System.Nullable`1[System.Int32])" attrs="145">\r
+ <size>78</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Int64] Foo(Boolean)" attrs="145">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-270.cs">\r
+ <type name="X">\r
<method name="Int32 Main()" attrs="150">\r
<size>60</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="145">\r
+ <size>62</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-271.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Qux`2[X,V]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[V] GetEnumerator()" attrs="486">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-272.cs">\r
<type name="Handler`1[T]">\r
</method>\r
</type>\r
<type name="X">\r
- <method name="Void Main()" attrs="150">\r
- <size>448</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S">\r
+ <method name="System.Nullable`1[System.Boolean] op_Implicit(S)" attrs="2198">\r
+ <size>12</size>\r
+ </method>\r
+ </type>\r
+ <type name="X">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>612</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-275.cs">\r
<type name="Test">\r
</method>\r
</type>\r
<type name="Tests+GenericClass`1[T]">\r
- <method name="T Z(IList`1, Int32)" attrs="150">\r
- <size>16</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="T Z(System.Collections.Generic.IList`1[T], Int32)" attrs="150">\r
+ <size>16</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-277.cs">\r
<method name="Void Bar()" attrs="486">\r
<size>12</size>\r
</method>\r
- <method name="IList`1 Bar[T]()" attrs="486">\r
- <size>20</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo">\r
+ <method name="System.Collections.Generic.IList`1[T] Bar[T]()" attrs="486">\r
+ <size>20</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-280.cs">\r
<type name="Test">\r
</test>\r
<test name="gtest-281.cs">\r
<type name="List">\r
- <method name="Void AddRange[T](ICollection`1)" attrs="131">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="List">\r
+ <method name="Void AddRange[T](System.Collections.Generic.ICollection`1[T])" attrs="131">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-282.cs">\r
<type name="Foo">\r
</method>\r
</type>\r
<type name="CollectionTester">\r
- <method name="Int32 Test[T](IList`1)" attrs="145">\r
- <size>95</size>\r
- </method>\r
<method name="Int32 Test()" attrs="150">\r
<size>628</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="CollectionTester">\r
+ <method name="Int32 Test[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+ <size>95</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-285.cs">\r
<type name="A">\r
<method name="Void Main()" attrs="150">\r
<size>23</size>\r
</method>\r
- <method name="System.String Test2(Nullable`1)" attrs="145">\r
- <size>14</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.String Test2(System.Nullable`1[System.Decimal])" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-292.cs">\r
<method name="Void Invalid(T)" attrs="134">\r
<size>22</size>\r
</method>\r
- <method name="Void Other(IEnumerable`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test`1[T]">\r
+ <method name="Void Other(System.Collections.Generic.IEnumerable`1[T])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-294.cs">\r
<type name="A">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-303.cs">\r
<type name="test.BaseClass">\r
</test>\r
<test name="gtest-310.cs">\r
<type name="MonoBugs.IncompleteGenericInference">\r
- <method name="Void DoSomethingGeneric[T1,T2](IEnumerable`1, IDictionary`2)" attrs="150">\r
- <size>2</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>21</size>\r
</method>\r
+ <method name="Void DoSomethingGeneric[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IDictionary`2[T1,T2])" attrs="150">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-312.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Temp`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Temp`1+Foo[T]] GetEnumerator()" attrs="486">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-320.cs">\r
<type name="Foo`1[K]">\r
</test>\r
<test name="gtest-330.cs">\r
<type name="BaseCollection`1[T]">\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>25</size>\r
- </method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>25</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="BaseCollection`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>25</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-331.cs">\r
<type name="Foo`1[T]">\r
<method name="Void Main()" attrs="150">\r
<size>14</size>\r
</method>\r
- <method name="Void Foo[T](IList`1)" attrs="145">\r
- <size>26</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="FooList`1[T]">\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>7</size>\r
- </method>\r
<method name="Int32 IndexOf(T)" attrs="486">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Void Foo[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="FooList`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-339.cs">\r
<type name="Program">\r
<method name="Void SerializeDictionary(IDictionary)" attrs="145">\r
<size>2</size>\r
</method>\r
- <method name="Void SerializeDictionary(IDictionary`2)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="SerializerLazyDictionary">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="196">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="Boolean System.Collections.Generic.IDictionary<string,object>.ContainsKey(System.String)" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="ICollection`1 System.Collections.Generic.IDictionary<string,object>.get_Keys()" attrs="2529">\r
- <size>7</size>\r
- </method>\r
<method name="Boolean System.Collections.Generic.IDictionary<string,object>.Remove(System.String)" attrs="481">\r
<size>7</size>\r
</method>\r
<method name="Boolean System.Collections.Generic.IDictionary<string,object>.TryGetValue(System.String, System.Object ByRef)" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="ICollection`1 System.Collections.Generic.IDictionary<string,object>.get_Values()" attrs="2529">\r
- <size>7</size>\r
- </method>\r
<method name="System.Object System.Collections.Generic.IDictionary<string,object>.get_Item(System.String)" attrs="2529">\r
<size>7</size>\r
</method>\r
<method name="Void System.Collections.Generic.IDictionary<string,object>.set_Item(System.String, System.Object)" attrs="2529">\r
<size>7</size>\r
</method>\r
- <method name="Void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Add(KeyValuePair`2)" attrs="481">\r
- <size>7</size>\r
- </method>\r
<method name="Void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Clear()" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="Boolean System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Contains(KeyValuePair`2)" attrs="481">\r
- <size>7</size>\r
- </method>\r
<method name="Void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.CopyTo(System.Collections.Generic.KeyValuePair`2[System.String,System.Object][], Int32)" attrs="481">\r
<size>7</size>\r
</method>\r
<method name="Boolean System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.get_IsReadOnly()" attrs="2529">\r
<size>7</size>\r
</method>\r
- <method name="Boolean System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Remove(KeyValuePair`2)" attrs="481">\r
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>.GetEnumerator()" attrs="481">\r
- <size>15</size>\r
+ </type>\r
+ <type name="Program">\r
+ <method name="Void SerializeDictionary(System.Collections.Generic.IDictionary`2[System.String,System.Object])" attrs="145">\r
+ <size>2</size>\r
</method>\r
- <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
- <size>15</size>\r
+ </type>\r
+ <type name="SerializerLazyDictionary">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] GetEnumerator()" attrs="196">\r
+ <size>10</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="1476">\r
- <size>0</size>\r
+ </type>\r
+ <type name="LazyDictionary">\r
+ <method name="System.Collections.Generic.ICollection`1[System.String] System.Collections.Generic.IDictionary<string,object>.get_Keys()" attrs="2529">\r
+ <size>7</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6276">\r
+ <method name="System.Collections.Generic.ICollection`1[System.Object] System.Collections.Generic.IDictionary<string,object>.get_Values()" attrs="2529">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Add(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
<size>7</size>\r
</method>\r
+ <method name="Boolean System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Contains(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Boolean System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>.Remove(System.Collections.Generic.KeyValuePair`2[System.String,System.Object])" attrs="481">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>.GetEnumerator()" attrs="481">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] GetEnumerator()" attrs="1476">\r
+ <size>0</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-340.cs">\r
<method name="IEnumerable Enumerable(Int32)" attrs="134">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerable`1 Enumerable[T](System.String)" attrs="134">\r
- <size>7</size>\r
- </method>\r
<method name="IEnumerable Enumerable(System.String)" attrs="134">\r
<size>7</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Enumerable[T](System.String)" attrs="134">\r
+ <size>7</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-348.cs">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="S2">\r
- <method name="Boolean op_Equality(S2, Nullable`1)" attrs="2198">\r
- <size>7</size>\r
- </method>\r
- <method name="Boolean op_Inequality(S2, Nullable`1)" attrs="2198">\r
- <size>7</size>\r
- </method>\r
- </type>\r
<type name="S3">\r
<method name="Decimal op_Inequality(S3, System.Object)" attrs="2198">\r
<size>15</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S2">\r
+ <method name="Boolean op_Equality(S2, System.Nullable`1[S2])" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Boolean op_Inequality(S2, System.Nullable`1[S2])" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-359.cs">\r
<type name="BaseGeneric`1[T]">\r
</method>\r
</type>\r
<type name="BugReport.A">\r
- <method name="Nullable`1 get_Counter()" attrs="2182">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Int32] get_Counter()" attrs="2182">\r
<size>15</size>\r
</method>\r
- <method name="Void set_Counter(Nullable`1)" attrs="2182">\r
+ <method name="Void set_Counter(System.Nullable`1[System.Int32])" attrs="2182">\r
<size>9</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
</type>\r
</test>\r
<test name="gtest-365.cs">\r
<method name="IList Query()" attrs="486">\r
<size>10</size>\r
</method>\r
- <method name="IList`1 Query[Extent](IList`1, IList`1)" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Db4objects.Db4o.Internal.ObjectContainerBase">\r
+ <method name="System.Collections.Generic.IList`1[Extent] Query[Extent](System.Collections.Generic.IList`1[Extent], System.Collections.Generic.IList`1[Extent])" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-370.cs">\r
<type name="N2.X`1[T]">\r
</type>\r
</test>\r
<test name="gtest-376.cs">\r
- <type name="S`1[T]">\r
- <method name="System.Object Box(Nullable`1)" attrs="145">\r
- <size>43</size>\r
- </method>\r
- </type>\r
<type name="C">\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S`1[T]">\r
+ <method name="System.Object Box(System.Nullable`1[T])" attrs="145">\r
+ <size>43</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-377.cs">\r
<type name="D">\r
<method name="Void Main()" attrs="150">\r
- <size>92</size>\r
+ <size>68</size>\r
</method>\r
<method name="Void .cctor()" attrs="6289">\r
<size>26</size>\r
</test>\r
<test name="gtest-378.cs">\r
<type name="Test">\r
- <method name="System.Object Foo(Nullable`1)" attrs="145">\r
- <size>15</size>\r
- </method>\r
- <method name="System.Object FooG[T](Nullable`1)" attrs="145">\r
- <size>15</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>76</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Object Foo(System.Nullable`1[System.Int32])" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Object FooG[T](System.Nullable`1[T])" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-379.cs">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="Int32 Print(Nullable`1)" attrs="145">\r
- <size>29</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>23</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Int32 Print(System.Nullable`1[S])" attrs="145">\r
+ <size>29</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-380.cs">\r
<method name="Void Main(System.String[])" attrs="150">\r
<size>71</size>\r
</method>\r
- <method name="IEnumerable`1 setX()" attrs="145">\r
- <size>23</size>\r
- </method>\r
- <method name="IEnumerable`1 test()" attrs="145">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<bool>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>115</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<bool>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>189</size>\r
</method>\r
<size>9</size>\r
</method>\r
</type>\r
+ <type name="TestGoto">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] setX()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] test()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestGoto+<setX>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable<bool>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestGoto+<test>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Boolean] System.Collections.Generic.IEnumerable<bool>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-382.cs">\r
<type name="C">\r
</type>\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
- <size>279</size>\r
+ <size>298</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<test name="gtest-389.cs">\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
- <size>261</size>\r
+ <size>253</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</test>\r
<test name="gtest-392.cs">\r
<type name="DieSubrangeType">\r
- <method name="Nullable`1 get_UpperBound()" attrs="2182">\r
- <size>14</size>\r
- </method>\r
- <method name="Void set_UpperBound(Nullable`1)" attrs="2177">\r
- <size>8</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>20</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="DieSubrangeType">\r
+ <method name="System.Nullable`1[System.Int32] get_UpperBound()" attrs="2182">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="Void set_UpperBound(System.Nullable`1[System.Int32])" attrs="2177">\r
+ <size>8</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-393.cs">\r
<type name="B`1[T]">\r
</test>\r
<test name="gtest-397.cs">\r
<type name="Foo">\r
- <method name="Foo op_UnaryNegation(Nullable`1)" attrs="2198">\r
- <size>55</size>\r
- </method>\r
<method name="Void .ctor(Int32)" attrs="6278">\r
<size>9</size>\r
</method>\r
</type>\r
<type name="Bar">\r
- <method name="Nullable`1 op_UnaryNegation(Nullable`1)" attrs="2198">\r
- <size>54</size>\r
- </method>\r
<method name="Void .ctor(Int32)" attrs="6278">\r
<size>9</size>\r
</method>\r
<method name="Foo NegateFoo(Foo)" attrs="145">\r
<size>20</size>\r
</method>\r
- <method name="Foo NegateFooNullable(Nullable`1)" attrs="145">\r
- <size>15</size>\r
- </method>\r
- <method name="Nullable`1 NegateBarNullable(Nullable`1)" attrs="145">\r
- <size>15</size>\r
- </method>\r
- <method name="Nullable`1 NegateBar(Bar)" attrs="145">\r
- <size>20</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>168</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo">\r
+ <method name="Foo op_UnaryNegation(System.Nullable`1[Foo])" attrs="2198">\r
+ <size>55</size>\r
+ </method>\r
+ </type>\r
+ <type name="Bar">\r
+ <method name="System.Nullable`1[Bar] op_UnaryNegation(System.Nullable`1[Bar])" attrs="2198">\r
+ <size>54</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test">\r
+ <method name="Foo NegateFooNullable(System.Nullable`1[Foo])" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Nullable`1[Bar] NegateBarNullable(System.Nullable`1[Bar])" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Nullable`1[Bar] NegateBar(Bar)" attrs="145">\r
+ <size>20</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-398.cs">\r
<type name="ToStr">\r
</type>\r
<type name="NullableColorTests">\r
<method name="Int32 Main()" attrs="150">\r
- <size>117</size>\r
+ <size>120</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<method name="Void Test_2()" attrs="129">\r
<size>32</size>\r
</method>\r
- <method name="Nullable`1 Test_3[T](System.Func`3[T,T,T], T)" attrs="129">\r
- <size>22</size>\r
- </method>\r
<method name="Void Test_4(Boolean, Boolean)" attrs="129">\r
<size>40</size>\r
</method>\r
<method name="Void Test_13(System.Object)" attrs="129">\r
<size>53</size>\r
</method>\r
- <method name="Nullable`1 Test_14()" attrs="129">\r
- <size>68</size>\r
- </method>\r
<method name="System.Action`1[System.Int32] Test_15(System.Action`1[System.Int32])" attrs="129">\r
<size>46</size>\r
</method>\r
<method name="Void Helper[T](T)" attrs="145">\r
<size>2</size>\r
</method>\r
+ <method name="System.Nullable`1[T] Test_3[T](System.Func`3[T,T,T], T)" attrs="129">\r
+ <size>22</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Int32] Test_14()" attrs="129">\r
+ <size>68</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-410.cs">\r
<method name="Int32 Main()" attrs="150">\r
<size>31</size>\r
</method>\r
- <method name="Nullable`1 get_Id()" attrs="2177">\r
- <size>15</size>\r
- </method>\r
<method name="Boolean Test()" attrs="129">\r
<size>59</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Nullable`1[System.Int32] get_Id()" attrs="2177">\r
+ <size>15</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-423.cs">\r
<method name="Void Block(A[])" attrs="150">\r
<size>7</size>\r
</method>\r
- <method name="Void Block(IEnumerable`1, A[])" attrs="150">\r
- <size>2</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>37</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Block(System.Collections.Generic.IEnumerable`1[B], A[])" attrs="150">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-425.cs">\r
</test>\r
<test name="gtest-426.cs">\r
<type name="OverloadTest.MyClass`1[T]">\r
- <method name="Boolean Method(MyInterface`1)" attrs="134">\r
- <size>28</size>\r
- </method>\r
<method name="Boolean Method(System.Action`1[T])" attrs="134">\r
<size>10</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="OverloadTest.MyClass`1[T]">\r
+ <method name="Boolean Method(OverloadTest.MyInterface`1[T])" attrs="134">\r
+ <size>28</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-427.cs">\r
<type name="EventHandler">\r
</method>\r
</type>\r
<type name="Klass">\r
- <method name="Nullable`1 get_Value()" attrs="2182">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor(Nullable`1)" attrs="6278">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Klass">\r
+ <method name="System.Nullable`1[CInt] get_Value()" attrs="2182">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-429.cs">\r
<type name="CInt">\r
</method>\r
</type>\r
<type name="Driver">\r
- <method name="Nullable`1 get_Prop()" attrs="2182">\r
- <size>50</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>50</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Nullable`1[System.Int32] get_Prop()" attrs="2182">\r
+ <size>50</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-431.cs">\r
<test name="gtest-435.cs">\r
<type name="testcase.Program">\r
<method name="Int32 Main()" attrs="150">\r
- <size>293</size>\r
+ <size>371</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>10</size>\r
</method>\r
- <method name="Void Foo[U](IEnumerable`1)" attrs="486">\r
- <size>2</size>\r
- </method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Impl`1[T]">\r
+ <method name="Void Foo[U](System.Collections.Generic.IEnumerable`1[U])" attrs="486">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-449.cs">\r
<type name="Program">\r
<method name="Single op_Implicit(S)" attrs="2198">\r
<size>12</size>\r
</method>\r
- <method name="Nullable`1 op_Implicit(S)" attrs="2198">\r
+ <method name="System.Nullable`1[System.Single] op_Implicit(S)" attrs="2198">\r
<size>19</size>\r
</method>\r
</type>\r
</test>\r
<test name="gtest-468.cs">\r
<type name="TS">\r
- <method name="Nullable`1 get_v()" attrs="2182">\r
- <size>15</size>\r
- </method>\r
- <method name="Nullable`1 op_Implicit(TS)" attrs="2198">\r
- <size>15</size>\r
- </method>\r
- <method name="TS op_Implicit(Nullable`1)" attrs="2198">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>56</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Nullable`1[System.Int32] get_v()" attrs="2182">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Int32] op_Implicit(TS)" attrs="2198">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="TS op_Implicit(System.Nullable`1[System.Int32])" attrs="2198">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-469.cs">\r
</test>\r
<test name="gtest-476.cs">\r
<type name="Test`1[T]">\r
- <method name="B First()" attrs="134">\r
- <size>18</size>\r
- </method>\r
<method name="IFoo Second()" attrs="134">\r
<size>23</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test`1[T]">\r
+ <method name="Test`1+B[T] First()" attrs="134">\r
+ <size>18</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-477.cs">\r
<type name="B`1[T]">\r
</method>\r
</type>\r
<type name="M">\r
- <method name="Void Test[T](I`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>22</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Test[T](I`1[T])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-480.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>10</size>\r
</method>\r
- <method name="Void AddRange(IMyCollection`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
- <method name="Void AddRange(IEnumerable`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Int32 get_Count()" attrs="2534">\r
<size>10</size>\r
</method>\r
<method name="Boolean Remove(T)" attrs="486">\r
<size>10</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>21</size>\r
</method>\r
</type>\r
+ <type name="MyCollection`1[T]">\r
+ <method name="Void AddRange(IMyCollection`1[T])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void AddRange(System.Collections.Generic.IEnumerable`1[T])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-487.cs">\r
<type name="Limada.MonoTests.Generics.MultiDictionary`3[K,V,TDictionary]">\r
</test>\r
<test name="gtest-490.cs">\r
<type name="Foo">\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Foo>.GetEnumerator()" attrs="481">\r
- <size>25</size>\r
- </method>\r
<method name="IEnumerator GetEnumerator()" attrs="486">\r
<size>25</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>18</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[Foo] System.Collections.Generic.IEnumerable<Foo>.GetEnumerator()" attrs="481">\r
+ <size>25</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-491.cs">\r
<method name="Int32 Test(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="R Method[T,R](IEnumerable`1, System.Func`2[T,R])" attrs="145">\r
- <size>24</size>\r
- </method>\r
- <method name="R Method2[T,R](IEnumerable`1, System.Func`2[System.Collections.Generic.List`1[T],R])" attrs="145">\r
- <size>16</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>125</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="R Method[T,R](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,R])" attrs="145">\r
+ <size>24</size>\r
+ </method>\r
+ <method name="R Method2[T,R](System.Collections.Generic.IEnumerable`1[T], System.Func`2[System.Collections.Generic.List`1[T],R])" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-506.cs">\r
</test>\r
<test name="gtest-515.cs">\r
<type name="A">\r
- <method name="I`1 Foo[T]()" attrs="454">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="AA">\r
- <method name="I`1 Foo[V]()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="Void Dispose()" attrs="486">\r
<size>2</size>\r
</method>\r
- <method name="I`1 Foo[R]()" attrs="198">\r
- <size>15</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>13</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="A">\r
+ <method name="I`1[T] Foo[T]()" attrs="454">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="AA">\r
+ <method name="I`1[V] Foo[V]()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="B">\r
+ <method name="I`1[R] Foo[R]()" attrs="198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-516.cs">\r
<type name="B">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<A>.GetEnumerator()" attrs="481">\r
- <size>24</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerator`1[A] System.Collections.Generic.IEnumerable<A>.GetEnumerator()" attrs="481">\r
+ <size>24</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-521.cs">\r
<type name="D">\r
<method name="Boolean Equals(T)" attrs="486">\r
<size>10</size>\r
</method>\r
- <method name="Boolean Equals(TestClass4`1)" attrs="486">\r
+ <method name="Int32 GetHashCode()" attrs="198">\r
<size>10</size>\r
</method>\r
- <method name="Boolean Equals(TestClass4`1, TestClass4`1)" attrs="486">\r
- <size>17</size>\r
- </method>\r
- <method name="Int32 GetHashCode(TestClass4`1)" attrs="486">\r
- <size>22</size>\r
+ <method name="Boolean Equals(System.Object)" attrs="198">\r
+ <size>10</size>\r
</method>\r
- <method name="Int32 GetHashCode()" attrs="198">\r
+ </type>\r
+ <type name="Test.C">\r
+ <method name="Void Main()" attrs="150">\r
<size>10</size>\r
</method>\r
- <method name="Boolean Equals(System.Object)" attrs="198">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.TestClass4`1[T]">\r
+ <method name="Boolean Equals(Test.TestClass4`1[T])" attrs="486">\r
<size>10</size>\r
</method>\r
- <method name="Boolean op_Equality(TestClass4`1, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean Equals(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="486">\r
+ <size>17</size>\r
+ </method>\r
+ <method name="Int32 GetHashCode(Test.TestClass4`1[T])" attrs="486">\r
+ <size>22</size>\r
+ </method>\r
+ <method name="Boolean op_Equality(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="2198">\r
<size>17</size>\r
</method>\r
- <method name="Boolean op_Equality(T, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean op_Equality(T, Test.TestClass4`1[T])" attrs="2198">\r
<size>17</size>\r
</method>\r
- <method name="Boolean op_Equality(TestClass4`1, T)" attrs="2198">\r
+ <method name="Boolean op_Equality(Test.TestClass4`1[T], T)" attrs="2198">\r
<size>17</size>\r
</method>\r
- <method name="Boolean op_Equality(System.Object, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean op_Equality(System.Object, Test.TestClass4`1[T])" attrs="2198">\r
<size>23</size>\r
</method>\r
- <method name="Boolean op_Equality(TestClass4`1, System.Object)" attrs="2198">\r
+ <method name="Boolean op_Equality(Test.TestClass4`1[T], System.Object)" attrs="2198">\r
<size>23</size>\r
</method>\r
- <method name="Boolean op_Inequality(TestClass4`1, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean op_Inequality(Test.TestClass4`1[T], Test.TestClass4`1[T])" attrs="2198">\r
<size>19</size>\r
</method>\r
- <method name="Boolean op_Inequality(T, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean op_Inequality(T, Test.TestClass4`1[T])" attrs="2198">\r
<size>19</size>\r
</method>\r
- <method name="Boolean op_Inequality(TestClass4`1, T)" attrs="2198">\r
+ <method name="Boolean op_Inequality(Test.TestClass4`1[T], T)" attrs="2198">\r
<size>19</size>\r
</method>\r
- <method name="Boolean op_Inequality(System.Object, TestClass4`1)" attrs="2198">\r
+ <method name="Boolean op_Inequality(System.Object, Test.TestClass4`1[T])" attrs="2198">\r
<size>19</size>\r
</method>\r
- <method name="Boolean op_Inequality(TestClass4`1, System.Object)" attrs="2198">\r
+ <method name="Boolean op_Inequality(Test.TestClass4`1[T], System.Object)" attrs="2198">\r
<size>19</size>\r
</method>\r
</type>\r
- <type name="Test.C">\r
- <method name="Void Main()" attrs="150">\r
- <size>10</size>\r
- </method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
- </type>\r
</test>\r
<test name="gtest-524.cs">\r
<type name="C">\r
</test>\r
<test name="gtest-534.cs">\r
<type name="A">\r
- <method name="Void Method(IG`1)" attrs="486">\r
- <size>2</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>21</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Method(IG`1[System.Double[][]])" attrs="486">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-535.cs">\r
</method>\r
</type>\r
<type name="S">\r
- <method name="System.String op_BitwiseOr(S, Nullable`1)" attrs="2198">\r
+ <method name="System.String op_BitwiseOr(S, System.Nullable`1[S])" attrs="2198">\r
<size>14</size>\r
</method>\r
- <method name="Nullable`1 op_Addition(S, Nullable`1)" attrs="2198">\r
+ <method name="System.Nullable`1[System.Int32] op_Addition(S, System.Nullable`1[S])" attrs="2198">\r
<size>16</size>\r
</method>\r
</type>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor(Int32)" attrs="6278">\r
<size>2</size>\r
</method>\r
</type>\r
- <type name="S2">\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>23</size>\r
- </method>\r
- </type>\r
<type name="Enumerator`1[T]">\r
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
<size>7</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="486">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="S2">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="134">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-539.cs">\r
<type name="S">\r
<method name="C op_Explicit(S)" attrs="2198">\r
<size>12</size>\r
</method>\r
- <method name="C op_Explicit(Nullable`1)" attrs="2198">\r
- <size>47</size>\r
- </method>\r
<method name="Void .ctor(Int32)" attrs="6273">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="C op_Explicit(System.Nullable`1[S])" attrs="2198">\r
+ <size>47</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-540.cs">\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
- <size>964</size>\r
+ <size>762</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<size>10</size>\r
</method>\r
<method name="Int32 Main()" attrs="150">\r
- <size>128</size>\r
+ <size>353</size>\r
</method>\r
</type>\r
</test>\r
<size>20</size>\r
</method>\r
</type>\r
- <type name="Foo.Magic`1[T]">\r
- <method name="Void Upsample(IUpDown)" attrs="150">\r
- <size>9</size>\r
- </method>\r
- </type>\r
<type name="Foo.Instance">\r
<method name="Int32 get_DestinationDimension()" attrs="2534">\r
<size>10</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo.Magic`1[T]">\r
+ <method name="Void Upsample(Foo.Magic`1+IUpDown[T])" attrs="150">\r
+ <size>9</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-551.cs">\r
<type name="Base`1[T]">\r
<method name="Void Foo[T](T)" attrs="145">\r
<size>2</size>\r
</method>\r
- <method name="Void Test(Nullable`1)" attrs="150">\r
- <size>20</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C`1[U]">\r
+ <method name="Void Test(System.Nullable`1[S])" attrs="150">\r
+ <size>20</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-564.cs">\r
<type name="B1`2[T1,T2]">\r
</method>\r
</type>\r
<type name="C`1[T]">\r
- <method name="C`1 op_Implicit(T)" attrs="2198">\r
+ <method name="C`1[T] op_Implicit(T)" attrs="2198">\r
<size>18</size>\r
</method>\r
</type>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>7</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>15</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int16] GetEnumerator()" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-573.cs">\r
</method>\r
</type>\r
<type name="CA`1[T]">\r
- <method name="IB`1 IB<T>.Backwards()" attrs="481">\r
- <size>10</size>\r
- </method>\r
- <method name="IA`1 Backwards()" attrs="1478">\r
- <size>0</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="CA`1[T]">\r
+ <method name="IA`1[T] Backwards()" attrs="1478">\r
+ <size>0</size>\r
+ </method>\r
+ <method name="IB`1[T] IB<T>.Backwards()" attrs="481">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-574.cs">\r
<type name="TestClass`1[T1]">\r
<method name="Void Test()" attrs="129">\r
<size>11</size>\r
</method>\r
- <method name="Void Foo[U](IEnumerable`1)" attrs="134">\r
- <size>2</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</method>\r
</type>\r
<type name="DirectedCollectionBase`1[T3]">\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T3>.GetEnumerator()" attrs="481">\r
- <size>10</size>\r
- </method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>10</size>\r
</method>\r
</method>\r
</type>\r
<type name="EnumerableBase`1[T6]">\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T6>.GetEnumerator()" attrs="481">\r
- <size>10</size>\r
- </method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>10</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="TestClass`1[T1]">\r
+ <method name="Void Foo[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
+ <type name="DirectedCollectionBase`1[T3]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T3] System.Collections.Generic.IEnumerable<T3>.GetEnumerator()" attrs="481">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="EnumerableBase`1[T6]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T6] System.Collections.Generic.IEnumerable<T6>.GetEnumerator()" attrs="481">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-575.cs">\r
<type name="C`1[T1]">\r
</test>\r
<test name="gtest-576.cs">\r
<type name="A">\r
- <method name="Void IA.f[T1](IParam`1)" attrs="481">\r
- <size>2</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>8</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void IA.f[T1](IParam`1[T1])" attrs="481">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-577.cs">\r
</test>\r
<test name="gtest-578.cs">\r
<type name="X">\r
- <method name="I`1 Test[T,TR](I`1, System.Func`2[I`1[T],TR])" attrs="150">\r
- <size>10</size>\r
- </method>\r
- <method name="U First[U](I`1)" attrs="150">\r
- <size>18</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>44</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="I`1[TR] Test[T,TR](I`1[T], System.Func`2[I`1[T],TR])" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="U First[U](I`1[U])" attrs="150">\r
+ <size>18</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-579.cs">\r
</method>\r
</type>\r
</test>\r
+ <test name="gtest-584.cs">\r
+ <type name="S">\r
+ <method name="Boolean op_Equality(S, S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Boolean op_Inequality(S, S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>531</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S">\r
+ <method name="System.Nullable`1[System.Int32] op_Implicit(S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="System.Nullable`1[E] op_Implicit(S)" attrs="2198">\r
+ <size>18</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-585.cs">\r
+ <type name="S">\r
+ <method name="Int32 op_Implicit(S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S3">\r
+ <method name="System.String op_Implicit(S3)" attrs="2198">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>436</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S2">\r
+ <method name="System.Nullable`1[System.Int32] op_Implicit(S2)" attrs="2198">\r
+ <size>19</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.UInt32] op_Implicit(S2)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-586.cs">\r
+ <type name="S">\r
+ <method name="Boolean op_Equality(S, S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Boolean op_Inequality(S, S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S2">\r
+ <method name="Boolean op_Equality(S2, S2)" attrs="2198">\r
+ <size>22</size>\r
+ </method>\r
+ <method name="Boolean op_Inequality(S2, S2)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>661</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S3">\r
+ <method name="System.Nullable`1[System.Int32] op_Implicit(S3)" attrs="2198">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-587.cs">\r
+ <type name="S">\r
+ <method name="System.String op_Implicit(S)" attrs="2198">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="E op_Implicit(S)" attrs="2198">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>139</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="S">\r
+ <method name="System.Nullable`1[System.Int16] op_Implicit(S)" attrs="2198">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-588.cs">\r
+ <type name="S">\r
+ <method name="System.Nullable`1[System.Int16] op_Implicit(S)" attrs="2198">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Int16 op_Implicit(S)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Program">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>246</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="gtest-anontype-01.cs">\r
<type name="Test">\r
<method name="Int32 Main()" attrs="150">\r
</test>\r
<test name="gtest-anontype-13.cs">\r
<type name="Test">\r
- <method name="IEnumerable`1 Select[T](System.Array, System.Func`2[System.Object,T])" attrs="150">\r
- <size>37</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>182</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>211</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Select[T](System.Array, System.Func`2[System.Object,T])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Select>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-autoproperty-01.cs">\r
<type name="Test">\r
<size>239</size>\r
</method>\r
<method name="Void ConvertTest_7()" attrs="129">\r
- <size>123</size>\r
+ <size>108</size>\r
</method>\r
<method name="Void ConvertTest_8()" attrs="129">\r
<size>119</size>\r
<size>170</size>\r
</method>\r
<method name="Void EqualTest_11()" attrs="129">\r
- <size>133</size>\r
+ <size>148</size>\r
</method>\r
<method name="Void EqualTest_12()" attrs="129">\r
<size>128</size>\r
<size>125</size>\r
</method>\r
<method name="Void EqualTest_14()" attrs="129">\r
- <size>102</size>\r
+ <size>132</size>\r
</method>\r
<method name="Void EqualTest_15()" attrs="129">\r
<size>160</size>\r
<size>198</size>\r
</method>\r
<method name="Void ExclusiveOrTest_8()" attrs="129">\r
- <size>164</size>\r
+ <size>179</size>\r
</method>\r
<method name="Void GreaterThanTest()" attrs="129">\r
<size>100</size>\r
<size>170</size>\r
</method>\r
<method name="Void NotEqualTest_11()" attrs="129">\r
- <size>133</size>\r
+ <size>148</size>\r
</method>\r
<method name="Void OrTest()" attrs="129">\r
<size>142</size>\r
</type>\r
<type name="Tester">\r
<method name="Void LessThanTest_9()" attrs="129">\r
- <size>199</size>\r
+ <size>184</size>\r
</method>\r
</type>\r
</test>\r
<test name="gtest-etree-03.cs">\r
<type name="S`1[T]">\r
<method name="Int32 Test()" attrs="150">\r
- <size>164</size>\r
+ <size>139</size>\r
</method>\r
</type>\r
<type name="C">\r
</type>\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
- <size>394</size>\r
+ <size>495</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo">\r
+ <method name="Foo op_Addition(Foo, Foo)" attrs="2198">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-etree-05.cs">\r
<type name="C">\r
</test>\r
<test name="gtest-etree-10.cs">\r
<type name="Foo`1[T]">\r
- <method name="Boolean ContainsAll[U](IEnumerable`1)" attrs="134">\r
- <size>200</size>\r
- </method>\r
<method name="Boolean Contains(T)" attrs="134">\r
<size>10</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo`1[T]">\r
+ <method name="Boolean ContainsAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+ <size>200</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-etree-11.cs">\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
<size>66</size>\r
</method>\r
- <method name="IEnumerable`1 Test[T](Int32)" attrs="145">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>148</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Program">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test[T](Int32)" attrs="145">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Program+<Test>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-etree-14.cs">\r
<type name="Person">\r
<method name="Int32 Main()" attrs="150">\r
<size>67</size>\r
</method>\r
- <method name="IEnumerable`1 GetPersons[T](IEnumerable`1, Int32)" attrs="145">\r
- <size>37</size>\r
- </method>\r
<method name="Boolean Test[T](T, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="145">\r
<size>21</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>336</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Repro">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] GetPersons[T](System.Collections.Generic.IEnumerable`1[T], Int32)" attrs="145">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="Repro+<GetPersons>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-etree-15.cs">\r
<type name="Foo">\r
</test>\r
<test name="gtest-exmethod-07.cs">\r
<type name="E">\r
- <method name="Void ToReadOnly[T](IEnumerable`1)" attrs="147">\r
- <size>2</size>\r
- </method>\r
<method name="Void To(IA)" attrs="147">\r
<size>2</size>\r
</method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
- <method name="Void Test(IEnumerable`1)" attrs="150">\r
- <size>16</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="E">\r
+ <method name="Void ToReadOnly[T](System.Collections.Generic.IEnumerable`1[T])" attrs="147">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="Void Test(System.Collections.Generic.IEnumerable`1[System.Boolean])" attrs="150">\r
+ <size>16</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-exmethod-08.cs">\r
<type name="C">\r
</test>\r
<test name="gtest-exmethod-13.cs">\r
<type name="Foo">\r
- <method name="IEnumerable`1 Reverse[T](IEnumerable`1)" attrs="150">\r
- <size>10</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>24</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Reverse[T](System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-exmethod-14.cs">\r
<method name="System.String Test_1(System.String)" attrs="150">\r
<size>20</size>\r
</method>\r
- <method name="Int32 Test_2[T](IEnumerable`1)" attrs="150">\r
- <size>11</size>\r
- </method>\r
</type>\r
<type name="Test">\r
<method name="Int32 Main()" attrs="150">\r
<size>0</size>\r
</method>\r
</type>\r
+ <type name="Rocks">\r
+ <method name="Int32 Test_2[T](System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
+ <size>11</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-exmethod-20.cs">\r
<type name="Outer.Inner.Test">\r
</method>\r
</type>\r
<type name="Outer.ExtensionMethods">\r
- <method name="Void AddRange[T](I, IEnumerable`1)" attrs="150">\r
+ <method name="Void AddRange[T](I, System.Collections.Generic.IEnumerable`1[T])" attrs="150">\r
<size>2</size>\r
</method>\r
</type>\r
</type>\r
</test>\r
<test name="gtest-exmethod-27.cs">\r
- <type name="Foo.Extensions">\r
- <method name="System.String AsString(IList`1)" attrs="150">\r
- <size>14</size>\r
- </method>\r
- </type>\r
<type name="Bar.Program">\r
<method name="Void Main()" attrs="150">\r
<size>18</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo.Extensions">\r
+ <method name="System.String AsString(System.Collections.Generic.IList`1[System.Byte])" attrs="150">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-exmethod-28.cs">\r
<type name="Foo">\r
<method name="Int32 get_First()" attrs="2182">\r
<size>10</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] GetEnumerator()" attrs="486">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-exmethod-31.cs">\r
<type name="N.S">\r
</test>\r
<test name="gtest-exmethod-41.cs">\r
<type name="TT">\r
- <method name="Void Method[T](IEnumerable`1, System.Func`2[T,System.Boolean])" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Void Test[U](U)" attrs="150">\r
<size>25</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="TT">\r
+ <method name="Void Method[T](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,System.Boolean])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-exmethod-42.cs">\r
<type name="C">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="ExtensionTest.Two.Extensions">\r
- <method name="Boolean Contains[T](IEnumerable`1, T)" attrs="150">\r
- <size>10</size>\r
- </method>\r
- <method name="Boolean All[T](IEnumerable`1, ExtensionTest.Two.AxFunc`2[T,System.Boolean])" attrs="150">\r
- <size>10</size>\r
- </method>\r
- </type>\r
<type name="ExtensionTest.MyClass">\r
<method name="Boolean IsCharacters(System.String, System.Char[])" attrs="150">\r
<size>27</size>\r
<size>2</size>\r
</method>\r
</type>\r
+ <type name="ExtensionTest.Two.Extensions">\r
+ <method name="Boolean Contains[T](System.Collections.Generic.IEnumerable`1[T], T)" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Boolean All[T](System.Collections.Generic.IEnumerable`1[T], ExtensionTest.Two.AxFunc`2[T,System.Boolean])" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-fixedbuffer-01.cs">\r
<type name="TestNew">\r
<method name="T get_Item(Int32)" attrs="2182">\r
<size>21</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="134">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>8</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C+ArrayReadOnlyList`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="134">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-02.cs">\r
<type name="C">\r
- <method name="IEnumerator`1 Test()" attrs="129">\r
- <size>15</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
</method>\r
</type>\r
<type name="C+<Test>c__Iterator0">\r
- <method name="KeyValuePair`2 System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,object>>.get_Current()" attrs="2529">\r
- <size>14</size>\r
- </method>\r
<method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
<size>19</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Collections.Generic.KeyValuePair`2[System.String,System.Object]] Test()" attrs="129">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.KeyValuePair`2[System.String,System.Object] System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,object>>.get_Current()" attrs="2529">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-03.cs">\r
<type name="Test">\r
- <method name="IEnumerable`1 Annotations[T]()" attrs="134">\r
- <size>30</size>\r
- </method>\r
- <method name="IEnumerable`1 Annotations(System.Type)" attrs="134">\r
- <size>37</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>15</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>204</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>232</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Annotations[T]()" attrs="134">\r
+ <size>30</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] Annotations(System.Type)" attrs="134">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Annotations>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Annotations>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-04.cs">\r
<type name="TestClass">\r
<method name="Void ToString(System.Object)" attrs="1478">\r
<size>0</size>\r
</method>\r
- <method name="IEnumerable`1 TestEnumerator()" attrs="134">\r
- <size>30</size>\r
- </method>\r
<method name="Void Test()" attrs="134">\r
<size>9</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>38</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="TestClass">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] TestEnumerator()" attrs="134">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestClass+<TestEnumerator>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-05.cs">\r
<type name="Test">\r
<method name="Void Main()" attrs="150">\r
<size>32</size>\r
</method>\r
- <method name="IEnumerable`1 TestRoutine[T](IEnumerable`1, Foo`1[T])" attrs="150">\r
- <size>37</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>197</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-iter-06.cs">\r
- <type name="Mono.Rocks.KeyValuePair">\r
- <method name="Nullable`1 Just[TKey,TValue](TKey, TValue)" attrs="150">\r
- <size>21</size>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] TestRoutine[T](System.Collections.Generic.IEnumerable`1[T], Foo`1[T])" attrs="150">\r
+ <size>37</size>\r
</method>\r
</type>\r
- <type name="Mono.Rocks.Sequence">\r
- <method name="IEnumerable`1 Unfoldr[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="150">\r
- <size>16</size>\r
- </method>\r
- <method name="IEnumerable`1 CreateUnfoldrIterator[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="145">\r
- <size>44</size>\r
+ <type name="Test+<TestRoutine>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
</method>\r
</type>\r
+ </test>\r
+ <test name="gtest-iter-06.cs">\r
<type name="Mono.Rocks.Test">\r
<method name="Int32 Main()" attrs="150">\r
<size>128</size>\r
</method>\r
- <method name="Nullable`1 <Main>m__0(Int32)" attrs="145">\r
- <size>37</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>192</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Mono.Rocks.KeyValuePair">\r
+ <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TKey,TValue]] Just[TKey,TValue](TKey, TValue)" attrs="150">\r
+ <size>21</size>\r
+ </method>\r
+ </type>\r
+ <type name="Mono.Rocks.Sequence">\r
+ <method name="System.Collections.Generic.IEnumerable`1[TResult] Unfoldr[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="150">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[TResult] CreateUnfoldrIterator[TSource,TResult](TSource, System.Func`2[TSource,System.Nullable`1[System.Collections.Generic.KeyValuePair`2[TResult,TSource]]])" attrs="145">\r
+ <size>44</size>\r
+ </method>\r
+ </type>\r
+ <type name="Mono.Rocks.Test">\r
+ <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[System.Int32,System.Int32]] <Main>m__0(Int32)" attrs="145">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="Mono.Rocks.Sequence+<CreateUnfoldrIterator>c__Iterator0`2[TSource,TResult]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[TResult] System.Collections.Generic.IEnumerable<TResult>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-07.cs">\r
<type name="Test">\r
<method name="Int32 Main()" attrs="150">\r
<size>16</size>\r
</method>\r
- <method name="Void TestFunction(IEnumerable`1)" attrs="150">\r
- <size>36</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="MySystem">\r
- <method name="IEnumerable`1 get_Items()" attrs="2182">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>35</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>197</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Void TestFunction(System.Collections.Generic.IEnumerable`1[System.String])" attrs="150">\r
+ <size>36</size>\r
+ </method>\r
+ </type>\r
+ <type name="MySystem">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] get_Items()" attrs="2182">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="MySystem+<>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-08.cs">\r
<type name="App">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>91</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-iter-09.cs">\r
<type name="Test">\r
- <method name="IEnumerable`1 Create[T](T[,])" attrs="145">\r
- <size>30</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>89</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>137</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Create[T](T[,])" attrs="145">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Create>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-10.cs">\r
<type name="Test">\r
- <method name="IEnumerable`1 FromTo(Int32, Int32)" attrs="145">\r
- <size>44</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>185</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>110</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="145">\r
+ <size>44</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<FromTo>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-11.cs">\r
<type name="Foo">\r
<method name="Void Add(T)" attrs="134">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 GetEnumerator()" attrs="486">\r
- <size>22</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>18</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Collection`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] GetEnumerator()" attrs="486">\r
+ <size>22</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-12.cs">\r
<type name="H">\r
<method name="Void Main(System.String[])" attrs="150">\r
<size>2</size>\r
</method>\r
- <method name="IEnumerable`1 Merge[T](IEnumerator`1)" attrs="150">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>124</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="H">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Merge[T](System.Collections.Generic.IEnumerator`1[T])" attrs="150">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="H+<Merge>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-13.cs">\r
<type name="C`1[T]">\r
<method name="IEnumerator GetEnumerator()" attrs="134">\r
<size>20</size>\r
</method>\r
- <method name="IEnumerable`1 Filter(System.Func`2[T,System.Boolean])" attrs="134">\r
- <size>37</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>225</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Filter(System.Func`2[T,System.Boolean])" attrs="134">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="C`1+<Filter>c__Iterator0[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-14.cs">\r
<type name="A">\r
</method>\r
</type>\r
<type name="S">\r
- <method name="IEnumerable`1 GetIt()" attrs="134">\r
- <size>35</size>\r
- </method>\r
<method name="Int32 <GetHashCode>__BaseCallProxy0()" attrs="129">\r
<size>24</size>\r
</method>\r
<method name="Void set_BaseM(Int32)" attrs="2244">\r
<size>12</size>\r
</method>\r
- <method name="IEnumerable`1 GetIt()" attrs="129">\r
- <size>30</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>145</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>82</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>93</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="134">\r
+ <size>35</size>\r
+ </method>\r
+ </type>\r
+ <type name="X">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIt()" attrs="129">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="S+<GetIt>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<GetIt>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-15.cs">\r
<type name="C`1[TFirst]">\r
- <method name="IEnumerable`1 GetEnumerable[V](IEnumerable`1)" attrs="131">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<V>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>189</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C`1[TFirst]">\r
+ <method name="System.Collections.Generic.IEnumerable`1[V] GetEnumerable[V](System.Collections.Generic.IEnumerable`1[C`1+VSlot`1[TFirst,V]])" attrs="131">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="C`1+<GetEnumerable>c__Iterator0`1[TFirst,V]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[V] System.Collections.Generic.IEnumerable<V>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-16.cs">\r
<type name="Test.Base">\r
- <method name="IEnumerable`1 GetStuff(Int32)" attrs="454">\r
- <size>30</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test.Derived">\r
- <method name="IEnumerable`1 GetStuff(Int32)" attrs="198">\r
- <size>37</size>\r
- </method>\r
- <method name="IEnumerable`1 <GetStuff>__BaseCallProxy0(Int32)" attrs="129">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6276">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test.SpecialDerived">\r
- <method name="IEnumerable`1 GetStuff(Int32)" attrs="198">\r
- <size>37</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>65</size>\r
</method>\r
- <method name="IEnumerable`1 <GetStuff>__BaseCallProxy0(Int32)" attrs="129">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>77</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>195</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>195</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test.Base">\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="454">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.Derived">\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">\r
+ <size>37</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] <GetStuff>__BaseCallProxy0(Int32)" attrs="129">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.SpecialDerived">\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] GetStuff(Int32)" attrs="198">\r
+ <size>37</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test.Base] <GetStuff>__BaseCallProxy0(Int32)" attrs="129">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.Base+<GetStuff>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.Derived+<GetStuff>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.SpecialDerived+<GetStuff>c__Iterator2">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Test.Base] System.Collections.Generic.IEnumerable<Test.Base>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-17.cs">\r
<type name="Test">\r
- <method name="IEnumerable`1 TestMethod()" attrs="134">\r
- <size>23</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>37</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] TestMethod()" attrs="134">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<TestMethod>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-18.cs">\r
<type name="c">\r
- <method name="IEnumerable`1 func()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>57</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<char>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>78</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="c">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] func()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="c+<func>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Char] System.Collections.Generic.IEnumerable<char>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-19.cs">\r
<type name="IEnumerableTransform">\r
- <method name="IEnumerable`1 Transform[TOut](IEnumerable`1, IEnumerableTransform+EmitterFunc`1[TOut])" attrs="150">\r
- <size>37</size>\r
- </method>\r
<method name="IEnumerableTransform+EmitterFunc`1[TOut] Emit[TOut](TOut)" attrs="150">\r
<size>34</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<TOut>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>203</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="IEnumerableTransform">\r
+ <method name="System.Collections.Generic.IEnumerable`1[TOut] Transform[TOut](System.Collections.Generic.IEnumerable`1[System.Int32], IEnumerableTransform+EmitterFunc`1[TOut])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="IEnumerableTransform+<Transform>c__Iterator0`1[TOut]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[TOut] System.Collections.Generic.IEnumerable<TOut>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-20.cs">\r
<type name="X">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>77</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-iter-21.cs">\r
<type name="C">\r
- <method name="IEnumerable`1 Test()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>72</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Void <>__Finally0()" attrs="129">\r
<size>29</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-22.cs">\r
<type name="D">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="IEnumerable`1 Test()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>78</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>74</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="gtest-iter-23.cs">\r
<type name="C">\r
- <method name="IEnumerable`1 Test()" attrs="145">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
<size>23</size>\r
</method>\r
- <method name="IEnumerable`1 Test_2()" attrs="145">\r
- <size>23</size>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
</method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-iter-23.cs">\r
+ <type name="C">\r
<method name="Int32 Main()" attrs="150">\r
<size>180</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>271</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>200</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test_2()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test_2>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-24.cs">\r
<type name="B">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="IEnumerable`1 Test()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>71</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>170</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-25.cs">\r
<type name="Test.Program">\r
<method name="Void Main()" attrs="150">\r
<size>61</size>\r
</method>\r
- <method name="IEnumerable`1 Test()" attrs="150">\r
- <size>23</size>\r
- </method>\r
</type>\r
<type name="Test.Program+<Test>c__Iterator0">\r
<method name="System.Object System.Collections.Generic.IEnumerator<object>.get_Current()" attrs="2529">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>143</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test.Program">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] Test()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.Program+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-26.cs">\r
<type name="Test.Program">\r
<method name="Int32 Main()" attrs="150">\r
<size>51</size>\r
</method>\r
- <method name="IEnumerable`1 Test()" attrs="150">\r
- <size>23</size>\r
- </method>\r
</type>\r
<type name="Test.Program+<Test>c__Iterator0">\r
<method name="System.Object System.Collections.Generic.IEnumerator<object>.get_Current()" attrs="2529">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>72</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test.Program">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] Test()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test.Program+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-27.cs">\r
<type name="CompilerBug">\r
<method name="Void Main()" attrs="150">\r
<size>61</size>\r
</method>\r
- <method name="IEnumerable`1 Foo()" attrs="145">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>161</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="CompilerBug">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] Foo()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="CompilerBug+<Foo>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-iter-28.cs">\r
<type name="A">\r
- <method name="IEnumerable`1 Test(B)" attrs="134">\r
- <size>37</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>18</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>178</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="A">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] Test(B)" attrs="134">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="A+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="gtest-iter-29.cs">\r
+ <type name="Test">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>44</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Test2>c__Iterator0">\r
+ <method name="Int32 System.Collections.Generic.IEnumerator<int>.get_Current()" attrs="2529">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="System.Object System.Collections.IEnumerator.get_Current()" attrs="2529">\r
+ <size>19</size>\r
+ </method>\r
+ <method name="Boolean MoveNext()" attrs="486">\r
+ <size>21</size>\r
+ </method>\r
+ <method name="Void Dispose()" attrs="486">\r
+ <size>1</size>\r
+ </method>\r
+ <method name="Void Reset()" attrs="486">\r
+ <size>6</size>\r
+ </method>\r
+ <method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test2()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Test2>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-lambda-01.cs">\r
<type name="IntFunc">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="IEnumerable`1 Test[T](T)" attrs="145">\r
- <size>10</size>\r
- </method>\r
- <method name="IEnumerable`1 Test[T](Func`1[T])" attrs="145">\r
- <size>10</size>\r
- </method>\r
- <method name="IEnumerable`1 Test2[T](Func`2[T,T])" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>114</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](T)" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](Func`1[T])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Test2[T](Func`2[T,T])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-lambda-10.cs">\r
<type name="C">\r
- <method name="Void Foo[TSource](IEnumerable`1)" attrs="150">\r
- <size>2</size>\r
- </method>\r
- <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`2[TSource,System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
- <size>2</size>\r
- </method>\r
- <method name="Void Foo[TCollection,TSource](IEnumerable`1, System.Func`3[TSource,TCollection[],System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
- <size>2</size>\r
- </method>\r
<method name="Void Foo[TCollection,TSource](System.Func`2[TCollection[],System.Collections.Generic.IEnumerable`1[TSource]])" attrs="150">\r
<size>2</size>\r
</method>\r
</method>\r
</type>\r
<type name="C+<Main>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__0(Int32)" attrs="131">\r
- <size>15</size>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
</method>\r
- <method name="IEnumerable`1 <>m__1(Int32, System.Int32[])" attrs="131">\r
+ </type>\r
+ <type name="C">\r
+ <method name="Void Foo[TSource](System.Collections.Generic.IEnumerable`1[TSource])" attrs="150">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void Foo[TCollection,TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void Foo[TCollection,TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`3[TSource,TCollection[],System.Collections.Generic.IEnumerable`1[TCollection]])" attrs="150">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Main>c__AnonStorey0">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__0(Int32)" attrs="131">\r
<size>15</size>\r
</method>\r
- <method name="IEnumerable`1 <>m__2(System.Int32[])" attrs="131">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__1(Int32, System.Int32[])" attrs="131">\r
<size>15</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__2(System.Int32[])" attrs="131">\r
+ <size>15</size>\r
</method>\r
</type>\r
</test>\r
</type>\r
</test>\r
<test name="gtest-lambda-15.cs">\r
- <type name="Enumerable">\r
- <method name="Int32 Sum[TSource](IEnumerable`1, System.Func`2[TSource,System.Int32])" attrs="150">\r
- <size>40</size>\r
- </method>\r
- <method name="TR Sum[TA,TR](IEnumerable`1, System.Func`3[TR,TA,TR])" attrs="145">\r
- <size>139</size>\r
- </method>\r
- </type>\r
<type name="Repro">\r
<method name="Int32 Main()" attrs="150">\r
<size>128</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Enumerable">\r
+ <method name="Int32 Sum[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Int32])" attrs="150">\r
+ <size>40</size>\r
+ </method>\r
+ <method name="TR Sum[TA,TR](System.Collections.Generic.IEnumerable`1[TA], System.Func`3[TR,TA,TR])" attrs="145">\r
+ <size>139</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-lambda-16.cs">\r
<type name="Repro">\r
- <method name="Void AssertFoo[T](IList`1)" attrs="145">\r
- <size>35</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Repro">\r
+ <method name="Void AssertFoo[T](System.Collections.Generic.IList`1[T])" attrs="145">\r
+ <size>35</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-lambda-17.cs">\r
<type name="TestCase">\r
<method name="Product <Main>m__1(Product)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="<>__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] <Main>m__2(IGrouping`2)" attrs="145">\r
- <size>56</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="MainClass">\r
+ <method name="<>__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] <Main>m__2(System.Linq.IGrouping`2[System.Int32,Product])" attrs="145">\r
+ <size>56</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-lambda-23.cs">\r
<type name="C">\r
<method name="Void DoStuff[T](T, System.Action`1[T])" attrs="150">\r
<size>12</size>\r
</method>\r
- <method name="Void DoStuff[T](Nullable`1, System.Action`1[T])" attrs="150">\r
- <size>15</size>\r
- </method>\r
</type>\r
<type name="MonoBugs.Program">\r
<method name="Void Main()" attrs="150">\r
<size>60</size>\r
</method>\r
- <method name="Void <Main>m__0(Foo`1)" attrs="145">\r
+ </type>\r
+ <type name="MonoBugs.Bar">\r
+ <method name="Void DoStuff[T](System.Nullable`1[T], System.Action`1[T])" attrs="150">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
+ <type name="MonoBugs.Program">\r
+ <method name="Void <Main>m__0(MonoBugs.Foo`1[System.Int32])" attrs="145">\r
<size>13</size>\r
</method>\r
</type>\r
<method name="Int32 Main()" attrs="150">\r
<size>294</size>\r
</method>\r
- <method name="IEnumerable`1 <Main>m__0(IEnumerable)" attrs="145">\r
+ <method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <Main>m__0(IEnumerable)" attrs="145">\r
<size>7</size>\r
</method>\r
</type>\r
<method name="Int32 <Main>m__1(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="Nullable`1 <Main>m__2(Nullable`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 <Main>m__3(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__1B(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="Int32 <Main>m__1C(Int32, IEnumerable`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 <Main>m__1D(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__1E(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="Int32 <Main>m__1F(Int32, IEnumerable`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 <Main>m__20(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__23(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="IGrouping`2 <Main>m__24(IGrouping`2)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="<>__AnonType1`2[System.Int32,System.Int32] <Main>m__25(Int32)" attrs="145">\r
<size>18</size>\r
</method>\r
<method name="Int32 <Main>m__2B(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
- <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__2D(IGrouping`2, Int32)" attrs="145">\r
- <size>16</size>\r
- </method>\r
<method name="Int32 <Main>m__2E(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__2F(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__31(IGrouping`2, Int32)" attrs="145">\r
- <size>16</size>\r
- </method>\r
<method name="Int32 <Main>m__32(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__33(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__35(IGrouping`2, Int32)" attrs="145">\r
- <size>16</size>\r
- </method>\r
<method name="Int32 <Main>m__36(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>10</size>\r
</method>\r
<method name="Int32 <Main>m__37(<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="IGrouping`2 <Main>m__38(IGrouping`2)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 <Main>m__39(Int32)" attrs="145">\r
<size>10</size>\r
</method>\r
</method>\r
</type>\r
<type name="from.C+<Main>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__4(Int32)" attrs="131">\r
- <size>15</size>\r
- </method>\r
- <method name="IEnumerable`1 <>m__2C(IGrouping`2)" attrs="131">\r
- <size>15</size>\r
- </method>\r
- <method name="IEnumerable`1 <>m__30(IGrouping`2)" attrs="131">\r
- <size>15</size>\r
- </method>\r
- <method name="IEnumerable`1 <>m__34(IGrouping`2)" attrs="131">\r
- <size>15</size>\r
- </method>\r
<method name="<>__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] <>m__3C(Int32)" attrs="131">\r
<size>55</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="from.C">\r
+ <method name="System.Nullable`1[System.Boolean] <Main>m__2(System.Nullable`1[System.Boolean])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Int32 <Main>m__1C(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="Int32 <Main>m__1F(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] <Main>m__24(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__2D(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__31(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="<>__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] <Main>m__35(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] <Main>m__38(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
+ <type name="from.C+<Main>c__AnonStorey0">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__4(Int32)" attrs="131">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__2C(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__30(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__34(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-02.cs">\r
<type name="Test">\r
</method>\r
</type>\r
<type name="SelectMany+<Main>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__0(Int32)" attrs="131">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] <>m__0(Int32)" attrs="131">\r
<size>20</size>\r
</method>\r
- <method name="IEnumerable`1 <>m__3(Int32)" attrs="131">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] <>m__3(Int32)" attrs="131">\r
<size>20</size>\r
</method>\r
- <method name="IEnumerable`1 <>m__5(<>__AnonType0`2[System.Int32,System.String])" attrs="131">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__5(<>__AnonType0`2[System.Int32,System.String])" attrs="131">\r
<size>20</size>\r
</method>\r
- <method name="IEnumerable`1 <>m__9(Int32)" attrs="131">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] <>m__9(Int32)" attrs="131">\r
<size>15</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
</type>\r
</test>\r
<test name="gtest-linq-08.cs">\r
<method name="Int32 <Main>m__1(DataB)" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] <Main>m__2(DataA, IEnumerable`1)" attrs="145">\r
- <size>16</size>\r
- </method>\r
- <method name="IEnumerable`1 <Main>m__3(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
- <size>20</size>\r
- </method>\r
<method name="<>__AnonType1`2[System.String,System.String] <Main>m__4(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
<size>47</size>\r
</method>\r
<method name="Int32 <Main>m__6(DataB)" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] <Main>m__7(DataA, IEnumerable`1)" attrs="145">\r
- <size>16</size>\r
- </method>\r
- <method name="IEnumerable`1 <Main>m__8(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
- <size>20</size>\r
- </method>\r
<method name="<>__AnonType1`2[System.String,System.String] <Main>m__9(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">\r
<size>47</size>\r
</method>\r
<method name="Int32 <Main>m__B(DataB)" attrs="145">\r
<size>15</size>\r
</method>\r
- <method name="DataA <Main>m__C(DataA, IEnumerable`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>21</size>\r
</method>\r
</type>\r
+ <type name="GroupJoin">\r
+ <method name="<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] <Main>m__2(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[DataB] <Main>m__3(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] <Main>m__7(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+ <size>16</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[DataB] <Main>m__8(<>__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="DataA <Main>m__C(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-11.cs">\r
<type name="IntoTest">\r
<method name="<>__AnonType0`2[System.String,System.Int32] <XX>m__0(System.String)" attrs="145">\r
<size>20</size>\r
</method>\r
- <method name="IEnumerable`1 <XX>m__1(<>__AnonType0`2[System.String,System.Int32])" attrs="145">\r
- <size>117</size>\r
- </method>\r
<method name="Boolean <Main>m__2(System.String)" attrs="145">\r
<size>18</size>\r
</method>\r
- <method name="IEnumerable`1 <Main>m__3(System.String)" attrs="145">\r
- <size>44</size>\r
- </method>\r
<method name="<>__AnonType0`2[System.String,System.Int32] <Main>m__4(System.String)" attrs="145">\r
<size>21</size>\r
</method>\r
- <method name="IEnumerable`1 <Main>m__5(<>__AnonType0`2[System.String,System.Int32])" attrs="145">\r
- <size>118</size>\r
- </method>\r
<method name="<>__AnonType1`2[System.Char,System.Int32] <XX>m__6(Char)" attrs="145">\r
<size>16</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="NestedQuery">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] <XX>m__1(<>__AnonType0`2[System.String,System.Int32])" attrs="145">\r
+ <size>117</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] <Main>m__3(System.String)" attrs="145">\r
+ <size>44</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] <Main>m__5(<>__AnonType0`2[System.String,System.Int32])" attrs="145">\r
+ <size>118</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-13.cs">\r
<type name="Program">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Extension">\r
- <method name="IEnumerable`1 Cast[T](IFoo)" attrs="150">\r
- <size>10</size>\r
- </method>\r
- </type>\r
<type name="MethodDefinition">\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Extension">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Cast[T](IFoo)" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-14.cs">\r
<type name="Person">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Extensions">\r
- <method name="IMarker`1 Cast[T](IObjectContainer)" attrs="150">\r
- <size>10</size>\r
- </method>\r
- <method name="IMarker`1 Where[T](IMarker`1, System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="150">\r
- <size>10</size>\r
- </method>\r
- </type>\r
<type name="Program">\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Extensions">\r
+ <method name="IMarker`1[T] Cast[T](IObjectContainer)" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ <method name="IMarker`1[T] Where[T](IMarker`1[T], System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]])" attrs="150">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-15.cs">\r
<type name="NameCollisionTest.Data">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="NameCollisionTest.Ex">\r
- <method name="IEnumerable`1 Foo[T,TR](IEnumerable`1, System.Func`2[T,TR])" attrs="150">\r
- <size>37</size>\r
- </method>\r
- </type>\r
<type name="NameCollisionTest.C">\r
<method name="Void Main()" attrs="150">\r
<size>79</size>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<TR>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>93</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="NameCollisionTest.Ex">\r
+ <method name="System.Collections.Generic.IEnumerable`1[TR] Foo[T,TR](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,TR])" attrs="150">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="NameCollisionTest.Ex+<Foo>c__Iterator0`2[T,TR]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[TR] System.Collections.Generic.IEnumerable<TR>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-16.cs">\r
<type name="C">\r
</method>\r
</type>\r
<type name="C+<Test_1>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__0()" attrs="131">\r
- <size>74</size>\r
- </method>\r
<method name="<>__AnonType0`2[System.Int32,System.Int32] <>m__2(Int32)" attrs="145">\r
<size>16</size>\r
</method>\r
</method>\r
</type>\r
<type name="C+<Test_2>c__AnonStorey1">\r
- <method name="IEnumerable`1 <>m__4()" attrs="131">\r
- <size>74</size>\r
- </method>\r
<method name="<>__AnonType0`2[System.Int32,System.Int32] <>m__5(Int32)" attrs="145">\r
<size>16</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C+<Test_1>c__AnonStorey0">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__0()" attrs="131">\r
+ <size>74</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test_2>c__AnonStorey1">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__4()" attrs="131">\r
+ <size>74</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-17.cs">\r
<type name="TestGroupBy">\r
<method name="Boolean <Main>m__10(Int32)" attrs="145">\r
<size>39</size>\r
</method>\r
- <method name="Int32 <Main>m__11(Int32, IEnumerable`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="Int32 <Main>m__11(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-19.cs">\r
<type name="Test">\r
</method>\r
</type>\r
<type name="Program+<Main>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__0(Int32)" attrs="131">\r
- <size>15</size>\r
- </method>\r
<method name="System.Action <>m__1(Int32, Int32)" attrs="131">\r
<size>48</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Program+<Main>c__AnonStorey0">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] <>m__0(Int32)" attrs="131">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-22.cs">\r
<type name="Test.MainClass">\r
<method name="Void <Main>m__0()" attrs="145">\r
<size>162</size>\r
</method>\r
- <method name="IEnumerable`1 <Main>m__1(A)" attrs="145">\r
- <size>15</size>\r
- </method>\r
<method name="<>__AnonType0`2[A,B] <Main>m__2(A, B)" attrs="145">\r
<size>16</size>\r
</method>\r
<size>21</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[B] <Main>m__1(A)" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-26.cs">\r
<type name="Test.S`1[T]">\r
</method>\r
</type>\r
<type name="C+<Main>c__AnonStorey0">\r
- <method name="IEnumerable`1 <>m__1(System.String)" attrs="131">\r
- <size>82</size>\r
- </method>\r
<method name="<>__AnonType0`2[System.String,System.Boolean] <>m__2(System.String)" attrs="145">\r
<size>55</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C+<Main>c__AnonStorey0">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Boolean] <>m__1(System.String)" attrs="131">\r
+ <size>82</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-linq-28.cs">\r
<type name="C">\r
<method name="<>__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]] <Main>m__0(Char)" attrs="145">\r
<size>54</size>\r
</method>\r
- <method name="IEnumerable`1 <Main>m__1(<>__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">\r
- <size>15</size>\r
- </method>\r
<method name="Char <Main>m__2(Char)" attrs="145">\r
<size>10</size>\r
</method>\r
<size>21</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] <Main>m__1(<>__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-named-01.cs">\r
<type name="C">\r
</test>\r
<test name="gtest-optional-02.cs">\r
<type name="C">\r
- <method name="Boolean Test3(Nullable`1)" attrs="150">\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>160</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ <method name="Boolean Test3(System.Nullable`1[System.Int32])" attrs="150">\r
<size>29</size>\r
</method>\r
- <method name="Boolean Test2(Nullable`1)" attrs="150">\r
+ <method name="Boolean Test2(System.Nullable`1[System.Int32])" attrs="150">\r
<size>19</size>\r
</method>\r
- <method name="Int32 Test(Nullable`1)" attrs="150">\r
+ <method name="Int32 Test(System.Nullable`1[System.Int32])" attrs="150">\r
<size>35</size>\r
</method>\r
- <method name="Int64 Test4(Nullable`1)" attrs="150">\r
+ <method name="Int64 Test4(System.Nullable`1[System.Int64])" attrs="150">\r
<size>16</size>\r
</method>\r
- <method name="Int32 Main()" attrs="150">\r
- <size>160</size>\r
- </method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
- </method>\r
</type>\r
</test>\r
<test name="gtest-optional-03.cs">\r
<method name="Void TestParams(Int32)" attrs="145">\r
<size>2</size>\r
</method>\r
- <method name="Void TestStruct(Nullable`1)" attrs="145">\r
- <size>25</size>\r
- </method>\r
- <method name="Void TestStruct2(Nullable`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="System.String get_Item(Int32, System.String)" attrs="2182">\r
<size>10</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void TestStruct(System.Nullable`1[System.Int32])" attrs="145">\r
+ <size>25</size>\r
+ </method>\r
+ <method name="Void TestStruct2(System.Nullable`1[S])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-optional-05.cs">\r
<method name="Void I.Explicit()" attrs="481">\r
<size>18</size>\r
</method>\r
- <method name="IEnumerable`1 Enumerator()" attrs="145">\r
- <size>23</size>\r
- </method>\r
<method name="Void GenericMethod[T]()" attrs="134">\r
<size>18</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>88</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="CallerMemberTest">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Enumerator()" attrs="145">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="CallerMemberTest+<Enumerator>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-optional-23.cs">\r
<type name="CallerLineNumberTest">\r
</test>\r
<test name="gtest-optional-27.cs">\r
<type name="EnumWrapperCtor`1[T]">\r
- <method name="Test getValue()" attrs="134">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor(Test)" attrs="6278">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="EnumWrapperCtor`1[T]">\r
+ <method name="EnumWrapperCtor`1+Test[T] getValue()" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-partial-01.cs">\r
<type name="B`1[U]">\r
</test>\r
<test name="gtest-variance-11.cs">\r
<type name="D">\r
- <method name="Boolean Contra[T](IContravariant`1, IContravariant`1)" attrs="150">\r
- <size>49</size>\r
- </method>\r
- <method name="Boolean Covariant[T](ICovariant`1, ICovariant`1)" attrs="150">\r
- <size>49</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>58</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Boolean Contra[T](IContravariant`1[T], IContravariant`1[T])" attrs="150">\r
+ <size>49</size>\r
+ </method>\r
+ <method name="Boolean Covariant[T](ICovariant`1[T], ICovariant`1[T])" attrs="150">\r
+ <size>49</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-variance-12.cs">\r
</test>\r
<test name="gtest-variance-13.cs">\r
<type name="A">\r
- <method name="Void Foo[T](T, IList`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Void Test()" attrs="150">\r
<size>18</size>\r
</method>\r
</method>\r
</type>\r
<type name="B">\r
- <method name="Void Foo[T](T, I`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
- <method name="Void Test[U](U, I`1)" attrs="145">\r
- <size>9</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="A">\r
+ <method name="Void Foo[T](T, System.Collections.Generic.IList`1[T])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
+ </type>\r
+ <type name="B">\r
+ <method name="Void Foo[T](T, I`1[T])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void Test[U](U, I`1[U])" attrs="145">\r
+ <size>9</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="gtest-variance-14.cs">\r
<type name="A">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="T Foo[T](T, I`1)" attrs="145">\r
- <size>10</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>58</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="T Foo[T](T, I`1[T])" attrs="145">\r
+ <size>10</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="gtest-variance-17.cs">\r
</test>\r
<test name="gtest-variance-6.cs">\r
<type name="Cov1`1[U]">\r
- <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
- <size>0</size>\r
- </method>\r
- <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
- <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ </type>\r
+ <type name="Cov2`1[U]">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
+ </type>\r
+ <type name="Cov3`1[U]">\r
<method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Cov2`1[U]">\r
- <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
+ <type name="Cov4`1[U]">\r
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
- <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ </type>\r
+ <type name="Cov5`1[U]">\r
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
<method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Cov3`1[U]">\r
- <method name="ICovariant`1 Invoke(IContravariant`1)" attrs="454">\r
+ <type name="Contra5`1[U]">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(IContravariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ </type>\r
+ <type name="Contra6`1[U]">\r
+ <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
+ </type>\r
+ <type name="Contra7`1[U]">\r
<method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Cov4`1[U]">\r
- <method name="ICovariant`1 Invoke()" attrs="454">\r
+ <type name="Contra8`1[U]">\r
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
- <size>0</size>\r
+ </type>\r
+ <type name="Program">\r
+ <method name="Void Main()" attrs="150">\r
+ <size>2</size>\r
</method>\r
- <method name="ICovariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
- <size>0</size>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ </type>\r
+ <type name="Cov1`1[U]">\r
+ <method name="ICovariant`1[U] Invoke(IContravariant`1[U])" attrs="454">\r
<size>0</size>\r
</method>\r
- </type>\r
- <type name="Cov5`1[U]">\r
- <method name="IContravariant`1 Invoke()" attrs="454">\r
+ <method name="IAsyncResult BeginInvoke(IContravariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
+ <method name="ICovariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ </type>\r
+ <type name="Cov2`1[U]">\r
+ <method name="ICovariant`1[U] Invoke(IContravariant`1[ICovariant`1[U]])" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ <method name="IAsyncResult BeginInvoke(IContravariant`1[ICovariant`1[U]], System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- </type>\r
- <type name="Contra5`1[U]">\r
- <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+ <method name="ICovariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ </type>\r
+ <type name="Cov3`1[U]">\r
+ <method name="ICovariant`1[IContravariant`1[IContravariant`1[U]]] Invoke(IContravariant`1[IContravariant`1[IContravariant`1[ICovariant`1[U]]]])" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ <method name="IAsyncResult BeginInvoke(IContravariant`1[IContravariant`1[IContravariant`1[ICovariant`1[U]]]], System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ <method name="ICovariant`1[IContravariant`1[IContravariant`1[U]]] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Contra6`1[U]">\r
- <method name="IContravariant`1 Invoke()" attrs="454">\r
+ <type name="Cov4`1[U]">\r
+ <method name="ICovariant`1[System.Int32] Invoke()" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">\r
+ <method name="ICovariant`1[System.Int32] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ </type>\r
+ <type name="Cov5`1[U]">\r
+ <method name="IContravariant`1[System.Int32] Invoke()" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ <method name="IContravariant`1[System.Int32] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Contra7`1[U]">\r
- <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+ <type name="Contra5`1[U]">\r
+ <method name="IContravariant`1[U[]] Invoke(U, ICovariant`1[U])" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ <method name="IContravariant`1[U[]] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ </type>\r
+ <type name="Contra6`1[U]">\r
+ <method name="IContravariant`1[U[]] Invoke()" attrs="454">\r
<size>0</size>\r
</method>\r
- </type>\r
- <type name="Contra8`1[U]">\r
- <method name="IContravariant`1 Invoke(U, ICovariant`1)" attrs="454">\r
+ <method name="IContravariant`1[U[]] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IAsyncResult BeginInvoke(U, ICovariant`1, System.AsyncCallback, System.Object)" attrs="454">\r
+ </type>\r
+ <type name="Contra7`1[U]">\r
+ <method name="IContravariant`1[U] Invoke(U, ICovariant`1[U])" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="IContravariant`1 EndInvoke(IAsyncResult)" attrs="454">\r
+ <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
<size>0</size>\r
</method>\r
- <method name="Void .ctor(Object, IntPtr)" attrs="6278">\r
+ <method name="IContravariant`1[U] EndInvoke(IAsyncResult)" attrs="454">\r
<size>0</size>\r
</method>\r
</type>\r
- <type name="Program">\r
- <method name="Void Main()" attrs="150">\r
- <size>2</size>\r
+ <type name="Contra8`1[U]">\r
+ <method name="IContravariant`1[ICovariant`1[U]] Invoke(U, ICovariant`1[U])" attrs="454">\r
+ <size>0</size>\r
</method>\r
- <method name="Void .ctor()" attrs="6278">\r
- <size>7</size>\r
+ <method name="IAsyncResult BeginInvoke(U, ICovariant`1[U], System.AsyncCallback, System.Object)" attrs="454">\r
+ <size>0</size>\r
+ </method>\r
+ <method name="IContravariant`1[ICovariant`1[U]] EndInvoke(IAsyncResult)" attrs="454">\r
+ <size>0</size>\r
</method>\r
</type>\r
</test>\r
</test>\r
<test name="gtest-variance-9.cs">\r
<type name="Test">\r
- <method name="Void Foo(IIn`1)" attrs="145">\r
- <size>2</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>18</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void Foo(IIn`1[System.String])" attrs="145">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-1.cs">\r
<size>2</size>\r
</method>\r
<method name="Int32 Main()" attrs="150">\r
- <size>51</size>\r
+ <size>178</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="Void test2()" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void test3()" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
+ <method name="Void test4()" attrs="134">\r
+ <size>2</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-182.cs">\r
</type>\r
</test>\r
<test name="test-285.cs">\r
- <type name="T">\r
- <method name="Int32 Main()" attrs="150">\r
- <size>11</size>\r
+ <type name="Test">\r
+ <method name="Int32 test1()" attrs="145">\r
+ <size>73</size>\r
+ </method>\r
+ <method name="Int32 test2()" attrs="145">\r
+ <size>73</size>\r
+ </method>\r
+ <method name="Int32 Main()" attrs="145">\r
+ <size>46</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<test name="test-510.cs">\r
<type name="Foo">\r
<method name="Void test39(Int32 ByRef)" attrs="145">\r
- <size>37</size>\r
+ <size>41</size>\r
</method>\r
<method name="Void Main()" attrs="150">\r
<size>29</size>\r
<test name="test-618.cs">\r
<type name="C">\r
<method name="Void ZeroBasedReductions()" attrs="150">\r
- <size>16</size>\r
+ <size>22</size>\r
</method>\r
<method name="Void ZeroBasedReductionsWithConversion()" attrs="150">\r
- <size>16</size>\r
+ <size>18</size>\r
</method>\r
<method name="Int32 Main()" attrs="150">\r
<size>41</size>\r
<test name="test-640.cs">\r
<type name="C">\r
<method name="Int32 Main()" attrs="150">\r
- <size>128</size>\r
+ <size>125</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</type>\r
<type name="Program">\r
<method name="Int32 Main()" attrs="150">\r
- <size>438</size>\r
+ <size>410</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<method name="Int32 GetItem()" attrs="150">\r
<size>59</size>\r
</method>\r
- <method name="IEnumerable`1 GetItems()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>76</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetItems()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<GetItems>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-105.cs">\r
<type name="Hello">\r
</method>\r
</type>\r
<type name="Foo">\r
- <method name="IEnumerable`1 Test(Foo)" attrs="134">\r
- <size>42</size>\r
- </method>\r
<method name="Void Hello(Int32)" attrs="134">\r
<size>20</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Foo>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>113</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo">\r
+ <method name="System.Collections.Generic.IEnumerable`1[Foo] Test(Foo)" attrs="134">\r
+ <size>42</size>\r
+ </method>\r
+ </type>\r
+ <type name="Foo+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Foo] System.Collections.Generic.IEnumerable<Foo>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-106.cs">\r
<type name="Foo`2[R,S]">\r
</method>\r
</type>\r
<type name="X">\r
- <method name="IEnumerable`1 Test(Int32)" attrs="150">\r
- <size>30</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>62</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>181</size>\r
</method>\r
<size>23</size>\r
</method>\r
</type>\r
+ <type name="X">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test(Int32)" attrs="150">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-108.cs">\r
<type name="Foo">\r
<method name="Foo op_Implicit(Test)" attrs="2198">\r
<size>38</size>\r
</method>\r
- <method name="IEnumerable`1 op_Addition(Test, Test)" attrs="2198">\r
- <size>37</size>\r
- </method>\r
- <method name="IEnumerable`1 get_Foo()" attrs="2182">\r
- <size>23</size>\r
- </method>\r
- <method name="Void set_Foo(IEnumerable`1)" attrs="2182">\r
- <size>12</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>82</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<Test>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>113</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>72</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] get_Foo()" attrs="2182">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="Void set_Foo(System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="2182">\r
+ <size>12</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[Test] op_Addition(Test, Test)" attrs="2198">\r
+ <size>37</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<op_Addition>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[Test] System.Collections.Generic.IEnumerable<Test>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-11.cs">\r
<type name="D">\r
</test>\r
<test name="test-anon-110.cs">\r
<type name="X">\r
- <method name="IEnumerable`1 Test[T](T, T)" attrs="134">\r
- <size>44</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>110</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>125</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="X">\r
+ <method name="System.Collections.Generic.IEnumerable`1[T] Test[T](T, T)" attrs="134">\r
+ <size>44</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<Test>c__Iterator0`1[T]">\r
+ <method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable<T>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-111.cs">\r
<type name="Foo">\r
<method name="Void Closure(EmptyDelegate)" attrs="145">\r
<size>2</size>\r
</method>\r
- <method name="System.Collections.Generic.List`1[T] Query[T](Nullable`1 ByRef)" attrs="145">\r
- <size>61</size>\r
- </method>\r
<method name="T MakeSomething[T]()" attrs="145">\r
<size>15</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="BaseObject">\r
+ <method name="System.Collections.Generic.List`1[T] Query[T](System.Nullable`1[System.Int32] ByRef)" attrs="145">\r
+ <size>61</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-122.cs">\r
<type name="D1">\r
</test>\r
<test name="test-anon-123.cs">\r
<type name="MemberAccessData">\r
- <method name="Void set_MyTypeProperty(Nullable`1)" attrs="2182">\r
- <size>9</size>\r
- </method>\r
- <method name="Nullable`1 get_MyTypeProperty()" attrs="2182">\r
- <size>15</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="MemberAccessData">\r
+ <method name="Void set_MyTypeProperty(System.Nullable`1[System.Int32])" attrs="2182">\r
+ <size>9</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Int32] get_MyTypeProperty()" attrs="2182">\r
+ <size>15</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-124.cs">\r
<type name="Disposable`1[T]">\r
<size>42</size>\r
</method>\r
<method name="Int32 Main()" attrs="150">\r
- <size>645</size>\r
+ <size>683</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<Finally>c__AnonStorey6`1[T]">\r
+ <type name="Test+<ArrayMultiMutate>c__AnonStoreyC`1[T]">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test">\r
+ <method name="System.Func`1[T] Catch_2[T](T)" attrs="145">\r
+ <size>34</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<Catch_2>c__AnonStorey6`1[T]">\r
<method name="T <>m__6()" attrs="131">\r
- <size>62</size>\r
+ <size>42</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<Using>c__AnonStorey7`1[T]">\r
+ <type name="Test+<Finally>c__AnonStorey7`1[T]">\r
<method name="T <>m__7()" attrs="131">\r
- <size>15</size>\r
+ <size>62</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<Switch>c__AnonStorey8`1[T]">\r
+ <type name="Test+<Using>c__AnonStorey8`1[T]">\r
<method name="T <>m__8()" attrs="131">\r
- <size>16</size>\r
+ <size>15</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<ForForeach>c__AnonStorey9`1[T]">\r
- <method name="System.Collections.Generic.List`1[T] <>m__9()" attrs="131">\r
- <size>67</size>\r
+ <type name="Test+<Switch>c__AnonStorey9`1[T]">\r
+ <method name="T <>m__9()" attrs="131">\r
+ <size>16</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<ArrayMutate>c__AnonStoreyA`1[T]">\r
- <method name="Void <>m__A(Int32)" attrs="131">\r
- <size>39</size>\r
+ <type name="Test+<ForForeach>c__AnonStoreyA`1[T]">\r
+ <method name="System.Collections.Generic.List`1[T] <>m__A()" attrs="131">\r
+ <size>67</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<ArrayMultiMutate>c__AnonStoreyB`1[T]">\r
- <method name="T[][] <>m__B()" attrs="131">\r
- <size>58</size>\r
+ <type name="Test+<ArrayMutate>c__AnonStoreyB`1[T]">\r
+ <method name="Void <>m__B(Int32)" attrs="131">\r
+ <size>39</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
<type name="Test+<ArrayMultiMutate>c__AnonStoreyC`1[T]">\r
- <method name="Int32 <>m__C()" attrs="131">\r
+ <method name="T[][] <>m__C()" attrs="131">\r
+ <size>58</size>\r
+ </method>\r
+ </type>\r
+ <type name="Test+<ArrayMultiMutate>c__AnonStoreyD`1[T]">\r
+ <method name="Int32 <>m__D()" attrs="131">\r
<size>35</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
- <type name="Test+<NestedTypeMutate>c__AnonStoreyD`1[T]">\r
- <method name="T[] <>m__D()" attrs="131">\r
+ <type name="Test+<NestedTypeMutate>c__AnonStoreyE`1[T]">\r
+ <method name="T[] <>m__E()" attrs="131">\r
<size>45</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
</method>\r
</type>\r
<type name="Test">\r
- <method name="Void Foo[T](IEqualityComparer`1)" attrs="145">\r
- <size>28</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>16</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Void Foo[T](System.Collections.Generic.IEqualityComparer`1[T])" attrs="145">\r
+ <size>28</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-126.cs">\r
<type name="MonoBugs.BrokenGenericCast">\r
<method name="Boolean TryAction[T](Test+Creator`1[T], T ByRef)" attrs="145">\r
<size>25</size>\r
</method>\r
- <method name="Boolean Func1[T](IList`1, Boolean, T ByRef)" attrs="145">\r
- <size>40</size>\r
- </method>\r
- <method name="T Item[T](IList`1)" attrs="150">\r
- <size>15</size>\r
- </method>\r
- <method name="T GetSingleItem[T](IList`1)" attrs="150">\r
- <size>18</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>16</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Boolean Func1[T](System.Collections.Generic.IList`1[T], Boolean, T ByRef)" attrs="145">\r
+ <size>40</size>\r
+ </method>\r
+ <method name="T Item[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="T GetSingleItem[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+ <size>18</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-13.cs">\r
<type name="D">\r
<method name="Void Assert(System.Action`1[System.Int32])" attrs="150">\r
<size>10</size>\r
</method>\r
- <method name="Void Foo[T](IList`1)" attrs="150">\r
- <size>32</size>\r
- </method>\r
<method name="Void Main(System.String[])" attrs="150">\r
<size>8</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
- </test>\r
- <test name="test-anon-133.cs">\r
- <type name="IEnumerableRocks">\r
- <method name="System.String Implode[TSource,TResult](IEnumerable`1, System.String, System.Func`2[TSource,TResult])" attrs="150">\r
- <size>41</size>\r
- </method>\r
- <method name="System.String Implode[TSource](IEnumerable`1, System.String, System.Action`2[System.Text.StringBuilder,TSource])" attrs="150">\r
- <size>146</size>\r
+ <type name="Program">\r
+ <method name="Void Foo[T](System.Collections.Generic.IList`1[T])" attrs="150">\r
+ <size>32</size>\r
</method>\r
</type>\r
+ </test>\r
+ <test name="test-anon-133.cs">\r
<type name="Test">\r
<method name="Void Main()" attrs="150">\r
<size>68</size>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="IEnumerableRocks">\r
+ <method name="System.String Implode[TSource,TResult](System.Collections.Generic.IEnumerable`1[TSource], System.String, System.Func`2[TSource,TResult])" attrs="150">\r
+ <size>41</size>\r
+ </method>\r
+ <method name="System.String Implode[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.String, System.Action`2[System.Text.StringBuilder,TSource])" attrs="150">\r
+ <size>146</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-134.cs">\r
<type name="MyClass">\r
</test>\r
<test name="test-anon-138.cs">\r
<type name="Foo`1[T]">\r
- <method name="Boolean ContainsAll[U](IEnumerable`1)" attrs="134">\r
- <size>48</size>\r
- </method>\r
<method name="Boolean Contains(T)" attrs="134">\r
<size>10</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo`1[T]">\r
+ <method name="Boolean ContainsAll[U](System.Collections.Generic.IEnumerable`1[U])" attrs="134">\r
+ <size>48</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-139.cs">\r
<type name="Test">\r
<method name="Void Test_1[T](T)" attrs="134">\r
<size>34</size>\r
</method>\r
- <method name="Void Test_2[T](Nullable`1)" attrs="134">\r
- <size>34</size>\r
- </method>\r
<method name="T Test_3[T](System.Object)" attrs="134">\r
<size>59</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Test">\r
+ <method name="Void Test_2[T](System.Nullable`1[T])" attrs="134">\r
+ <size>34</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-14.cs">\r
<type name="X">\r
</test>\r
<test name="test-anon-141.cs">\r
<type name="C">\r
- <method name="Decimal Average[TSource](IEnumerable`1, System.Func`2[TSource,System.Decimal])" attrs="150">\r
- <size>45</size>\r
- </method>\r
- <method name="TResult Average[TElement,TAggregate,TResult](IEnumerable`1, System.Func`3[TAggregate,TElement,TAggregate], System.Func`3[TAggregate,TElement,TResult])" attrs="145">\r
- <size>7</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="Decimal <Average`1>m__1[TSource](Decimal, Decimal)" attrs="145">\r
<size>15</size>\r
</method>\r
+ <method name="Decimal Average[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Decimal])" attrs="150">\r
+ <size>45</size>\r
+ </method>\r
+ <method name="TResult Average[TElement,TAggregate,TResult](System.Collections.Generic.IEnumerable`1[TElement], System.Func`3[TAggregate,TElement,TAggregate], System.Func`3[TAggregate,TElement,TResult])" attrs="145">\r
+ <size>7</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-anon-142.cs">\r
<method name="Void Main()" attrs="150">\r
<size>33</size>\r
</method>\r
- <method name="Void Test[T](IList`1)" attrs="150">\r
- <size>34</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
<method name="Void <>m__0()" attrs="131">\r
<size>47</size>\r
</method>\r
- <method name="Int32 <>m__1(IList`1)" attrs="145">\r
- <size>9</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="TestCase">\r
+ <method name="Void Test[T](System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="150">\r
+ <size>34</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestCase+<Test>c__AnonStorey0`1[T]">\r
+ <method name="Int32 <>m__1(System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="145">\r
+ <size>9</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-anon-162.cs">\r
<type name="D">\r
</method>\r
</type>\r
</test>\r
+ <test name="test-anon-171.cs">\r
+ <type name="TestAnonSwitch.MyClass">\r
+ <method name="Void add_FirstEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void remove_FirstEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void add_SecondEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void remove_SecondEvent(System.EventHandler`1[System.EventArgs])" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void Trigger()" attrs="134">\r
+ <size>30</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestAnonSwitch.Tester">\r
+ <method name="Void Test()" attrs="134">\r
+ <size>157</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestAnonSwitch.MainClass">\r
+ <method name="Void Main()" attrs="150">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="TestAnonSwitch.Tester+<Test>c__AnonStorey0">\r
+ <method name="Void <>m__0(System.Object, System.EventArgs)" attrs="131">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="Void <>m__1(System.Object, System.EventArgs)" attrs="131">\r
+ <size>23</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="test-anon-18.cs">\r
<type name="A">\r
<method name="Void Invoke()" attrs="454">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>135</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-anon-51.cs">\r
</type>\r
<type name="Tester+<ArrayAccessTest_7>c__async6">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>385</size>\r
+ <size>426</size>\r
</method>\r
<method name="Int32 <>m__14()" attrs="145">\r
<size>9</size>\r
</type>\r
<type name="Tester+<ArrayAccessTest_8>c__async7">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>670</size>\r
+ <size>792</size>\r
</method>\r
<method name="Int32 <>m__15()" attrs="145">\r
<size>9</size>\r
<method name="Void MoveNext()" attrs="486">\r
<size>273</size>\r
</method>\r
- <method name="Nullable`1 <>m__1F()" attrs="145">\r
- <size>17</size>\r
- </method>\r
</type>\r
<type name="Tester+<AssignTest_3>c__asyncB">\r
<method name="Void MoveNext()" attrs="486">\r
</type>\r
<type name="Tester+<BinaryTest_3>c__asyncE">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>1082</size>\r
- </method>\r
- <method name="Nullable`1 <>m__28()" attrs="145">\r
- <size>14</size>\r
- </method>\r
- <method name="Nullable`1 <>m__29()" attrs="145">\r
- <size>17</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2A()" attrs="145">\r
- <size>17</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2B()" attrs="145">\r
- <size>14</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2C()" attrs="145">\r
- <size>17</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2D()" attrs="145">\r
- <size>14</size>\r
+ <size>1137</size>\r
</method>\r
</type>\r
<type name="Tester+<BinaryTest_4>c__asyncF">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>809</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2E()" attrs="145">\r
- <size>14</size>\r
- </method>\r
- <method name="Nullable`1 <>m__2F()" attrs="145">\r
- <size>17</size>\r
- </method>\r
- <method name="Nullable`1 <>m__30()" attrs="145">\r
- <size>20</size>\r
- </method>\r
- <method name="Nullable`1 <>m__31()" attrs="145">\r
- <size>17</size>\r
+ <size>872</size>\r
</method>\r
</type>\r
<type name="Tester+<ArrayAccessTest_1>c__async0">\r
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
<size>13</size>\r
</method>\r
- <method name="Nullable`1 <>m__3D()" attrs="145">\r
- <size>17</size>\r
- </method>\r
<method name="Byte <>m__3E()" attrs="145">\r
<size>9</size>\r
</method>\r
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
<size>13</size>\r
</method>\r
- <method name="Nullable`1 <>m__59()" attrs="145">\r
- <size>14</size>\r
- </method>\r
</type>\r
<type name="Tester+<LogicalUserOperator_1>c__async2A">\r
<method name="Void MoveNext()" attrs="486">\r
</type>\r
<type name="Tester+<UnaryTest_2>c__async3C">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>354</size>\r
+ <size>339</size>\r
</method>\r
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
<size>13</size>\r
</type>\r
<type name="Tester+<UnaryTest_3>c__async3D">\r
<method name="Void MoveNext()" attrs="486">\r
- <size>369</size>\r
+ <size>372</size>\r
</method>\r
<method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
<size>13</size>\r
</method>\r
</type>\r
<type name="Tester+<UnaryTest_2>c__async3C+<UnaryTest_2>c__AnonStorey47">\r
- <method name="Nullable`1 <>m__7D()" attrs="131">\r
- <size>14</size>\r
- </method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Tester+<AssignTest_2>c__asyncA">\r
+ <method name="System.Nullable`1[System.SByte] <>m__1F()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<BinaryTest_3>c__asyncE">\r
+ <method name="System.Nullable`1[System.Boolean] <>m__28()" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Boolean] <>m__29()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Boolean] <>m__2A()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Boolean] <>m__2B()" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Boolean] <>m__2C()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Boolean] <>m__2D()" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<BinaryTest_4>c__asyncF">\r
+ <method name="System.Nullable`1[System.Int16] <>m__2E()" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Byte] <>m__2F()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Decimal] <>m__30()" attrs="145">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="System.Nullable`1[System.Decimal] <>m__31()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<CoalescingTest_2>c__async19">\r
+ <method name="System.Nullable`1[System.Int16] <>m__3D()" attrs="145">\r
+ <size>17</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<IsTest_2>c__async29">\r
+ <method name="System.Nullable`1[System.UInt32] <>m__59()" attrs="145">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
+ <type name="Tester+<UnaryTest_2>c__async3C+<UnaryTest_2>c__AnonStorey47">\r
+ <method name="System.Nullable`1[System.Int16] <>m__7D()" attrs="131">\r
+ <size>14</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-async-14.cs">\r
<type name="C">\r
</test>\r
<test name="test-async-30.cs">\r
<type name="C">\r
- <method name="IEnumerable`1 Test(System.String)" attrs="129">\r
- <size>30</size>\r
- </method>\r
- <method name="IEnumerable`1 Test2()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="Int32 Main()" attrs="150">\r
<size>214</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>138</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>137</size>\r
</method>\r
<size>13</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] Test(System.String)" attrs="129">\r
+ <size>30</size>\r
+ </method>\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] Test2()" attrs="129">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test2>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.String] System.Collections.Generic.IEnumerable<string>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-async-31.cs">\r
<type name="C">\r
</method>\r
</type>\r
</test>\r
+ <test name="test-async-42.cs">\r
+ <type name="A">\r
+ <method name="System.Threading.Tasks.Task`1[System.Int32] OpenAsync()" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="C">\r
+ <method name="A get_Connection()" attrs="2182">\r
+ <size>14</size>\r
+ </method>\r
+ <method name="Int32 Main()" attrs="150">\r
+ <size>26</size>\r
+ </method>\r
+ <method name="System.Threading.Tasks.Task`1[System.Int32] Foo()" attrs="129">\r
+ <size>41</size>\r
+ </method>\r
+ <method name="T Test[T](System.Func`1[T])" attrs="129">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="System.Threading.Tasks.Task <Foo>m__0()" attrs="129">\r
+ <size>41</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Foo>c__async0">\r
+ <method name="Void MoveNext()" attrs="486">\r
+ <size>189</size>\r
+ </method>\r
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+ <size>13</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Foo>c__async3">\r
+ <method name="Void MoveNext()" attrs="486">\r
+ <size>169</size>\r
+ </method>\r
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+ <size>13</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="test-async-43.cs">\r
<type name="A">\r
<method name="System.Threading.Tasks.Task`1[System.Int32] GetValue(Int32)" attrs="134">\r
</method>\r
</type>\r
</test>\r
+ <test name="test-async-47.cs">\r
+ <type name="C">\r
+ <method name="Void Main()" attrs="150">\r
+ <size>12</size>\r
+ </method>\r
+ <method name="Void Test()" attrs="129">\r
+ <size>32</size>\r
+ </method>\r
+ <method name="Void <Test>m__0(System.Object, System.EventArgs)" attrs="129">\r
+ <size>35</size>\r
+ </method>\r
+ <method name="Void <Test>m__1()" attrs="129">\r
+ <size>8</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="View">\r
+ <method name="Void add_Click(System.EventHandler)" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void remove_Click(System.EventHandler)" attrs="2182">\r
+ <size>42</size>\r
+ </method>\r
+ <method name="Void Run()" attrs="134">\r
+ <size>15</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="Builder">\r
+ <method name="Void SetButton(System.Action)" attrs="134">\r
+ <size>8</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__async0">\r
+ <method name="Void MoveNext()" attrs="486">\r
+ <size>61</size>\r
+ </method>\r
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+ <size>13</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
+ <test name="test-async-48.cs">\r
+ <type name="App">\r
+ <method name="System.Threading.Tasks.Task Test()" attrs="134">\r
+ <size>41</size>\r
+ </method>\r
+ <method name="System.Threading.Tasks.Task <Test>m__0()" attrs="129">\r
+ <size>41</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>18</size>\r
+ </method>\r
+ </type>\r
+ <type name="X">\r
+ <method name="Void Main()" attrs="150">\r
+ <size>19</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="App+<Test>c__async0">\r
+ <method name="Void MoveNext()" attrs="486">\r
+ <size>173</size>\r
+ </method>\r
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+ <size>13</size>\r
+ </method>\r
+ </type>\r
+ <type name="App+<Test>c__async1">\r
+ <method name="Void MoveNext()" attrs="486">\r
+ <size>51</size>\r
+ </method>\r
+ <method name="Void SetStateMachine(IAsyncStateMachine)" attrs="486">\r
+ <size>13</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="test-cls-00.cs">\r
<type name="CLSCLass_6">\r
<method name="Void add_Disposed(Delegate)" attrs="2182">\r
<method name="Void Switch_1(Int32)" attrs="129">\r
<size>61</size>\r
</method>\r
- <method name="Void Switch_2(Nullable`1)" attrs="129">\r
- <size>57</size>\r
- </method>\r
<method name="Void Switch_3(System.String)" attrs="129">\r
<size>211</size>\r
</method>\r
<method name="Void ForEach_4(System.Int32[,])" attrs="129">\r
<size>78</size>\r
</method>\r
+ <method name="Void Switch_2(System.Nullable`1[System.Int32])" attrs="129">\r
+ <size>57</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-debug-12.cs">\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
- <method name="IEnumerable`1 Iter_1()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="IEnumerable Iter_2()" attrs="129">\r
<size>23</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>72</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>26</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Iter_1()" attrs="129">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Iter_1>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Iter_2>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-debug-14.cs">\r
<type name="C">\r
</test>\r
<test name="test-debug-21.cs">\r
<type name="C">\r
- <method name="IEnumerable`1 Test()" attrs="129">\r
- <size>23</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>2</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Void <>__Finally0()" attrs="129">\r
<size>13</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] Test()" attrs="129">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<Test>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-debug-22.cs">\r
<type name="A">\r
</method>\r
</type>\r
<type name="C">\r
- <method name="IEnumerable`1 GetIter()" attrs="134">\r
- <size>30</size>\r
- </method>\r
<method name="Int32 Foo()" attrs="198">\r
<size>7</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>82</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="C">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] GetIter()" attrs="134">\r
+ <size>30</size>\r
+ </method>\r
+ </type>\r
+ <type name="C+<GetIter>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable<int>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-debug-23.cs">\r
<type name="Program">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>149</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-02.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>159</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>246</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="X+<GetIt>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<GetMulti>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-iter-04.cs">\r
<type name="X">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>130</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-05.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>191</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-06.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>198</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>159</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>154</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>159</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="S+<Get>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
+ </type>\r
+ <type name="S+<GetS>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<Get>c__Iterator2">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
+ <type name="X+<GetS>c__Iterator3">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-iter-07.cs">\r
<type name="Test">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>264</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-08.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>377</size>\r
</method>\r
<method name="Void <>__Finally0()" attrs="129">\r
<size>23</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-09.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>168</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-11.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>190</size>\r
</method>\r
<method name="Void <>__Finally0()" attrs="129">\r
<size>20</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-13.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>27</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-14.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>98</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-15.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>38</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-17.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>168</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-18.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>214</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-iter-19.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>40</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>242</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="X+<GetIt>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>40</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-iter-22.cs">\r
<type name="Test">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>117</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="X+<GetIt2>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-iter-25.cs">\r
<type name="D">\r
<method name="Void RunOnThread(System.Action)" attrs="150">\r
<size>8</size>\r
</method>\r
- <method name="IEnumerable`1 TagsError()" attrs="150">\r
- <size>23</size>\r
- </method>\r
<method name="Void Main()" attrs="150">\r
<size>68</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>60</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="UploadAction">\r
+ <method name="System.Collections.Generic.IEnumerable`1[System.Object] TagsError()" attrs="150">\r
+ <size>23</size>\r
+ </method>\r
+ </type>\r
+ <type name="UploadAction+<TagsError>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-iter-26.cs">\r
<type name="C">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>52</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>101</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>52</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-named-01.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>76</size>\r
</method>\r
<method name="Void .ctor()" attrs="6278">\r
<size>7</size>\r
</method>\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
</type>\r
</test>\r
<test name="test-partial-13.cs">\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>32</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>32</size>\r
</method>\r
<method name="IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">\r
<size>14</size>\r
</method>\r
- <method name="IEnumerator`1 System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
- <size>26</size>\r
- </method>\r
<method name="Boolean MoveNext()" attrs="486">\r
<size>32</size>\r
</method>\r
<size>7</size>\r
</method>\r
</type>\r
+ <type name="Foo.X+<Attempts2>c__Iterator0">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Foo.X+<>c__Iterator1">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
+ <type name="Foo.X+<>c__Iterator2">\r
+ <method name="System.Collections.Generic.IEnumerator`1[System.Object] System.Collections.Generic.IEnumerable<object>.GetEnumerator()" attrs="481">\r
+ <size>26</size>\r
+ </method>\r
+ </type>\r
</test>\r
<test name="test-partial-16.cs">\r
<type name="A.C">\r
+++ /dev/null
-//
-// Authors:
-// Miguel de Icaza (miguel@novell.com)
-//
-// See the following url for documentation:
-// http://www.mono-project.com/Mono_DataConvert
-//
-// Compilation Options:
-// MONO_DATACONVERTER_PUBLIC:
-// Makes the class public instead of the default internal.
-//
-// MONO_DATACONVERTER_STATIC_METHODS:
-// Exposes the public static methods.
-//
-// TODO:
-// Support for "DoubleWordsAreSwapped" for ARM devices
-//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Text;
-
-#pragma warning disable 3021
-
-namespace Mono {
-
-#if MONO_DATACONVERTER_PUBLIC
- unsafe public abstract class DataConverter {
-#else
- unsafe internal abstract class DataConverter {
-
-// Disables the warning: CLS compliance checking will not be performed on
-// `XXXX' because it is not visible from outside this assembly
-#pragma warning disable 3019
-#endif
- static DataConverter SwapConv = new SwapConverter ();
- static DataConverter CopyConv = new CopyConverter ();
-
- public static readonly bool IsLittleEndian = BitConverter.IsLittleEndian;
-
- public abstract double GetDouble (byte [] data, int index);
- public abstract float GetFloat (byte [] data, int index);
- public abstract long GetInt64 (byte [] data, int index);
- public abstract int GetInt32 (byte [] data, int index);
-
- public abstract short GetInt16 (byte [] data, int index);
-
- [CLSCompliant (false)]
- public abstract uint GetUInt32 (byte [] data, int index);
- [CLSCompliant (false)]
- public abstract ushort GetUInt16 (byte [] data, int index);
- [CLSCompliant (false)]
- public abstract ulong GetUInt64 (byte [] data, int index);
-
- public abstract void PutBytes (byte [] dest, int destIdx, double value);
- public abstract void PutBytes (byte [] dest, int destIdx, float value);
- public abstract void PutBytes (byte [] dest, int destIdx, int value);
- public abstract void PutBytes (byte [] dest, int destIdx, long value);
- public abstract void PutBytes (byte [] dest, int destIdx, short value);
-
- [CLSCompliant (false)]
- public abstract void PutBytes (byte [] dest, int destIdx, ushort value);
- [CLSCompliant (false)]
- public abstract void PutBytes (byte [] dest, int destIdx, uint value);
- [CLSCompliant (false)]
- public abstract void PutBytes (byte [] dest, int destIdx, ulong value);
-
- public byte[] GetBytes (double value)
- {
- byte [] ret = new byte [8];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- public byte[] GetBytes (float value)
- {
- byte [] ret = new byte [4];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- public byte[] GetBytes (int value)
- {
- byte [] ret = new byte [4];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- public byte[] GetBytes (long value)
- {
- byte [] ret = new byte [8];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- public byte[] GetBytes (short value)
- {
- byte [] ret = new byte [2];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- [CLSCompliant (false)]
- public byte[] GetBytes (ushort value)
- {
- byte [] ret = new byte [2];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- [CLSCompliant (false)]
- public byte[] GetBytes (uint value)
- {
- byte [] ret = new byte [4];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- [CLSCompliant (false)]
- public byte[] GetBytes (ulong value)
- {
- byte [] ret = new byte [8];
- PutBytes (ret, 0, value);
- return ret;
- }
-
- static public DataConverter LittleEndian {
- get {
- return BitConverter.IsLittleEndian ? CopyConv : SwapConv;
- }
- }
-
- static public DataConverter BigEndian {
- get {
- return BitConverter.IsLittleEndian ? SwapConv : CopyConv;
- }
- }
-
- static public DataConverter Native {
- get {
- return CopyConv;
- }
- }
-
- static int Align (int current, int align)
- {
- return ((current + align - 1) / align) * align;
- }
-
- class PackContext {
- // Buffer
- public byte [] buffer;
- int next;
-
- public string description;
- public int i; // position in the description
- public DataConverter conv;
- public int repeat;
-
- //
- // if align == -1, auto align to the size of the byte array
- // if align == 0, do not do alignment
- // Any other values aligns to that particular size
- //
- public int align;
-
- public void Add (byte [] group)
- {
- //Console.WriteLine ("Adding {0} bytes to {1} (next={2}", group.Length,
- // buffer == null ? "null" : buffer.Length.ToString (), next);
-
- if (buffer == null){
- buffer = group;
- next = group.Length;
- return;
- }
- if (align != 0){
- if (align == -1)
- next = Align (next, group.Length);
- else
- next = Align (next, align);
- align = 0;
- }
-
- if (next + group.Length > buffer.Length){
- byte [] nb = new byte [System.Math.Max (next, 16) * 2 + group.Length];
- Array.Copy (buffer, nb, buffer.Length);
- Array.Copy (group, 0, nb, next, group.Length);
- next = next + group.Length;
- buffer = nb;
- } else {
- Array.Copy (group, 0, buffer, next, group.Length);
- next += group.Length;
- }
- }
-
- public byte [] Get ()
- {
- if (buffer == null)
- return new byte [0];
-
- if (buffer.Length != next){
- byte [] b = new byte [next];
- Array.Copy (buffer, b, next);
- return b;
- }
- return buffer;
- }
- }
-
- //
- // Format includes:
- // Control:
- // ^ Switch to big endian encoding
- // _ Switch to little endian encoding
- // % Switch to host (native) encoding
- // ! aligns the next data type to its natural boundary (for strings this is 4).
- //
- // Types:
- // s Int16
- // S UInt16
- // i Int32
- // I UInt32
- // l Int64
- // L UInt64
- // f float
- // d double
- // b byte
- // c 1-byte signed character
- // C 1-byte unsigned character
- // z8 string encoded as UTF8 with 1-byte null terminator
- // z6 string encoded as UTF16 with 2-byte null terminator
- // z7 string encoded as UTF7 with 1-byte null terminator
- // zb string encoded as BigEndianUnicode with 2-byte null terminator
- // z3 string encoded as UTF32 with 4-byte null terminator
- // z4 string encoded as UTF32 big endian with 4-byte null terminator
- // $8 string encoded as UTF8
- // $6 string encoded as UTF16
- // $7 string encoded as UTF7
- // $b string encoded as BigEndianUnicode
- // $3 string encoded as UTF32
- // $4 string encoded as UTF-32 big endian encoding
- // x null byte
- //
- // Repeats, these are prefixes:
- // N a number between 1 and 9, indicates a repeat count (process N items
- // with the following datatype
- // [N] For numbers larger than 9, use brackets, for example [20]
- // * Repeat the next data type until the arguments are exhausted
- //
- static public byte [] Pack (string description, params object [] args)
- {
- int argn = 0;
- PackContext b = new PackContext ();
- b.conv = CopyConv;
- b.description = description;
-
- for (b.i = 0; b.i < description.Length; ){
- object oarg;
-
- if (argn < args.Length)
- oarg = args [argn];
- else {
- if (b.repeat != 0)
- break;
-
- oarg = null;
- }
-
- int save = b.i;
-
- if (PackOne (b, oarg)){
- argn++;
- if (b.repeat > 0){
- if (--b.repeat > 0)
- b.i = save;
- else
- b.i++;
- } else
- b.i++;
- } else
- b.i++;
- }
- return b.Get ();
- }
-
- static public byte [] PackEnumerable (string description, IEnumerable args)
- {
- PackContext b = new PackContext ();
- b.conv = CopyConv;
- b.description = description;
-
- IEnumerator enumerator = args.GetEnumerator ();
- bool ok = enumerator.MoveNext ();
-
- for (b.i = 0; b.i < description.Length; ){
- object oarg;
-
- if (ok)
- oarg = enumerator.Current;
- else {
- if (b.repeat != 0)
- break;
- oarg = null;
- }
-
- int save = b.i;
-
- if (PackOne (b, oarg)){
- ok = enumerator.MoveNext ();
- if (b.repeat > 0){
- if (--b.repeat > 0)
- b.i = save;
- else
- b.i++;
- } else
- b.i++;
- } else
- b.i++;
- }
- return b.Get ();
- }
-
- //
- // Packs one datum `oarg' into the buffer `b', using the string format
- // in `description' at position `i'
- //
- // Returns: true if we must pick the next object from the list
- //
- static bool PackOne (PackContext b, object oarg)
- {
- int n;
-
- switch (b.description [b.i]){
- case '^':
- b.conv = BigEndian;
- return false;
- case '_':
- b.conv = LittleEndian;
- return false;
- case '%':
- b.conv = Native;
- return false;
-
- case '!':
- b.align = -1;
- return false;
-
- case 'x':
- b.Add (new byte [] { 0 });
- return false;
-
- // Type Conversions
- case 'i':
- b.Add (b.conv.GetBytes (Convert.ToInt32 (oarg)));
- break;
-
- case 'I':
- b.Add (b.conv.GetBytes (Convert.ToUInt32 (oarg)));
- break;
-
- case 's':
- b.Add (b.conv.GetBytes (Convert.ToInt16 (oarg)));
- break;
-
- case 'S':
- b.Add (b.conv.GetBytes (Convert.ToUInt16 (oarg)));
- break;
-
- case 'l':
- b.Add (b.conv.GetBytes (Convert.ToInt64 (oarg)));
- break;
-
- case 'L':
- b.Add (b.conv.GetBytes (Convert.ToUInt64 (oarg)));
- break;
-
- case 'f':
- b.Add (b.conv.GetBytes (Convert.ToSingle (oarg)));
- break;
-
- case 'd':
- b.Add (b.conv.GetBytes (Convert.ToDouble (oarg)));
- break;
-
- case 'b':
- b.Add (new byte [] { Convert.ToByte (oarg) });
- break;
-
- case 'c':
- b.Add (new byte [] { (byte) (Convert.ToSByte (oarg)) });
- break;
-
- case 'C':
- b.Add (new byte [] { Convert.ToByte (oarg) });
- break;
-
- // Repeat acount;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- b.repeat = ((short) b.description [b.i]) - ((short) '0');
- return false;
-
- case '*':
- b.repeat = Int32.MaxValue;
- return false;
-
- case '[':
- int count = -1, j;
-
- for (j = b.i+1; j < b.description.Length; j++){
- if (b.description [j] == ']')
- break;
- n = ((short) b.description [j]) - ((short) '0');
- if (n >= 0 && n <= 9){
- if (count == -1)
- count = n;
- else
- count = count * 10 + n;
- }
- }
- if (count == -1)
- throw new ArgumentException ("invalid size specification");
- b.i = j;
- b.repeat = count;
- return false;
-
- case '$': case 'z':
- bool add_null = b.description [b.i] == 'z';
- b.i++;
- if (b.i >= b.description.Length)
- throw new ArgumentException ("$ description needs a type specified", "description");
- char d = b.description [b.i];
- Encoding e;
-
- switch (d){
- case '8':
- e = Encoding.UTF8;
- n = 1;
- break;
- case '6':
- e = Encoding.Unicode;
- n = 2;
- break;
- case '7':
- e = Encoding.UTF7;
- n = 1;
- break;
- case 'b':
- e = Encoding.BigEndianUnicode;
- n = 2;
- break;
- case '3':
- e = Encoding.GetEncoding (12000);
- n = 4;
- break;
- case '4':
- e = Encoding.GetEncoding (12001);
- n = 4;
- break;
-
- default:
- throw new ArgumentException ("Invalid format for $ specifier", "description");
- }
- if (b.align == -1)
- b.align = 4;
- b.Add (e.GetBytes (Convert.ToString (oarg)));
- if (add_null)
- b.Add (new byte [n]);
- break;
- default:
- throw new ArgumentException (String.Format ("invalid format specified `{0}'",
- b.description [b.i]));
- }
- return true;
- }
-
- static bool Prepare (byte [] buffer, ref int idx, int size, ref bool align)
- {
- if (align){
- idx = Align (idx, size);
- align = false;
- }
- if (idx + size > buffer.Length){
- idx = buffer.Length;
- return false;
- }
- return true;
- }
-
- static public IList Unpack (string description, byte [] buffer, int startIndex)
- {
- DataConverter conv = CopyConv;
- ArrayList result = new ArrayList ();
- int idx = startIndex;
- bool align = false;
- int repeat = 0, n;
-
- for (int i = 0; i < description.Length && idx < buffer.Length; ){
- int save = i;
-
- switch (description [i]){
- case '^':
- conv = BigEndian;
- break;
- case '_':
- conv = LittleEndian;
- break;
- case '%':
- conv = Native;
- break;
- case 'x':
- idx++;
- break;
-
- case '!':
- align = true;
- break;
-
- // Type Conversions
- case 'i':
- if (Prepare (buffer, ref idx, 4, ref align)){
- result.Add (conv.GetInt32 (buffer, idx));
- idx += 4;
- }
- break;
-
- case 'I':
- if (Prepare (buffer, ref idx, 4, ref align)){
- result.Add (conv.GetUInt32 (buffer, idx));
- idx += 4;
- }
- break;
-
- case 's':
- if (Prepare (buffer, ref idx, 2, ref align)){
- result.Add (conv.GetInt16 (buffer, idx));
- idx += 2;
- }
- break;
-
- case 'S':
- if (Prepare (buffer, ref idx, 2, ref align)){
- result.Add (conv.GetUInt16 (buffer, idx));
- idx += 2;
- }
- break;
-
- case 'l':
- if (Prepare (buffer, ref idx, 8, ref align)){
- result.Add (conv.GetInt64 (buffer, idx));
- idx += 8;
- }
- break;
-
- case 'L':
- if (Prepare (buffer, ref idx, 8, ref align)){
- result.Add (conv.GetUInt64 (buffer, idx));
- idx += 8;
- }
- break;
-
- case 'f':
- if (Prepare (buffer, ref idx, 4, ref align)){
- result.Add (conv.GetDouble (buffer, idx));
- idx += 4;
- }
- break;
-
- case 'd':
- if (Prepare (buffer, ref idx, 8, ref align)){
- result.Add (conv.GetDouble (buffer, idx));
- idx += 8;
- }
- break;
-
- case 'b':
- if (Prepare (buffer, ref idx, 1, ref align)){
- result.Add (buffer [idx]);
- idx++;
- }
- break;
-
- case 'c': case 'C':
- if (Prepare (buffer, ref idx, 1, ref align)){
- char c;
-
- if (description [i] == 'c')
- c = ((char) ((sbyte)buffer [idx]));
- else
- c = ((char) ((byte)buffer [idx]));
-
- result.Add (c);
- idx++;
- }
- break;
-
- // Repeat acount;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- repeat = ((short) description [i]) - ((short) '0');
- save = i + 1;
- break;
-
- case '*':
- repeat = Int32.MaxValue;
- break;
-
- case '[':
- int count = -1, j;
-
- for (j = i+1; j < description.Length; j++){
- if (description [j] == ']')
- break;
- n = ((short) description [j]) - ((short) '0');
- if (n >= 0 && n <= 9){
- if (count == -1)
- count = n;
- else
- count = count * 10 + n;
- }
- }
- if (count == -1)
- throw new ArgumentException ("invalid size specification");
- i = j;
- repeat = count;
- break;
-
- case '$': case 'z':
- // bool with_null = description [i] == 'z';
- i++;
- if (i >= description.Length)
- throw new ArgumentException ("$ description needs a type specified", "description");
- char d = description [i];
- Encoding e;
- if (align){
- idx = Align (idx, 4);
- align = false;
- }
- if (idx >= buffer.Length)
- break;
-
- switch (d){
- case '8':
- e = Encoding.UTF8;
- n = 1;
- break;
- case '6':
- e = Encoding.Unicode;
- n = 2;
- break;
- case '7':
- e = Encoding.UTF7;
- n = 1;
- break;
- case 'b':
- e = Encoding.BigEndianUnicode;
- n = 2;
- break;
- case '3':
- e = Encoding.GetEncoding (12000);
- n = 4;
- break;
- case '4':
- e = Encoding.GetEncoding (12001);
- n = 4;
- break;
-
- default:
- throw new ArgumentException ("Invalid format for $ specifier", "description");
- }
- int k = idx;
- switch (n){
- case 1:
- for (; k < buffer.Length && buffer [k] != 0; k++)
- ;
- result.Add (e.GetChars (buffer, idx, k-idx));
- if (k == buffer.Length)
- idx = k;
- else
- idx = k+1;
- break;
-
- case 2:
- for (; k < buffer.Length; k++){
- if (k+1 == buffer.Length){
- k++;
- break;
- }
- if (buffer [k] == 0 && buffer [k+1] == 0)
- break;
- }
- result.Add (e.GetChars (buffer, idx, k-idx));
- if (k == buffer.Length)
- idx = k;
- else
- idx = k+2;
- break;
-
- case 4:
- for (; k < buffer.Length; k++){
- if (k+3 >= buffer.Length){
- k = buffer.Length;
- break;
- }
- if (buffer[k]==0 && buffer[k+1] == 0 && buffer[k+2] == 0 && buffer[k+3]== 0)
- break;
- }
- result.Add (e.GetChars (buffer, idx, k-idx));
- if (k == buffer.Length)
- idx = k;
- else
- idx = k+4;
- break;
- }
- break;
- default:
- throw new ArgumentException (String.Format ("invalid format specified `{0}'",
- description [i]));
- }
-
- if (repeat > 0){
- if (--repeat > 0)
- i = save;
- } else
- i++;
- }
- return result;
- }
-
- internal void Check (byte [] dest, int destIdx, int size)
- {
- if (dest == null)
- throw new ArgumentNullException ("dest");
- if (destIdx < 0 || destIdx > dest.Length - size)
- throw new ArgumentException ("destIdx");
- }
-
- class CopyConverter : DataConverter {
- public override double GetDouble (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
- double ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override ulong GetUInt64 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ulong ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override long GetInt64 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- long ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override float GetFloat (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- float ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override int GetInt32 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- int ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override uint GetUInt32 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- uint ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override short GetInt16 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- short ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 2; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override ushort GetUInt16 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ushort ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 2; i++)
- b [i] = data [index+i];
-
- return ret;
- }
-
- public override void PutBytes (byte [] dest, int destIdx, double value)
- {
- Check (dest, destIdx, 8);
- fixed (byte *target = &dest [destIdx]){
- long *source = (long *) &value;
-
- *((long *)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, float value)
- {
- Check (dest, destIdx, 4);
- fixed (byte *target = &dest [destIdx]){
- uint *source = (uint *) &value;
-
- *((uint *)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, int value)
- {
- Check (dest, destIdx, 4);
- fixed (byte *target = &dest [destIdx]){
- uint *source = (uint *) &value;
-
- *((uint *)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, uint value)
- {
- Check (dest, destIdx, 4);
- fixed (byte *target = &dest [destIdx]){
- uint *source = (uint *) &value;
-
- *((uint *)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, long value)
- {
- Check (dest, destIdx, 8);
- fixed (byte *target = &dest [destIdx]){
- long *source = (long *) &value;
-
- *((long*)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, ulong value)
- {
- Check (dest, destIdx, 8);
- fixed (byte *target = &dest [destIdx]){
- ulong *source = (ulong *) &value;
-
- *((ulong *) target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, short value)
- {
- Check (dest, destIdx, 2);
- fixed (byte *target = &dest [destIdx]){
- ushort *source = (ushort *) &value;
-
- *((ushort *)target) = *source;
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, ushort value)
- {
- Check (dest, destIdx, 2);
- fixed (byte *target = &dest [destIdx]){
- ushort *source = (ushort *) &value;
-
- *((ushort *)target) = *source;
- }
- }
- }
-
- class SwapConverter : DataConverter {
- public override double GetDouble (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- double ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [7-i] = data [index+i];
-
- return ret;
- }
-
- public override ulong GetUInt64 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ulong ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [7-i] = data [index+i];
-
- return ret;
- }
-
- public override long GetInt64 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- long ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 8; i++)
- b [7-i] = data [index+i];
-
- return ret;
- }
-
- public override float GetFloat (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- float ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [3-i] = data [index+i];
-
- return ret;
- }
-
- public override int GetInt32 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- int ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [3-i] = data [index+i];
-
- return ret;
- }
-
- public override uint GetUInt32 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- uint ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 4; i++)
- b [3-i] = data [index+i];
-
- return ret;
- }
-
- public override short GetInt16 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- short ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 2; i++)
- b [1-i] = data [index+i];
-
- return ret;
- }
-
- public override ushort GetUInt16 (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ushort ret;
- byte *b = (byte *)&ret;
-
- for (int i = 0; i < 2; i++)
- b [1-i] = data [index+i];
-
- return ret;
- }
-
- public override void PutBytes (byte [] dest, int destIdx, double value)
- {
- Check (dest, destIdx, 8);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 8; i++)
- target [i] = source [7-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, float value)
- {
- Check (dest, destIdx, 4);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 4; i++)
- target [i] = source [3-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, int value)
- {
- Check (dest, destIdx, 4);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 4; i++)
- target [i] = source [3-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, uint value)
- {
- Check (dest, destIdx, 4);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 4; i++)
- target [i] = source [3-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, long value)
- {
- Check (dest, destIdx, 8);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 8; i++)
- target [i] = source [7-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, ulong value)
- {
- Check (dest, destIdx, 8);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 4; i++)
- target [i] = source [7-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, short value)
- {
- Check (dest, destIdx, 2);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 2; i++)
- target [i] = source [1-i];
- }
- }
-
- public override void PutBytes (byte [] dest, int destIdx, ushort value)
- {
- Check (dest, destIdx, 2);
-
- fixed (byte *target = &dest [destIdx]){
- byte *source = (byte *) &value;
-
- for (int i = 0; i < 2; i++)
- target [i] = source [1-i];
- }
- }
- }
-
-#if MONO_DATACONVERTER_STATIC_METHODS
- static unsafe void PutBytesLE (byte *dest, byte *src, int count)
- {
- int i = 0;
-
- if (BitConverter.IsLittleEndian){
- for (; i < count; i++)
- *dest++ = *src++;
- } else {
- dest += count;
- for (; i < count; i++)
- *(--dest) = *src++;
- }
- }
-
- static unsafe void PutBytesBE (byte *dest, byte *src, int count)
- {
- int i = 0;
-
- if (BitConverter.IsLittleEndian){
- dest += count;
- for (; i < count; i++)
- *(--dest) = *src++;
- } else {
- for (; i < count; i++)
- *dest++ = *src++;
- }
- }
-
- static unsafe void PutBytesNative (byte *dest, byte *src, int count)
- {
- int i = 0;
-
- for (; i < count; i++)
- dest [i-count] = *src++;
- }
-
- static public unsafe double DoubleFromLE (byte[] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- double ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe float FloatFromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- float ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe long Int64FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- long ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe ulong UInt64FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ulong ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe int Int32FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- int ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe uint UInt32FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- uint ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe short Int16FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- short ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- static public unsafe ushort UInt16FromLE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ushort ret;
- fixed (byte *src = &data[index]){
- PutBytesLE ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- static public unsafe double DoubleFromBE (byte[] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- double ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe float FloatFromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- float ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe long Int64FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- long ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe ulong UInt64FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ulong ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe int Int32FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- int ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe uint UInt32FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- uint ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe short Int16FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- short ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- static public unsafe ushort UInt16FromBE (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ushort ret;
- fixed (byte *src = &data[index]){
- PutBytesBE ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- static public unsafe double DoubleFromNative (byte[] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- double ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe float FloatFromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- float ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe long Int64FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- long ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe ulong UInt64FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 8)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ulong ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 8);
- }
- return ret;
- }
-
- static public unsafe int Int32FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- int ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe uint UInt32FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 4)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- uint ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 4);
- }
- return ret;
- }
-
- static public unsafe short Int16FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- short ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- static public unsafe ushort UInt16FromNative (byte [] data, int index)
- {
- if (data == null)
- throw new ArgumentNullException ("data");
- if (data.Length - index < 2)
- throw new ArgumentException ("index");
- if (index < 0)
- throw new ArgumentException ("index");
-
- ushort ret;
- fixed (byte *src = &data[index]){
- PutBytesNative ((byte *) &ret, src, 2);
- }
- return ret;
- }
-
- unsafe static byte[] GetBytesPtr (byte *ptr, int count)
- {
- byte [] ret = new byte [count];
-
- for (int i = 0; i < count; i++) {
- ret [i] = ptr [i];
- }
-
- return ret;
- }
-
- unsafe static byte[] GetBytesSwap (bool swap, byte *ptr, int count)
- {
- byte [] ret = new byte [count];
-
- if (swap){
- int t = count-1;
- for (int i = 0; i < count; i++) {
- ret [t-i] = ptr [i];
- }
- } else {
- for (int i = 0; i < count; i++) {
- ret [i] = ptr [i];
- }
- }
- return ret;
- }
-
- unsafe public static byte[] GetBytesNative (bool value)
- {
- return GetBytesPtr ((byte *) &value, 1);
- }
-
- unsafe public static byte[] GetBytesNative (char value)
- {
- return GetBytesPtr ((byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesNative (short value)
- {
- return GetBytesPtr ((byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesNative (int value)
- {
- return GetBytesPtr ((byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesNative (long value)
- {
- return GetBytesPtr ((byte *) &value, 8);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesNative (ushort value)
- {
- return GetBytesPtr ((byte *) &value, 2);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesNative (uint value)
- {
- return GetBytesPtr ((byte *) &value, 4);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesNative (ulong value)
- {
- return GetBytesPtr ((byte *) &value, 8);
- }
-
- unsafe public static byte[] GetBytesNative (float value)
- {
- return GetBytesPtr ((byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesNative (double value)
- {
- return GetBytesPtr ((byte *) &value, 8);
- }
-
- unsafe public static byte[] GetBytesLE (bool value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 1);
- }
-
- unsafe public static byte[] GetBytesLE (char value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesLE (short value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesLE (int value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesLE (long value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesLE (ushort value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesLE (uint value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesLE (ulong value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-
- unsafe public static byte[] GetBytesLE (float value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesLE (double value)
- {
- return GetBytesSwap (!BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-
- unsafe public static byte[] GetBytesBE (bool value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 1);
- }
-
- unsafe public static byte[] GetBytesBE (char value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesBE (short value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- unsafe public static byte[] GetBytesBE (int value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesBE (long value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesBE (ushort value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 2);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesBE (uint value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- [CLSCompliant (false)]
- unsafe public static byte[] GetBytesBE (ulong value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-
- unsafe public static byte[] GetBytesBE (float value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 4);
- }
-
- unsafe public static byte[] GetBytesBE (double value)
- {
- return GetBytesSwap (BitConverter.IsLittleEndian, (byte *) &value, 8);
- }
-#endif
-
- }
-}
+++ /dev/null
-thisdir = tools/ildasm
-SUBDIRS =
-include ../../build/rules.make
-
-LOCAL_MCS_FLAGS = -r:Mono.Cecil.dll -D:MONO_DATACONVERTER_STATIC_METHODS -unsafe
-PROGRAM = $(topdir)/class/lib/$(PROFILE)/ildasm.exe
-
-include ../../build/executable.make
+++ /dev/null
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using Mono;
-
-public partial class ILDAsm
-{
- public static int Main (String[] args) {
- if (args.Length != 1) {
- Console.Error.WriteLine ("Usage: ildasm <assembly file>");
- return 1;
- }
-
- var inst = new ILDAsm ();
- return inst.Run (args);
- }
-
- public AssemblyDefinition ad;
- public ModuleDefinition main;
- public TextWriter os;
- public int indent;
- public List<FieldDefinition> fields_with_rva = new List<FieldDefinition> ();
-
- public void WriteLine () {
- os.WriteLine ();
- }
-
- public void WriteLine (String s) {
- for (int i = 0; i < indent; ++i)
- os.Write (" ");
- os.WriteLine (s);
- }
-
- public int Run (String[] args) {
- ad = AssemblyDefinition.ReadAssembly (args [0]);
-
- main = ad.MainModule;
-
- os = Console.Out;
-
- // Emit assembly references
- EmitAssemblyReferences ();
- EmitAssembly ();
- EmitModule ();
- foreach (var typedef in main.Types) {
- // FIXME:
- if (typedef.Name == "<Module>")
- EmitGlobals (typedef);
- else
- EmitType (typedef);
- }
- EmitData ();
-
- return 0;
- }
-
- string EscapeName (string s) {
- bool escape = false;
-
- if (s.Contains ("/")) {
- string[] parts = s.Split ('/');
- var sb = new StringBuilder ();
- for (int i = 0; i < parts.Length; ++i) {
- if (i > 0)
- sb.Append ("/");
- sb.Append (EscapeName (parts [i]));
- }
- return sb.ToString ();
- }
-
- foreach (char c in s) {
- if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_') || (c == '.') || (c == '`')))
- escape = true;
- }
- if (!escape && keyword_table.ContainsKey (s))
- escape = true;
- if (escape)
- return "'" + s + "'";
- else
- return s;
- }
-
- string EscapeString (string s) {
- return s.Replace ("\\", "\\\\").Replace ("\"", "\\\"");
- }
-
- void EmitScope (IMetadataScope s, StringBuilder sb) {
- if (s is AssemblyNameReference) {
- AssemblyNameReference aname = (s as AssemblyNameReference);
- sb.Append ("[" + EscapeName (aname.Name) + "]");
- } else if (s is ModuleDefinition) {
- if (s != main)
- throw new NotImplementedException ();
- } else {
- throw new NotImplementedException (s.GetType ().ToString ());
- }
- }
-
- string StringifyTypeRef (TypeReference t) {
- switch (t.MetadataType) {
- case MetadataType.Void:
- return "void";
- case MetadataType.Boolean:
- return "bool";
- case MetadataType.Char:
- return "char";
- case MetadataType.SByte:
- return "int8";
- case MetadataType.Byte:
- return "unsigned int8";
- case MetadataType.Int16:
- return "int16";
- case MetadataType.UInt16:
- return "unsigned int16";
- case MetadataType.Int32:
- return "int32";
- case MetadataType.UInt32:
- return "unsigned int32";
- case MetadataType.Int64:
- return "int64";
- case MetadataType.UInt64:
- return "unsigned int64";
- case MetadataType.Single:
- return "float32";
- case MetadataType.Double:
- return "float64";
- case MetadataType.String:
- return "string";
- case MetadataType.IntPtr:
- return "native int";
- case MetadataType.UIntPtr:
- //return "unsigned native int";
- return "[mscorlib]System.UIntPtr";
- case MetadataType.TypedByReference:
- return "typedref";
- case MetadataType.Class:
- case MetadataType.Object:
- case MetadataType.ValueType: {
- var sb = new StringBuilder ();
- IMetadataScope s = t.Scope;
- if (t.MetadataType == MetadataType.ValueType)
- sb.Append ("valuetype ");
- else
- sb.Append ("class ");
- EmitScope (s, sb);
- sb.Append (EscapeName (t.FullName));
- return sb.ToString ();
- }
- case MetadataType.Array: {
- ArrayType at = (t as ArrayType);
-
- if (at.IsVector)
- return StringifyTypeRef (at.ElementType) + "[]";
-
- var suffix = new StringBuilder ();
- suffix.Append ("[");
- for (int i = 0; i < at.Dimensions.Count; i++) {
- if (i > 0)
- suffix.Append (",");
-
- suffix.Append (at.Dimensions [i].ToString ());
- }
- suffix.Append ("]");
-
- return StringifyTypeRef (at.ElementType) + suffix;
- }
- case MetadataType.Pointer:
- return StringifyTypeRef ((t as TypeSpecification).ElementType) + "*";
- case MetadataType.ByReference:
- return StringifyTypeRef ((t as TypeSpecification).ElementType) + "&";
- case MetadataType.Pinned:
- return StringifyTypeRef ((t as TypeSpecification).ElementType) + " pinned";
- case MetadataType.GenericInstance: {
- var sb = new StringBuilder ();
- var inst = (t as GenericInstanceType);
- sb.Append (StringifyTypeRef (inst.ElementType));
- sb.Append ("<");
- int aindex = 0;
- foreach (TypeReference arg in inst.GenericArguments) {
- if (aindex > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (arg));
- aindex ++;
- }
- sb.Append (">");
- return sb.ToString ();
- }
- case MetadataType.Var:
- return "!" + (t as GenericParameter).Position;
- case MetadataType.MVar:
- return "!!" + (t as GenericParameter).Position;
- case MetadataType.Sentinel:
- return "..., " + StringifyTypeRef ((t as SentinelType).ElementType);
- case MetadataType.RequiredModifier: {
- var mod = (t as RequiredModifierType);
- if (mod.ModifierType.MetadataType != MetadataType.Class)
- throw new NotImplementedException ();
- var sb = new StringBuilder ();
- sb.Append (StringifyTypeRef (mod.ElementType));
- sb.Append (" modreq (");
- EmitScope (mod.ModifierType.Scope, sb);
- sb.Append (EscapeName (mod.ModifierType.FullName));
- sb.Append (")");
- return sb.ToString ();
- }
- default:
- throw new NotImplementedException ("" + t.MetadataType + " " + t.ToString ());
- }
- }
-
- // Same as StringifyTypeRef, but emit primitive types as [mscorlib]...
- string StringifyTypeRefNoPrim (TypeReference t) {
- switch (t.MetadataType) {
- case MetadataType.Void:
- case MetadataType.Boolean:
- case MetadataType.Char:
- case MetadataType.SByte:
- case MetadataType.Byte:
- case MetadataType.Int16:
- case MetadataType.UInt16:
- case MetadataType.Int32:
- case MetadataType.UInt32:
- case MetadataType.Int64:
- case MetadataType.UInt64:
- case MetadataType.Single:
- case MetadataType.Double:
- case MetadataType.String:
- case MetadataType.IntPtr:
- case MetadataType.UIntPtr:
- case MetadataType.TypedByReference:
- return "[mscorlib]" + t.FullName;
- default:
- return StringifyTypeRef (t);
- }
- }
-
- string StringifyMethodRef (MethodReference method) {
- var sb = new StringBuilder ();
- if (method.CallingConvention == MethodCallingConvention.VarArg)
- sb.Append ("vararg ");
- if (method.HasThis)
- sb.Append ("instance ");
- sb.Append (StringifyTypeRef (method.ReturnType));
- sb.Append (' ');
- sb.Append (StringifyTypeRefNoPrim (method.DeclaringType));
- sb.Append ("::");
- sb.Append (EscapeName (method.Name));
- if (method is GenericInstanceMethod) {
- sb.Append ("<");
- int idx = 0;
- foreach (var gpar in (method as GenericInstanceMethod).GenericArguments) {
- if (idx > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (gpar));
- idx ++;
- }
- sb.Append (">");
- }
- sb.Append ('(');
- int par_index = 0;
- foreach (ParameterReference par in method.Parameters) {
- if (par_index > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (par.ParameterType));
- par_index ++;
- }
- sb.Append (")");
- return sb.ToString ();
- }
-
- string StringifyFieldRef (FieldReference field) {
- var sb = new StringBuilder ();
- sb.Append (StringifyTypeRef (field.FieldType));
- sb.Append (' ');
- sb.Append (StringifyTypeRefNoPrim (field.DeclaringType));
- sb.Append ("::");
- sb.Append (EscapeName (field.Name));
- return sb.ToString ();
- }
-
- void WriteBlob (byte[] blob) {
- int idx = 0;
- while (idx < blob.Length) {
- int len = idx + 16 < blob.Length ? 16 : blob.Length - idx;
- var sb = new StringBuilder ();
- var sb2 = new StringBuilder ();
- for (int i = idx; i < idx + len; ++i) {
- sb.Append (String.Format ("{0:X2} ", blob [i]));
- if (Char.IsLetterOrDigit ((char)blob [i]))
- sb2.Append ((char)blob [i]);
- else
- sb2.Append ('.');
- }
- for (int i = 0; i < 16 - len; ++i)
- sb.Append (" ");
- if (len < 16 || idx + 16 == blob.Length)
- sb.Append (')');
- else
- sb.Append (' ');
- WriteLine (String.Format ("{0} // {1}", sb.ToString (), sb2.ToString ()));
- idx += 16;
- }
- }
-
- string Map (Dictionary <uint, string> map, uint val) {
- string s;
-
- if (map.TryGetValue (val, out s))
- return s;
- else
- throw new NotImplementedException ("Value '" + val + "' not supported.");
- }
-
- string MapFlags (Dictionary <uint, string> map, uint val) {
- var sb = new StringBuilder ();
- foreach (var flag in map.Keys)
- if ((val & flag) != 0)
- sb.Append (map [flag]);
- return sb.ToString ();
- }
-
- void EmitAssemblyReferences () {
- foreach (var aname in main.AssemblyReferences) {
- os.WriteLine (".assembly extern " + EscapeName (aname.Name));
- os.WriteLine ("{");
- indent ++;
- Version v = aname.Version;
- WriteLine (String.Format (".ver {0}:{1}:{2}:{3}", v.Major, v.Minor, v.Build, v.Revision));
- byte [] token = aname.PublicKeyToken;
- if (token.Length > 0) {
- StringBuilder sb = new StringBuilder ();
- StringBuilder sb2 = new StringBuilder ();
- for (int i = 0; i < token.Length; ++i) {
- if (i > 0)
- sb.Append (" ");
- sb.Append (String.Format ("{0:X2}", token [i]));
- if (Char.IsLetterOrDigit ((char)token [i]))
- sb2.Append ((char)token [i]);
- else
- sb2.Append ('.');
- }
- WriteLine (String.Format (".publickeytoken = ({0}) // {1}", sb, sb2));
- }
- indent --;
- WriteLine ("}");
- }
- }
-
- void EmitCattrs (ICustomAttributeProvider prov) {
- foreach (var cattr in prov.CustomAttributes) {
- WriteLine (String.Format (".custom {0} = (", StringifyMethodRef (cattr.Constructor)));
- indent += 3;
- byte[] blob = cattr.GetBlob ();
- WriteBlob (blob);
- indent -= 3;
- }
- }
-
- void EmitSecDeclarations (ISecurityDeclarationProvider prov) {
- foreach (var sec in prov.SecurityDeclarations) {
- string act_str = null;
- if (!sec_action_to_string.TryGetValue (sec.Action, out act_str))
- throw new NotImplementedException (sec.Action.ToString ());
- WriteLine (".permissionset " + act_str + " = (");
- WriteBlob (sec.GetBlob ());
- }
- }
-
- void EmitAssembly () {
- AssemblyNameDefinition aname = ad.Name;
-
- WriteLine (".assembly " + EscapeName (aname.Name));
- WriteLine ("{");
- indent ++;
- EmitCattrs (ad);
- EmitSecDeclarations (ad);
- WriteLine (String.Format (".hash algorithm 0x{0:X8}", (int)aname.HashAlgorithm));
- Version v = aname.Version;
- WriteLine (String.Format (".ver {0}:{1}:{2}:{3}", v.Major, v.Minor, v.Build, v.Revision));
- byte[] token = aname.PublicKey;
- if (token != null && token.Length > 0) {
- StringBuilder sb = new StringBuilder ();
- StringBuilder sb2 = new StringBuilder ();
- for (int i = 0; i < token.Length; ++i) {
- if (i > 0)
- sb.Append (" ");
- sb.Append (String.Format ("{0:X2}", token [i]));
- if (Char.IsLetterOrDigit ((char)token [i]))
- sb2.Append ((char)token [i]);
- else
- sb2.Append ('.');
- }
- WriteLine (String.Format (".publickey = ({0}) // {1}", sb, sb2));
- }
- indent --;
- WriteLine ("}");
- }
-
- void EmitModule () {
- WriteLine (".module " + EscapeName (main.Name) + " // GUID = " + "{" + main.Mvid.ToString ().ToUpper () + "}");
- EmitCattrs (main);
- }
-
- string StringifyTypeAttrs (TypeAttributes attrs) {
- var sb = new StringBuilder ();
-
- sb.Append (Map (type_sem_map, (uint)(attrs & TypeAttributes.ClassSemanticMask)));
- sb.Append (Map (type_access_map, (uint)(attrs & TypeAttributes.VisibilityMask)));
- sb.Append (Map (type_layout_map, (uint)(attrs & TypeAttributes.LayoutMask)));
- sb.Append (Map (type_string_format_map, (uint)(attrs & TypeAttributes.StringFormatMask)));
- sb.Append (MapFlags (type_flag_map, (uint)(attrs)));
-
- return sb.ToString ();
- }
-
- void EmitGenParams (IGenericParameterProvider prov, StringBuilder sb) {
- sb.Append ("<");
- int idx = 0;
- foreach (var gpar in prov.GenericParameters) {
- if (idx > 0)
- sb.Append (", ");
- if (gpar.HasDefaultConstructorConstraint)
- sb.Append (".ctor ");
- if (gpar.HasNotNullableValueTypeConstraint)
- sb.Append ("valuetype ");
- if (gpar.HasReferenceTypeConstraint)
- sb.Append ("class ");
- if (gpar.HasConstraints) {
- int idx2 = 0;
- sb.Append ("(");
- foreach (var c in gpar.Constraints) {
- if (idx2 > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (c));
- idx2 ++;
- }
- sb.Append (")");
- }
- sb.Append (EscapeName (gpar.Name));
- idx ++;
- }
- sb.Append (">");
- }
-
- void EmitGenParamCattrs (IGenericParameterProvider prov) {
- foreach (var gpar in prov.GenericParameters) {
- if (gpar.HasCustomAttributes) {
- WriteLine (".param type " + gpar.Name);
- EmitCattrs (gpar);
- }
- }
- }
-
- void EmitGlobals (TypeDefinition td) {
- foreach (var md in td.Methods)
- EmitMethod (md);
- }
-
- void EmitType (TypeDefinition td) {
- WriteLine ("");
-
- if (td.MetadataType != MetadataType.Class && td.MetadataType != MetadataType.ValueType)
- throw new NotImplementedException (td.MetadataType.ToString ());
-
- // FIXME: Group types by namespaces
- if (!td.IsNested && td.Namespace != null && td.Namespace != String.Empty) {
- WriteLine (".namespace " + EscapeName (td.Namespace));
- WriteLine ("{");
- indent ++;
- }
-
- var sb = new StringBuilder ();
- sb.Append (".class ");
- sb.Append (StringifyTypeAttrs (td.Attributes));
- sb.Append (EscapeName (td.Name));
- if (td.HasGenericParameters)
- EmitGenParams (td, sb);
- WriteLine (sb.ToString ());
- indent ++;
- if (td.BaseType != null)
- WriteLine ("extends " + StringifyTypeRef (td.BaseType));
- if (td.HasInterfaces) {
- int idx = 0;
- sb = new StringBuilder ();
- foreach (TypeReference t in td.Interfaces) {
- if (idx > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (t));
- idx ++;
- }
- WriteLine (String.Format ("implements {0}", sb.ToString ()));
- }
- indent --;
- WriteLine ("{");
- indent ++;
- if (td.PackingSize != -1)
- WriteLine (".pack " + td.PackingSize);
- if (td.ClassSize != -1)
- WriteLine (".size " + td.ClassSize);
- EmitCattrs (td);
- EmitGenParamCattrs (td);
- EmitSecDeclarations (td);
- foreach (var fd in td.Fields)
- EmitField (fd);
- foreach (var md in td.Methods)
- EmitMethod (md);
- foreach (var p in td.Properties)
- EmitProperty (p);
- foreach (var e in td.Events)
- EmitEvent (e);
- foreach (var t in td.NestedTypes)
- EmitType (t);
- indent --;
- WriteLine ("}");
-
- if (!td.IsNested && td.Namespace != null && td.Namespace != String.Empty) {
- WriteLine ("}");
- indent --;
- }
- }
-
- string StringifyFieldAttributes (FieldAttributes attrs) {
- var sb = new StringBuilder ();
- sb.Append (Map (field_access_map, (uint)(attrs & FieldAttributes.FieldAccessMask)));
- sb.Append (MapFlags (field_flag_map, (uint)(attrs)));
- return sb.ToString ();
- }
-
- void EmitField (FieldDefinition fd) {
- var sb = new StringBuilder ();
- sb.Append (".field ");
- if (fd.Offset != -1)
- sb.Append ("[" + fd.Offset + "] ");
- sb.Append (StringifyFieldAttributes (fd.Attributes));
- if (fd.HasMarshalInfo) {
- sb.Append (" ");
- sb.Append (StringifyMarshalInfo (fd.MarshalInfo));
- }
- sb.Append (" ");
- sb.Append (StringifyTypeRef (fd.FieldType));
- sb.Append (" ");
- sb.Append (EscapeName (fd.Name));
- if (fd.HasConstant)
- EmitConstant (fd.Constant, sb);
- if (fd.RVA != 0) {
- sb.Append (String.Format (" at D_{0:x8}", fd.RVA));
- fields_with_rva.Add (fd);
- }
- WriteLine (sb.ToString ());
- EmitCattrs (fd);
- }
-
- string StringifyMethodAttributes (MethodAttributes attrs) {
- var sb = new StringBuilder ();
- sb.Append (Map (method_access_map, (uint)(attrs & MethodAttributes.MemberAccessMask)));
- sb.Append (MapFlags (method_flag_map, (uint)(attrs)));
- return sb.ToString ();
- }
-
- string StringifyMethodImplAttributes (MethodImplAttributes attrs) {
- var sb = new StringBuilder ();
- sb.Append (Map (method_impl_map, (uint)(attrs & MethodImplAttributes.CodeTypeMask)));
- sb.Append (Map (method_managed_map, (uint)(attrs & MethodImplAttributes.ManagedMask)));
- sb.Append (MapFlags (method_impl_flag_map, (uint)(attrs)));
-
- return sb.ToString ();
- }
-
- string StringifyTypeNameReflection (TypeReference t) {
- if (t.MetadataType != MetadataType.Class)
- throw new NotImplementedException ();
- IMetadataScope s = t.Scope;
- if (!(s is ModuleDefinition))
- throw new NotImplementedException ();
- return t.FullName.Replace ("/", "+");
- }
-
- string StringifyMarshalInfo (MarshalInfo mi) {
- var sb = new StringBuilder ();
-
- sb.Append ("marshal (");
-
- string s = null;
- switch (mi.NativeType) {
- case NativeType.Array: {
- var ami = (mi as ArrayMarshalInfo);
- if (native_type_to_str.TryGetValue (ami.ElementType, out s)) {
- sb.Append (s);
- }
- sb.Append ("[");
- //Console.WriteLine ("// XXX: " + ami.Size + " " + ami.SizeParameterIndex + " " + ami.SizeParameterMultiplier);
-
- /*
- * Comments in metadata.c:
- * So if (param_num == 0) && (num_elem > 0), then
- * elem_mult == 0 -> the array size is num_elem
- * elem_mult == 1 -> the array size is @param_num + num_elem
- */
- if (ami.Size != -1 && ami.Size != 0)
- sb.Append (ami.Size.ToString ());
- if (ami.SizeParameterMultiplier != 0 && ami.SizeParameterIndex != -1)
- sb.Append ("+" + ami.SizeParameterIndex.ToString ());
- sb.Append ("]");
- break;
- }
- case NativeType.FixedArray: {
- var ami = (mi as FixedArrayMarshalInfo);
- /*
- if (native_type_to_str.TryGetValue (ami.ElementType, out s)) {
- sb.Append (s);
- }
- */
- sb.Append ("fixed array [" + ami.Size + "]");
- break;
- }
- case NativeType.FixedSysString: {
- var ami = (mi as FixedSysStringMarshalInfo);
- sb.Append ("fixed sysstring [" + ami.Size + "]");
- break;
- }
- case NativeType.SafeArray: {
- var sami = (mi as SafeArrayMarshalInfo);
- sb.Append ("safearray ");
- switch (sami.ElementType) {
- case VariantType.Variant:
- sb.Append ("variant");
- break;
- default:
- throw new NotImplementedException ();
- }
- break;
- }
- case NativeType.CustomMarshaler: {
- var cmi = (mi as CustomMarshalInfo);
-
- if (cmi.Guid != Guid.Empty || cmi.UnmanagedType != String.Empty)
- throw new NotImplementedException ();
- sb.Append ("custom (\"" + StringifyTypeNameReflection (cmi.ManagedType) + "\", \"" + EscapeString (cmi.Cookie) + "\")");
- break;
- }
- default:
- if (native_type_to_str.TryGetValue (mi.NativeType, out s))
- sb.Append (s);
- else
- throw new NotImplementedException (mi.NativeType.ToString ());
- break;
- }
- sb.Append (")");
- return sb.ToString ();
- }
-
- string StringifySignature (MethodDefinition md) {
- var sb = new StringBuilder ();
- int pindex = 0;
- foreach (var par in md.Parameters) {
- if (pindex > 0)
- sb.Append (", ");
- if (par.IsIn)
- sb.Append ("[in] ");
- if (par.IsOut)
- sb.Append ("[out] ");
- if (par.IsOptional)
- sb.Append ("[opt] ");
- sb.Append (StringifyTypeRef (par.ParameterType));
- if (par.HasMarshalInfo) {
- sb.Append (" ");
- sb.Append (StringifyMarshalInfo (par.MarshalInfo));
- }
- sb.Append (" ");
- sb.Append (EscapeName (par.Name));
- pindex ++;
- }
-
- return sb.ToString ();
- }
-
- string StringifyPInvokeAttrs (PInvokeAttributes attrs) {
- var sb = new StringBuilder ();
- sb.Append (Map (pinvoke_char_set_map, (uint)(attrs & PInvokeAttributes.CharSetMask)));
- sb.Append (Map (pinvoke_cconv_map, (uint)(attrs & PInvokeAttributes.CallConvMask)));
- sb.Append (MapFlags (pinvoke_flags_map, (uint)(attrs)));
- return sb.ToString ();
- }
-
- string StringifyCallingConvention (MethodCallingConvention cconv) {
- switch (cconv) {
- case MethodCallingConvention.Default:
- return "default";
- case MethodCallingConvention.VarArg:
- return "vararg";
- default:
- throw new NotImplementedException (cconv.ToString ());
- }
- }
-
- void EmitMethod (MethodDefinition md) {
- int idx;
-
- WriteLine ();
- var pinvoke_sb = new StringBuilder ();
- if ((uint)(md.Attributes & MethodAttributes.PInvokeImpl) != 0) {
- var pinvoke = md.PInvokeInfo;
- pinvoke_sb.Append ("pinvokeimpl (\"" + pinvoke.Module.Name + "\" as \"" + pinvoke.EntryPoint + "\" " + StringifyPInvokeAttrs (pinvoke.Attributes) + " )");
- }
- WriteLine (String.Format (".method {0}{1}", StringifyMethodAttributes (md.Attributes), pinvoke_sb));
-
- var sb = new StringBuilder ();
- sb.Append (" ");
- if (!md.IsStatic)
- sb.Append ("instance ");
- // CallingConvention seems to be 32
- sb.Append (StringifyCallingConvention ((MethodCallingConvention)((uint)md.CallingConvention & 0xf)));
- sb.Append (" ");
- sb.Append (StringifyTypeRef (md.ReturnType));
- sb.Append (" ");
- if (md.MethodReturnType.HasMarshalInfo) {
- sb.Append (StringifyMarshalInfo (md.MethodReturnType.MarshalInfo));
- sb.Append (" ");
- }
- sb.Append (EscapeName (md.Name));
- if (md.HasGenericParameters)
- EmitGenParams (md, sb);
- WriteLine (String.Format ("{0} ({1}) {2}", sb, StringifySignature (md), StringifyMethodImplAttributes (md.ImplAttributes)));
- WriteLine ("{");
- indent ++;
- foreach (var ov in md.Overrides)
- WriteLine (".override method " + StringifyMethodRef (ov));
- EmitCattrs (md);
- EmitGenParamCattrs (md);
- EmitSecDeclarations (md);
- idx = 0;
- foreach (var par in md.Parameters) {
- if (par.HasCustomAttributes) {
- WriteLine (".param [" + (idx + 1) + "]");
- EmitCattrs (par);
- }
- if (par.HasConstant) {
- sb = new StringBuilder ();
- EmitConstant (par.Constant, sb);
- WriteLine (".param [" + (idx + 1) + "]" + sb);
- }
- idx ++;
- }
- // FIXME: Print RVA, code size
- if (md == main.EntryPoint)
- WriteLine (".entrypoint");
- if (md.HasBody) {
- MethodBody body = md.Body;
- WriteLine (".maxstack " + body.MaxStackSize);
- if (body.InitLocals)
- WriteLine (".locals init (");
- else
- WriteLine (".locals (");
- indent ++;
- int vindex = 0;
- foreach (var v in body.Variables) {
- WriteLine (StringifyTypeRef (v.VariableType) + " " + (v.Name == "" ? "V_" + v.Index : v.Name) + (vindex + 1 < body.Variables.Count ? ", " : ""));
- vindex ++;
- }
- indent --;
- WriteLine (")");
-
- List<ExceptionHandler> handlers = body.ExceptionHandlers.ToList ();
- List<ExceptionHandler> reverse_handlers = body.ExceptionHandlers.Reverse ().ToList ();
-
- var trys = new Dictionary<ExceptionHandler, bool> ();
- if (handlers.Count > 0)
- trys [handlers [0]] = true;
- for (int i = 1; i < handlers.Count; ++i) {
- trys [handlers [i]] = true;
- for (int j = 0; j < i; ++j) {
- if (handlers [i].TryStart == handlers [j].TryStart && handlers [i].TryEnd == handlers [j].TryEnd) {
- trys [handlers [i]] = false;
- break;
- }
- }
- }
-
- idx = 0;
- var handler_to_idx = new Dictionary<ExceptionHandler, int> ();
- foreach (ExceptionHandler eh in body.ExceptionHandlers) {
- handler_to_idx [eh] = idx;
- idx ++;
- }
-
- foreach (var ins in body.Instructions) {
- foreach (var eh in handlers) {
- if (eh.TryEnd == ins && trys [eh]) {
- indent --;
- WriteLine ("} // end try " + handler_to_idx [eh]);
- }
-
- if (eh.HandlerEnd == ins) {
- indent --;
- WriteLine ("} // end handler " + handler_to_idx [eh]);
- }
- }
-
- foreach (var eh in reverse_handlers) {
- if (eh.TryStart == ins && trys [eh]) {
- WriteLine (".try { // " + handler_to_idx [eh]);
- indent ++;
- }
- if (eh.HandlerStart == ins) {
- string type_str = null;
- switch (eh.HandlerType) {
- case ExceptionHandlerType.Catch:
- type_str = "catch";
- break;
- case ExceptionHandlerType.Finally:
- type_str = "finally";
- break;
- default:
- throw new NotImplementedException (eh.HandlerType.ToString ());
- }
- if (eh.CatchType == null)
- WriteLine (type_str + " { // " + handler_to_idx [eh]);
- else
- WriteLine (type_str + " " + StringifyTypeRef (eh.CatchType) + " { // " + handler_to_idx [eh]);
- indent ++;
- }
- }
-
- WriteLine (StringifyIns (ins));
- }
- }
- indent --;
- WriteLine ("}");
- }
-
- // Based on Instruction:ToString ()
- public string StringifyIns (Instruction ins) {
- var sb = new StringBuilder ();
-
- AppendLabel (sb, ins);
- sb.Append (':');
- sb.Append (" ");
- sb.Append (ins.OpCode.Name);
-
- if (ins.Operand == null)
- return sb.ToString ();
-
- sb.Append (' ');
-
- object operand = ins.Operand;
- switch (ins.OpCode.OperandType) {
- case OperandType.ShortInlineBrTarget:
- case OperandType.InlineBrTarget:
- AppendLabel (sb, (Instruction) operand);
- break;
- case OperandType.InlineSwitch:
- var labels = (Instruction []) operand;
- sb.Append ("(");
- for (int i = 0; i < labels.Length; i++) {
- if (i > 0)
- sb.Append (',');
-
- AppendLabel (sb, labels [i]);
- }
- sb.Append (")");
- break;
- case OperandType.InlineString:
- sb.Append ('\"');
- sb.Append (EscapeString ((string)operand));
- sb.Append ('\"');
- break;
- default:
- if (operand is MethodReference) {
- if (ins.OpCode == OpCodes.Ldtoken)
- sb.Append ("method ");
- sb.Append (StringifyMethodRef ((MethodReference)operand));
- } else if (operand is TypeReference)
- sb.Append (StringifyTypeRef ((TypeReference)operand));
- else if (operand is VariableDefinition)
- sb.Append (operand.ToString ());
- else if (operand is FieldReference) {
- if (ins.OpCode == OpCodes.Ldtoken)
- sb.Append ("field ");
- sb.Append (StringifyFieldRef ((FieldReference)operand));
- } else if (operand is ParameterDefinition) {
- var pd = (operand as ParameterDefinition);
- sb.Append (pd.Index + (pd.Method.HasThis ? 1 : 0));
- }
- else {
- EmitConstantOperand (operand, sb);
- }
- break;
- }
-
- return sb.ToString ();
- }
-
- static void AppendLabel (StringBuilder builder, Instruction instruction) {
- builder.Append ("IL_");
- builder.Append (instruction.Offset.ToString ("x4"));
- }
-
- void EmitProperty (PropertyDefinition p) {
- // FIXME: attributes
-
- var sb = new StringBuilder ();
- sb.Append (".property ");
- if (p.HasThis)
- sb.Append ("instance ");
- sb.Append (StringifyTypeRef (p.PropertyType));
- sb.Append (" ");
- sb.Append (EscapeName (p.Name));
- sb.Append ("(");
- int idx = 0;
- foreach (var par in p.Parameters) {
- if (idx > 0)
- sb.Append (", ");
- sb.Append (StringifyTypeRef (par.ParameterType));
- idx ++;
- }
- sb.Append (")");
- WriteLine (sb.ToString ());
- WriteLine ("{");
- indent ++;
- EmitCattrs (p);
- if (p.SetMethod != null)
- WriteLine (".set " + StringifyMethodRef (p.SetMethod));
- if (p.GetMethod != null)
- WriteLine (".get " + StringifyMethodRef (p.GetMethod));
- if (p.HasOtherMethods)
- throw new NotImplementedException ();
- indent --;
- WriteLine ("}");
- }
-
- void EmitEvent (EventDefinition e) {
- WriteLine (".event " + StringifyTypeRef (e.EventType) + " " + EscapeName (e.Name));
- WriteLine ("{");
- indent ++;
- if (e.AddMethod != null)
- WriteLine (".addon " + StringifyMethodRef (e.AddMethod));
- if (e.RemoveMethod != null)
- WriteLine (".removeon " + StringifyMethodRef (e.RemoveMethod));
- foreach (var m in e.OtherMethods)
- WriteLine (".other " + StringifyMethodRef (m));
- indent --;
- WriteLine ("}");
- }
-
- void EmitData () {
- foreach (var fd in fields_with_rva) {
- WriteLine (String.Format (".data D_{0:x8} = bytearray (", fd.RVA));
- WriteBlob (fd.InitialValue);
- }
- }
-
- void EmitConstantOperand (object operand, StringBuilder sb) {
- if (operand is double) {
- double d = (double)operand;
- // FIXME:
- //if (Double.IsNaN (d) || Double.IsInfinity (d)) {
- {
- byte[] b = DataConverter.GetBytesLE (d);
- sb.Append ("(");
- int index = 0;
- for (int i = 0; i < b.Length; ++i) {
- if (index > 0)
- sb.Append (" ");
- sb.Append (String.Format ("{0:x2}", b [i]));
- index ++;
- }
- sb.Append (")");
- }
- } else if (operand is float) {
- float d = (float)operand;
- // FIXME:
- //if (Single.IsNaN (d) || Single.IsInfinity (d)) {
- {
- byte[] b = DataConverter.GetBytesLE (d);
- sb.Append ("(");
- int index = 0;
- for (int i = 0; i < b.Length; ++i) {
- if (index > 0)
- sb.Append (" ");
- sb.Append (String.Format ("{0:x2}", b [i]));
- index ++;
- }
- sb.Append (")");
- }
- } else if (operand.GetType ().Assembly == typeof (int).Assembly)
- sb.Append (operand.ToString ());
- else
- throw new NotImplementedException (operand.GetType ().ToString ());
- }
-
- void EmitConstant (object o, StringBuilder sb) {
- if (o is byte)
- sb.Append (String.Format (" = int8(0x{0:x2})", (byte)o));
- else if (o is sbyte)
- sb.Append (String.Format (" = int8(0x{0:x2})", (sbyte)o));
- else if (o is short)
- sb.Append (String.Format (" = int16(0x{0:x4})", (short)o));
- else if (o is ushort)
- sb.Append (String.Format (" = int16(0x{0:x4})", (ushort)o));
- else if (o is int)
- sb.Append (String.Format (" = int32(0x{0:x8})", (int)o));
- else if (o is uint)
- sb.Append (String.Format (" = int32(0x{0:x8})", (uint)o));
- else if (o is long)
- sb.Append (String.Format (" = int64(0x{0:x8})", (long)o));
- else if (o is ulong)
- sb.Append (String.Format (" = int64(0x{0:x8})", (ulong)o));
- else if (o is string)
- sb.Append (String.Format (" = \"{0}\"", EscapeString ((string)o)));
- else if (o is bool)
- sb.Append (String.Format (" = bool({0})", (bool)o ? "true" : " false"));
- else if (o is char)
- sb.Append (String.Format (" = char(0x{0:x4})", (int)(char)o));
- else if (o is double)
- // FIXME:
- sb.Append (String.Format (" = float64({0:f})", (double)o));
- else if (o is float)
- // FIXME:
- sb.Append (String.Format (" = float32({0:f})", (float)o));
- else if (o == null)
- sb.Append ("= nullref");
- else
- throw new NotImplementedException ("" + o.GetType ().ToString () + " " + o.ToString ());
- }
-}
+++ /dev/null
-ildasm.cs
-tables.cs
-DataConverter.cs
-
-
+++ /dev/null
-using System;
-using System.IO;
-using System.Text;
-using System.Collections.Generic;
-using System.Linq;
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using Mono;
-
-/*
- * This partial class contains the tables used by the disassembler.
- */
-public partial class ILDAsm {
-
- Dictionary<uint, string> type_access_map = new Dictionary <uint, string> () {
- { (uint)TypeAttributes.NotPublic, "private " },
- { (uint)TypeAttributes.Public, "public " },
- { (uint)TypeAttributes.NestedPublic, "nested public " },
- { (uint)TypeAttributes.NestedPrivate, "nested private " },
- { (uint)TypeAttributes.NestedFamily, "nested family " },
- { (uint)TypeAttributes.NestedAssembly, "nested assembly " },
- { (uint)TypeAttributes.NestedFamANDAssem, "nested famandassem " },
- { (uint)TypeAttributes.NestedFamORAssem, "nested famorassem " },
- };
- Dictionary<uint, string> type_layout_map = new Dictionary <uint, string> () {
- { (uint)TypeAttributes.AutoLayout, "auto " },
- { (uint)TypeAttributes.SequentialLayout, "sequential " },
- { (uint)TypeAttributes.ExplicitLayout, "explicit " }
- };
- Dictionary<uint, string> type_string_format_map = new Dictionary <uint, string> () {
- { (uint)TypeAttributes.AnsiClass, "ansi " },
- { (uint)TypeAttributes.UnicodeClass, "unicode " },
- //{ (uint)TypeAttributes.AutoClass, "unicode " },
- };
- Dictionary<uint, string> type_flag_map = new Dictionary <uint, string> () {
- { (uint)TypeAttributes.Abstract, "abstract " },
- { (uint)TypeAttributes.Sealed, "sealed " },
- { (uint)TypeAttributes.SpecialName, "specialname " },
- { (uint)TypeAttributes.Import, "import " },
- { (uint)TypeAttributes.Serializable, "serializable " },
- { (uint)TypeAttributes.BeforeFieldInit, "beforefieldinit " },
- { (uint)TypeAttributes.RTSpecialName, "rtspecialname " },
- //{ (uint)TypeAttributes.HasSecurity, "rtspecialname " },
- //{ (uint)TypeAttributes.Forwarder, "rtspecialname " },
- };
-
- Dictionary<uint, string> type_sem_map = new Dictionary <uint, string> () {
- { (uint)TypeAttributes.Class, "" },
- { (uint)TypeAttributes.Interface, "interface " },
- };
-
-
- Dictionary<uint, string> field_access_map = new Dictionary <uint, string> () {
- { (uint)FieldAttributes.Private, "private " },
- { (uint)FieldAttributes.FamANDAssem, "famandassem " },
- { (uint)FieldAttributes.Assembly, "assembly " },
- { (uint)FieldAttributes.Family, "family " },
- { (uint)FieldAttributes.FamORAssem, "famorassem " },
- { (uint)FieldAttributes.Public, "public " },
- };
-
- Dictionary<uint, string> field_flag_map = new Dictionary <uint, string> () {
- { (uint)FieldAttributes.Static, "static " },
- { (uint)FieldAttributes.Literal, "literal " },
- { (uint)FieldAttributes.InitOnly, "initonly " },
- { (uint)FieldAttributes.SpecialName, "specialname " },
- { (uint)FieldAttributes.RTSpecialName, "rtspecialname " },
- { (uint)FieldAttributes.NotSerialized, "notserialized " },
- };
-
-
- Dictionary<uint, string> method_access_map = new Dictionary <uint, string> () {
- { (uint)MethodAttributes.CompilerControlled, "privatescope " },
- { (uint)MethodAttributes.Private, "private " },
- { (uint)MethodAttributes.Public, "public " },
- { (uint)MethodAttributes.Family, "family " },
- { (uint)MethodAttributes.FamORAssem, "famorassem " },
- { (uint)MethodAttributes.Assembly, "assembly " }
- };
-
- Dictionary<uint, string> method_flag_map = new Dictionary <uint, string> () {
- { (uint)MethodAttributes.Static, "static " },
- { (uint)MethodAttributes.Final, "final " },
- { (uint)MethodAttributes.Virtual, "virtual " },
- { (uint)MethodAttributes.HideBySig, "hidebysig " },
- { (uint)MethodAttributes.NewSlot, "newslot " },
- { (uint)MethodAttributes.CheckAccessOnOverride, "strict " },
- { (uint)MethodAttributes.Abstract, "abstract " },
- { (uint)MethodAttributes.SpecialName, "specialname " },
- { (uint)MethodAttributes.RTSpecialName, "rtspecialname " },
- };
-
-
- Dictionary<uint, string> method_impl_map = new Dictionary <uint, string> () {
- { (uint)MethodImplAttributes.IL, "cil " },
- { (uint)MethodImplAttributes.Runtime, "runtime " }
- };
- Dictionary<uint, string> method_managed_map = new Dictionary <uint, string> () {
- { (uint)MethodImplAttributes.Managed, "managed " }
- };
- Dictionary<uint, string> method_impl_flag_map = new Dictionary <uint, string> () {
- { (uint)MethodImplAttributes.PreserveSig, "preservesig " },
- { (uint)MethodImplAttributes.InternalCall, "internalcall " },
- { (uint)MethodImplAttributes.Synchronized, "synchronized " },
- { (uint)MethodImplAttributes.NoInlining, "noinlining " },
- };
-
-
- Dictionary<NativeType, string> native_type_to_str = new Dictionary<NativeType, string> () {
- { NativeType.Boolean, "bool" },
- { NativeType.I1, "int8" },
- { NativeType.U1, "unsigned int8" },
- { NativeType.I2, "int16" },
- { NativeType.U2, "unsigned int16" },
- { NativeType.I4, "int32" },
- { NativeType.U4, "unsigned int32" },
- { NativeType.I8, "int64" },
- { NativeType.U8, "unsigned int64" },
- //{ NativeType.R4, "int32" },
- //{ NativeType.R8, "unsigned int32" },
- { NativeType.LPStr, "lpstr" },
- { NativeType.Int, "int" },
- //{ NativeType.Int, "int" },
- { NativeType.Func, "method" },
- //{ NativeType.Array, "int" },
- //{ NativeType.Currency, "method" },
- { NativeType.BStr, "bstr " },
- { NativeType.LPWStr, "lpwstr" },
- //{ NativeType.LPTStr, "lpwstr" },
- //{ NativeType.FixedSysString, "lpwstr" },
- { NativeType.IUnknown, "iunknown" },
- { NativeType.IDispatch, "idispatch" },
- { NativeType.Struct, "struct" },
- { NativeType.IntF, "interface" },
- //{ NativeType.SafeArray, "interface" },
- //{ NativeType.FixedArray, "interface" },
- //{ NativeType.ByValStr, "interface" },
- //{ NativeType.ANSIBStr, "interface" },
- //{ NativeType.TBStr, "interface" },
- { NativeType.VariantBool, "variant bool" },
- { NativeType.ASAny, "as any" },
- { NativeType.LPStruct, "lpstruct" },
- //{ NativeType.CustomMarshaler, "lpstruct" },
- //{ NativeType.Error, "lpstruct" },
- };
-
-
- Dictionary<uint, string> pinvoke_char_set_map = new Dictionary <uint, string> () {
- { (uint)PInvokeAttributes.CharSetNotSpec, "" },
- { (uint)PInvokeAttributes.CharSetAnsi, "ansi " },
- { (uint)PInvokeAttributes.CharSetUnicode, "unicode " },
- { (uint)PInvokeAttributes.CharSetAuto, "autochar " },
- };
-
- Dictionary<uint, string> pinvoke_cconv_map = new Dictionary <uint, string> () {
- { (uint)PInvokeAttributes.CallConvWinapi, "winapi " },
- { (uint)PInvokeAttributes.CallConvCdecl, "cdecl " },
- { (uint)PInvokeAttributes.CallConvStdCall, "stdcall " },
- { (uint)PInvokeAttributes.CallConvThiscall, "thiscall " },
- { (uint)PInvokeAttributes.CallConvFastcall, "fastcall " },
- };
-
- Dictionary<uint, string> pinvoke_flags_map = new Dictionary <uint, string> () {
- { (uint)PInvokeAttributes.SupportsLastError, "lasterr " },
- };
-
-
- Dictionary<SecurityAction, string> sec_action_to_string = new Dictionary<SecurityAction, string> () {
- //{ SecurityAction.Request, "reqmin" },
- { SecurityAction.Demand, "demand" },
- { SecurityAction.Assert, "assert" },
- { SecurityAction.Deny, "deny" },
- { SecurityAction.PermitOnly, "permitonly" },
- { SecurityAction.LinkDemand, "linkcheck" },
- { SecurityAction.InheritDemand, "inheritcheck" },
- { SecurityAction.RequestMinimum, "reqmin" },
- { SecurityAction.RequestOptional, "reqopt" },
- { SecurityAction.RequestRefuse, "reqrefuse" },
- //{ SecurityAction.PreJitGrant, "reqmin" },
- //{ SecurityAction.PreJitDeny, "reqmin" },
- //{ SecurityAction.NonCasDemand, "reqmin" },
- //{ SecurityAction.NonCasLinkDemand, "reqmin" },
- //{ SecurityAction.NonCasInheritance, "reqmin" },
- };
-
-
- Dictionary<string, bool> keyword_table = new Dictionary<string, bool> {
- {"9", true},
- {"abstract", true},
- {"add", true},
- {"add.ovf", true},
- {"add.ovf.un", true},
- {"algorithm", true},
- {"alignment", true},
- {"and", true},
- {"ansi", true},
- {"any", true},
- {"arglist", true},
- {"array", true},
- {"as", true},
- {"assembly", true},
- {"assert", true},
- {"at", true},
- {"autochar", true},
- {"auto", true},
- {"beforefieldinit", true},
- {"bestfit", true},
- {"beq", true},
- {"beq.s", true},
- {"bge", true},
- {"bge.s", true},
- {"bge.un", true},
- {"bge.un.s", true},
- {"bgt", true},
- {"bgt.s", true},
- {"bgt.un", true},
- {"bgt.un.s", true},
- {"ble", true},
- {"ble.s", true},
- {"ble.un", true},
- {"ble.un.s", true},
- {"blob", true},
- {"blob_object", true},
- {"blt", true},
- {"blt.s", true},
- {"blt.un", true},
- {"blt.un.s", true},
- {"bne.un", true},
- {"bne.un.s", true},
- {"bool", true},
- {"box", true},
- {"break", true},
- {"brfalse", true},
- {"brfalse.s", true},
- {"br", true},
- {"brinst", true},
- {"brinst.s", true},
- {"brnull", true},
- {"brnull.s", true},
- {"br.s", true},
- {"brtrue", true},
- {"brtrue.s", true},
- {"brzero", true},
- {"brzero.s", true},
- {"bstr", true},
- {"bytearray", true},
- {"byvalstr", true},
- {"call", true},
- {"callconv", true},
- {"calli", true},
- {"callmostderived", true},
- {"callvirt", true},
- {"carray", true},
- {"castclass", true},
- {"catch", true},
- {"cdecl", true},
- {"ceq", true},
- {"cf", true},
- {"cgt", true},
- {"cgt.un", true},
- {"char", true},
- {"charmaperror", true},
- {"cil", true},
- {"ckfinite", true},
- {"class", true},
- {"clsid", true},
- {"clt", true},
- {"clt.un", true},
- {"Compilercontrolled", true},
- {"const", true},
- {"conv.i1", true},
- {"conv.i2", true},
- {"conv.i4", true},
- {"conv.i8", true},
- {"conv.i", true},
- {"conv.ovf.i1", true},
- {"conv.ovf.i1.un", true},
- {"conv.ovf.i2", true},
- {"conv.ovf.i2.un", true},
- {"conv.ovf.i4", true},
- {"conv.ovf.i4.un", true},
- {"conv.ovf.i8", true},
- {"conv.ovf.i8.un", true},
- {"conv.ovf.i", true},
- {"conv.ovf.i.un", true},
- {"conv.ovf.u1", true},
- {"conv.ovf.u1.un", true},
- {"conv.ovf.u2", true},
- {"conv.ovf.u2.un", true},
- {"conv.ovf.u4", true},
- {"conv.ovf.u4.un", true},
- {"conv.ovf.u8", true},
- {"conv.ovf.u8.un", true},
- {"conv.ovf.u", true},
- {"conv.ovf.u.un", true},
- {"conv.r4", true},
- {"conv.r8", true},
- {"conv.r.un", true},
- {"conv.u1", true},
- {"conv.u2", true},
- {"conv.u4", true},
- {"conv.u8", true},
- {"conv.u", true},
- {"cpblk", true},
- {"cpobj", true},
- {"currency", true},
- {"custom", true},
- {"date", true},
- {"decimal", true},
- {"default", true},
- {"demand", true},
- {"deny", true},
- {"div", true},
- {"div.un", true},
- {"dup", true},
- {"endfault", true},
- {"endfilter", true},
- {"endfinally", true},
- {"endmac", true},
- {"enum", true},
- {"error", true},
- {"explicit", true},
- {"extends", true},
- {"extern", true},
- {"false", true},
- {"famandassem", true},
- {"family", true},
- {"famorassem", true},
- {"fastcall", true},
- {"fault", true},
- {"field", true},
- {"filetime", true},
- {"filter", true},
- {"final", true},
- {"finally", true},
- {"fixed", true},
- {"flags", true},
- {"float32", true},
- {"float64", true},
- {"float", true},
- {"forwardref", true},
- {"fromunmanaged", true},
- {"handler", true},
- {"hidebysig", true},
- {"hresult", true},
- {"idispatch", true},
- {"il", true},
- {"illegal", true},
- {"implements", true},
- {"implicitcom", true},
- {"implicitres", true},
- {"import", true},
- {"in", true},
- {"inheritcheck", true},
- {"initblk", true},
- {"init", true},
- {"initobj", true},
- {"initonly", true},
- {"instance", true},
- {"int16", true},
- {"int32", true},
- {"int64", true},
- {"int8", true},
- {"interface", true},
- {"internalcall", true},
- {"int", true},
- {"isinst", true},
- {"iunknown", true},
- {"jmp", true},
- {"lasterr", true},
- {"lcid", true},
- {"ldarg.0", true},
- {"ldarg.1", true},
- {"ldarg.2", true},
- {"ldarg.3", true},
- {"ldarga", true},
- {"ldarga.s", true},
- {"ldarg", true},
- {"ldarg.s", true},
- {"ldc.i4.0", true},
- {"ldc.i4.1", true},
- {"ldc.i4.2", true},
- {"ldc.i4.3", true},
- {"ldc.i4.4", true},
- {"ldc.i4.5", true},
- {"ldc.i4.6", true},
- {"ldc.i4.7", true},
- {"ldc.i4.8", true},
- {"ldc.i4", true},
- {"ldc.i4.m1", true},
- {"ldc.i4.M1", true},
- {"ldc.i4.s", true},
- {"ldc.i8", true},
- {"ldc.r4", true},
- {"ldc.r8", true},
- {"ldelem", true},
- {"ldelema", true},
- {"ldelem.i1", true},
- {"ldelem.i2", true},
- {"ldelem.i4", true},
- {"ldelem.i8", true},
- {"ldelem.i", true},
- {"ldelem.r4", true},
- {"ldelem.r8", true},
- {"ldelem.ref", true},
- {"ldelem.u1", true},
- {"ldelem.u2", true},
- {"ldelem.u4", true},
- {"ldelem.u8", true},
- {"ldflda", true},
- {"ldfld", true},
- {"ldftn", true},
- {"ldind.i1", true},
- {"ldind.i2", true},
- {"ldind.i4", true},
- {"ldind.i8", true},
- {"ldind.i", true},
- {"ldind.r4", true},
- {"ldind.r8", true},
- {"ldind.ref", true},
- {"ldind.u1", true},
- {"ldind.u2", true},
- {"ldind.u4", true},
- {"ldind.u8", true},
- {"ldlen", true},
- {"ldloc.0", true},
- {"ldloc.1", true},
- {"ldloc.2", true},
- {"ldloc.3", true},
- {"ldloca", true},
- {"ldloca.s", true},
- {"ldloc", true},
- {"ldloc.s", true},
- {"ldnull", true},
- {"ldobj", true},
- {"ldsflda", true},
- {"ldsfld", true},
- {"ldstr", true},
- {"ldtoken", true},
- {"ldvirtftn", true},
- {"leave", true},
- {"leave.s", true},
- {"legacy", true},
- {"linkcheck", true},
- {"literal", true},
- {"localloc", true},
- {"lpstr", true},
- {"lpstruct", true},
- {"lptstr", true},
- {"lpvoid", true},
- {"lpwstr", true},
- {"managed", true},
- {"marshal", true},
- {"method", true},
- {"mkrefany", true},
- {"modopt", true},
- {"modreq", true},
- {"mul", true},
- {"mul.ovf", true},
- {"mul.ovf.un", true},
- {"native", true},
- {"neg", true},
- {"nested", true},
- {"newarr", true},
- {"newobj", true},
- {"newslot", true},
- {"noappdomain", true},
- {"noinlining", true},
- {"nomachine", true},
- {"nomangle", true},
- {"nometadata", true},
- {"noncasdemand", true},
- {"noncasinheritance", true},
- {"noncaslinkdemand", true},
- {"nop", true},
- {"noprocess", true},
- {"not", true},
- {"not_in_gc_heap", true},
- {"notremotable", true},
- {"notserialized", true},
- {"null", true},
- {"nullref", true},
- {"object", true},
- {"objectref", true},
- {"off", true},
- {"on", true},
- {"opt", true},
- {"optil", true},
- {"or", true},
- {"out", true},
- {"permitonly", true},
- {"pinned", true},
- {"pinvokeimpl", true},
- {"pop", true},
- {"prefix1", true},
- {"prefix2", true},
- {"prefix3", true},
- {"prefix4", true},
- {"prefix5", true},
- {"prefix6", true},
- {"prefix7", true},
- {"prefixref", true},
- {"prejitdeny", true},
- {"prejitgrant", true},
- {"preservesig", true},
- {"private", true},
- {"privatescope", true},
- {"property", true},
- {"protected", true},
- {"public", true},
- {"readonly", true},
- {"record", true},
- {"refany", true},
- {"refanytype", true},
- {"refanyval", true},
- {"rem", true},
- {"rem.un", true},
- {"reqmin", true},
- {"reqopt", true},
- {"reqrefuse", true},
- {"reqsecobj", true},
- {"request", true},
- {"ret", true},
- {"rethrow", true},
- {"retval", true},
- {"rtspecialname", true},
- {"runtime", true},
- {"safearray", true},
- {"sealed", true},
- {"sequential", true},
- {"serializable", true},
- {"shl", true},
- {"shr", true},
- {"shr.un", true},
- {"sizeof", true},
- {"special", true},
- {"specialname", true},
- {"starg", true},
- {"starg.s", true},
- {"static", true},
- {"stdcall", true},
- {"stelem", true},
- {"stelem.i1", true},
- {"stelem.i2", true},
- {"stelem.i4", true},
- {"stelem.i8", true},
- {"stelem.i", true},
- {"stelem.r4", true},
- {"stelem.r8", true},
- {"stelem.ref", true},
- {"stfld", true},
- {"stind.i1", true},
- {"stind.i2", true},
- {"stind.i4", true},
- {"stind.i8", true},
- {"stind.i", true},
- {"stind.r4", true},
- {"stind.r8", true},
- {"stloc", true},
- {"stobj", true},
- {"storage", true},
- {"stored_object", true},
- {"streamed_object", true},
- {"stream", true},
- {"strict", true},
- {"string", true},
- {"struct", true},
- {"stsfld", true},
- {"sub", true},
- {"sub.ovf", true},
- {"sub.ovf.un", true},
- {"switch", true},
- {"synchronized", true},
- {"syschar", true},
- {"sysstring", true},
- {"tbstr", true},
- {"thiscall", true},
- {"tls", true},
- {"to", true},
- {"true", true},
- {"type", true},
- {"typedref", true},
- {"uint", true},
- {"uint8", true},
- {"uint16", true},
- {"uint32", true},
- {"uint64", true},
- {"unbox", true},
- {"unicode", true},
- {"unmanagedexp", true},
- {"unmanaged", true},
- {"unsigned", true},
- {"userdefined", true},
- {"value", true},
- {"valuetype", true},
- {"vararg", true},
- {"variant", true},
- {"vector", true},
- {"virtual", true},
- {"void", true},
- {"wchar", true},
- {"winapi", true},
- {"with", true},
- {"xor", true},
- };
-}
\ No newline at end of file
internal ExceptionSources (TypeReference exception)
{
Exception = exception;
- SourcesList = new List<MemberReference> ();
- Sources = new ReadOnlyCollection<MemberReference> (SourcesList);
+ Sources = new HashSet<MemberReference> ();
}
public TypeReference Exception { get; private set; }
- public ReadOnlyCollection<MemberReference> Sources { get; private set; }
- internal List<MemberReference> SourcesList;
+ internal HashSet<MemberReference> Sources;
}
Dictionary<string, ExceptionSources> e;
if (!db.TryGetValue (memberDecl, out e)) {
e = new Dictionary<string, ExceptionSources> ();
+ db.Add (memberDecl, e);
var bodies = GetMethodBodies (member);
foreach (var body in bodies) {
if (body == null)
continue;
FillExceptions (body, e);
}
- db.Add (memberDecl, e);
}
return e.Values;
}
body.Method.DeclaringType.Scope.Name == memberRef.DeclaringType.Scope.Name) ||
((locations & ExceptionLocations.DependentAssemblies) != 0 &&
body.Method.DeclaringType.Scope.Name != memberRef.DeclaringType.Scope.Name)) {
+
IEnumerable<ExceptionSources> memberExceptions = this [memberRef];
AddExceptions (body, instruction,
memberExceptions.Select (es => es.Exception),
s = new ExceptionSources (ex);
exceptions.Add (eName, s);
}
- s.SourcesList.AddRange (sources);
+ foreach (var m in sources)
+ s.Sources.Add (m);
}
}
}
private void UpdateExceptions (XmlNode docs, MemberReference member)
{
+ string indent = new string (' ', 10);
foreach (var source in new ExceptionLookup (exceptions.Value)[member]) {
string cref = slashdocFormatter.GetDeclaration (source.Exception);
var node = docs.SelectSingleNode ("exception[@cref='" + cref + "']");
continue;
XmlElement e = docs.OwnerDocument.CreateElement ("exception");
e.SetAttribute ("cref", cref);
- e.InnerXml = "To be added; from: <see cref=\"" +
- string.Join ("\" />, <see cref=\"",
+ e.InnerXml = "To be added; from:\n" + indent + "<see cref=\"" +
+ string.Join ("\" />,\n" + indent + "<see cref=\"",
source.Sources.Select (m => slashdocFormatter.GetDeclaration (m))
- .ToArray ()) +
+ .OrderBy (s => s)) +
"\" />";
docs.AppendChild (e);
}
XmlElement members = outputfiles [assemblyname];
if (members == null) continue; // assembly is strangely not listed in the index
- //CreateMember(EcmaDoc.GetCref (type.DocumentElement), type.DocumentElement, members);
+ CreateMember (GetCref (type.DocumentElement), type.DocumentElement, members);
foreach (XmlElement memberdoc in type.SelectNodes("Type/Members/Member")) {
- //string name = EcmaDoc.GetCref (memberdoc);
- // FIXME
- string name = ns + "." + typename + "." + memberdoc.GetAttribute ("MemberName");
+ string name = GetCref (memberdoc);
CreateMember(name, memberdoc, members);
}
}
AddNamespaceSummary(nsSummaries, basepath, nsnode.GetAttribute("Name"));
}
}
+
+ static string GetCref (XmlElement member)
+ {
+ string typeName = XmlDocUtils.ToEscapedTypeName (member.SelectSingleNode("/Type/@FullName").InnerText);
+ if (member.Name == "Type")
+ return "T:" + typeName;
+ string memberType = member.SelectSingleNode("MemberType").InnerText;
+ switch (memberType) {
+ case "Constructor":
+ return "C:" + typeName + MakeArgs(member);
+ case "Event":
+ return "E:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName"));
+ case "Field":
+ return "F:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName"));
+ case "Method": {
+ string name = "M:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName")) + MakeArgs(member);
+ if (member.GetAttribute("MemberName") == "op_Implicit" || member.GetAttribute("MemberName") == "op_Explicit")
+ name += "~" + XmlDocUtils.ToTypeName (member.SelectSingleNode("ReturnValue/ReturnType").InnerText, member);
+ return name;
+ }
+ case "Property":
+ return "P:" + typeName + "." + XmlDocUtils.ToEscapedMemberName (member.GetAttribute("MemberName")) + MakeArgs(member);
+ default:
+ throw new NotSupportedException ("MemberType '" + memberType + "' is not supported.");
+ }
+ }
+
+ static string MakeArgs (XmlElement member)
+ {
+ XmlNodeList parameters = member.SelectNodes ("Parameters/Parameter");
+ if (parameters.Count == 0)
+ return "";
+ StringBuilder args = new StringBuilder ();
+ args.Append ("(");
+ args.Append (XmlDocUtils.ToTypeName (parameters [0].Attributes ["Type"].Value, member));
+ for (int i = 1; i < parameters.Count; ++i) {
+ args.Append (",");
+ args.Append (XmlDocUtils.ToTypeName (parameters [i].Attributes ["Type"].Value, member));
+ }
+ args.Append (")");
+ return args.ToString ();
+ }
private static void AddNamespaceSummary(XmlDocument nsSummaries, string basepath, string currentNs) {
foreach (var filename in new [] {
continue;
var file = XmlDocUtils.GetCachedFileName (outDir, url);
using (var o = File.AppendText (file)) {
- Node _;
- string contents = docRoot.RenderUrl (url, generator, out _);
+ string contents = docRoot.RenderUrl (url, generator, hs);
o.Write (contents);
}
}
<xsl:template name="create-index">
<xsl:if test="
count(PageTitle/@id) > 0 and
- count(Signature/@id) > 0 and
+ (count(Signature/@id) > 0 or count(Signature/div/@id) > 0) and
count(Remarks/@id) > 0 and
count(Members/@id) > 0
">
<xsl:attribute name="href">
<xsl:text>#</xsl:text>
<xsl:value-of select="Signature/@id" />
+ <xsl:value-of select="Signature/div/@id" />
</xsl:attribute>
<xsl:text>Signature</xsl:text>
</a>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="MyEvent">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="op_Explicit">
<param name="docs">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
</Docs>
</Member>
<Member MemberName="Field">
<param name="i">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
- <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.ApplicationException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.SystemException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="total">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
</Docs>
</Member>
<Member MemberName="Process">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="Process<T>">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="UseHelper<T,U,V>">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="array1">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
</Docs>
</Member>
<Member MemberName="Dynamic1">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="DynamicE2">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</Docs>
</Member>
<Member MemberName="ConvertAll<TInput,TOutput>">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
</Docs>
</Member>
<Member MemberName="Resize<T>">
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</Docs>
</Member>
</Members>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
</Docs>
</Member>
</Members>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</Docs>
</Member>
<Member MemberName="ConvertAll<T,U>">
<remarks>
<para>The <see cref="T:System.Converter<T,U>" /> is a delegate that converts an array element to the target type. The elements of <paramref name="array" /> are individually passed to this converter, and the converted elements are saved in the new array. The source array remains unchanged.</para>
</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" /> or <paramref name="converter" /> is <see langword="null" />.</exception>
</Docs>
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</Docs>
</Member>
</Members>
property.</para>
</block>
</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
<exception cref="T:System.ArgumentException">foo</exception>
<permission cref="T:System.SomePermission">bar</permission>
<altmember cref="T:System.SomeMember">alt member</altmember>
<Docs>
<summary>To be added.</summary>
<remarks>E:Mono.DocTest.Generic.GenericBase`1.ItemChanged</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="MyEvent">
<Docs>
<summary>To be added.</summary>
<remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="op_Explicit">
<remarks>
<c>C:Mono.DocTest.DocAttribute(System.String)</c>
</remarks>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
</Docs>
</Member>
<Member MemberName="Field">
<summary>To be added.</summary>
<remarks>
<see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" />.</remarks>
- <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
- <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.ApplicationException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.SystemException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="total">
<see cref="M:System.Collections.Generic.List{System.Int32}.Remove(`0)" />
</para>
</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
</Docs>
</Member>
<Member MemberName="Process">
<summary>To be added.</summary>
<remarks>
<c>M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="Process<T>">
<summary>To be added.</summary>
<remarks>
<c>M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="UseHelper<T,U,V>">
<summary>To be added.</summary>
<remarks>
<c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="array1">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
</Docs>
</Member>
<Member MemberName="Dynamic1">
<remarks>
<c>E:Mono.DocTest.Widget.DynamicE1</c>
</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="DynamicE2">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</Docs>
</Member>
<Member MemberName="ConvertAll<TInput,TOutput>">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
</Docs>
</Member>
<Member MemberName="Resize<T>">
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</Docs>
</Member>
</Members>
<remarks>
<c>M:System.Environment.GetFolderPath(System.Environment+SpecialFolder)</c>
</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="MyEvent">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="op_Explicit">
<param name="docs">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
</Docs>
</Member>
<Member MemberName="Field">
<param name="i">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
- <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.ApplicationException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.SystemException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="total">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
</Docs>
</Member>
<Member MemberName="Process">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="Process<T>">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="UseHelper<T,U,V>">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="array1">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
</Docs>
</Member>
<Member MemberName="Dynamic1">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="DynamicE2">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</Docs>
</Member>
<Member MemberName="ConvertAll<TInput,TOutput>">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
</Docs>
</Member>
<Member MemberName="Resize<T>">
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</Docs>
</Member>
</Members>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="MyEvent">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="op_Explicit">
<param name="docs">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
</Docs>
</Member>
<Member MemberName="Field">
<param name="i">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
- <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.ApplicationException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.SystemException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="total">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
</Docs>
</Member>
<Member MemberName="Process">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="Process<T>">
<param name="list">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</Docs>
</Member>
<Member MemberName="UseHelper<T,U,V>">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="array1">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
</Docs>
</Member>
<Member MemberName="Dynamic1">
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</Docs>
</Member>
<Member MemberName="DynamicE2">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</Docs>
</Member>
<Member MemberName="ConvertAll<TInput,TOutput>">
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
</Docs>
</Member>
<Member MemberName="Resize<T>">
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</Docs>
</Member>
</Members>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
</Docs>
</Member>
</Members>
</div>
<h1 class="PageTitle" id="T:Mono.DocTest.Generic.Extensions">Extensions Class</h1>
<p class="Summary" id="T:Mono.DocTest.Generic.Extensions:Summary">extension methods!</p>
- <div id="T:Mono.DocTest.Generic.Extensions:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public static class <b>Extensions</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.Extensions:Signature">public static class <b>Extensions</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.Extensions:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:Mono.DocTest.Generic.Func`2:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.Func`2:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">[Mono.DocTest.Doc("method")]<br />[return:Mono.DocTest.Doc("return", Field=false)]<br />public delegate <i title="return type, with attributes!">TRet</i> <b>Func<[Mono.DocTest.Doc("arg!")] TArg, [Mono.DocTest.Doc("ret!")] TRet></b> ([Mono.DocTest.Doc("arg-actual")] <i title="argument type, with attributes!">TArg</i> a)<br /> where TArg : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Exception">Exception</a><br /> where TRet : </div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.Func`2:Signature">[Mono.DocTest.Doc("method")]<br />[return:Mono.DocTest.Doc("return", Field=false)]<br />public delegate <i title="return type, with attributes!">TRet</i> <b>Func<[Mono.DocTest.Doc("arg!")] TArg, [Mono.DocTest.Doc("ret!")] TRet></b> ([Mono.DocTest.Doc("arg-actual")] <i title="argument type, with attributes!">TArg</i> a)<br /> where TArg : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Exception">Exception</a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.Func`2:Docs">
<h4 class="Subsection">Type Parameters</h4>
<p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>GenericBase<U>.FooEventArgs</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.EventArgs">EventArgs</a></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Signature">public class <b>GenericBase<U>.FooEventArgs</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.EventArgs">EventArgs</a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs">GenericBase</a>
+ <a href="#C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs()">GenericBase</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs">GenericBase Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:member">
+ <h3 id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs()">GenericBase Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>GenericBase</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.FooEventArgs():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">protected struct <b>GenericBase<U>.NestedCollection.Enumerator</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Signature">protected struct <b>GenericBase<U>.NestedCollection.Enumerator</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection.Enumerator:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>GenericBase<U>.NestedCollection</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Signature">public class <b>GenericBase<U>.NestedCollection</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.GenericBase`1.NestedCollection">GenericBase</a>
+ <a href="#C:Mono.DocTest.Generic.GenericBase`1.NestedCollection()">GenericBase</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection">GenericBase Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:member">
+ <h3 id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection()">GenericBase Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>GenericBase</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1.NestedCollection():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Generic.GenericBase`1:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.GenericBase`1:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>GenericBase<U></b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.GenericBase`1:Signature">public class <b>GenericBase<U></b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.GenericBase`1:Docs">
<h4 class="Subsection">Type Parameters</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.GenericBase`1">GenericBase</a>
+ <a href="#C:Mono.DocTest.Generic.GenericBase`1()">GenericBase</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Generic.GenericBase`1:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.GenericBase`1">GenericBase Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.GenericBase`1:member">
+ <h3 id="C:Mono.DocTest.Generic.GenericBase`1()">GenericBase Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.GenericBase`1():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>GenericBase</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.GenericBase`1():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</td>
</tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
<tr valign="top">
<td>
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</td>
</tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
<tr valign="top">
<td>
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
<p class="Summary" id="T:Mono.DocTest.Generic.IFoo`1:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.IFoo`1:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public interface <b>IFoo<T></b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.IFoo`1:Signature">public interface <b>IFoo<T></b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.IFoo`1:Docs">
<h4 class="Subsection">Type Parameters</h4>
<p class="Summary" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>MyList<T, U, V></b></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Signature">public class <b>MyList<T, U, V></b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Docs">
<h4 class="Subsection">Type Parameters</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.MyList`1.Helper`2">MyList</a>
+ <a href="#C:Mono.DocTest.Generic.MyList`1.Helper`2()">MyList</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Generic.MyList`1.Helper`2:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.MyList`1.Helper`2">MyList Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.MyList`1.Helper`2:member">
+ <h3 id="C:Mono.DocTest.Generic.MyList`1.Helper`2()">MyList Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.MyList`1.Helper`2():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>MyList</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1.Helper`2():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Generic.MyList`1:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.MyList`1:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>MyList<[Mono.DocTest.Doc("Type Parameter!")] T></b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase<T></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable<Int32[]></a></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.MyList`1:Signature">public class <b>MyList<[Mono.DocTest.Doc("Type Parameter!")] T></b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase<T></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable<Int32[]></a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.MyList`1:Docs">
<h4 class="Subsection">Type Parameters</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.MyList`1">MyList</a>
+ <a href="#C:Mono.DocTest.Generic.MyList`1()">MyList</a>
</b>()</div>
</td>
<td>
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`1.GetEnumerator">GetEnumerator</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`1.GetEnumerator()">GetEnumerator</a>
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<Int32[]></a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`1.GetHelper``2">GetHelper<U,V></a>
+ <a href="#M:Mono.DocTest.Generic.MyList`1.GetHelper``2()">GetHelper<U,V></a>
</b>()<nobr> : <a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList<T>.Helper<U, V></a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</div>
</td>
<td>
- <a href="#M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator">
+ <a href="#M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator()">
<b>IEnumerable.GetEnumerator</b>
</a>
</td>
<div class="Members" id="T:Mono.DocTest.Generic.MyList`1:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.MyList`1">MyList Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.MyList`1:member">
+ <h3 id="C:Mono.DocTest.Generic.MyList`1()">MyList Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.MyList`1():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>MyList</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`1():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator">GetEnumerator Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator()">GetEnumerator Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<Int32[]></a> <b>GetEnumerator</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Returns">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Remarks">
<tt>M:Mono.DocTest.MyList`1.GetEnumerator</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetEnumerator():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2">GetHelper<U,V> Generic Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2()">GetHelper<U,V> Generic Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="../Mono.DocTest.Generic/MyList`1+Helper`2.html">MyList<T>.Helper<U, V></a> <b>GetHelper<U, V></b> ()</div>
<h4 class="Subsection">Type Parameters</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Type Parameters">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Type Parameters">
<dl>
<dt>
<i>U</i>
</dl>
</blockquote>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Returns">
<tt>null</tt>.</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Remarks">
<tt>M:Mono.DocTest.Generic.MyList`1.GetHelper``2</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.GetHelper``2():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator()">System.Collections.IEnumerable.GetEnumerator Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<div class="Signature">
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Returns">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Remarks">
<tt>M:Mono.DocTest.MyList`1.System#Collections#GetEnumerator</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`1.System#Collections#IEnumerable#GetEnumerator():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Generic.MyList`2:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Generic.MyList`2:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>MyList<A, B></b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase<Dictionary<A, B>></a>, <a href="../Mono.DocTest.Generic/IFoo`1.html">IFoo<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.ICollection`1">ICollection<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<A></a><br /> where A : class, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IList`1">IList<B></a>, new()<br /> where B : class, <i title="Ako generic param">A</i></div>
+ <div class="Signature" id="T:Mono.DocTest.Generic.MyList`2:Signature">public class <b>MyList<A, B></b> : <a href="../Mono.DocTest.Generic/GenericBase`1.html">GenericBase<Dictionary<A, B>></a>, <a href="../Mono.DocTest.Generic/IFoo`1.html">IFoo<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.ICollection`1">ICollection<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerable`1">IEnumerable<A></a>, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<A></a><br /> where A : class, <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IList`1">IList<B></a>, new()<br /> where B : class, <i title="Ako generic param">A</i></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Generic.MyList`2:Docs">
<h4 class="Subsection">Type Parameters</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Generic.MyList`2">MyList</a>
+ <a href="#C:Mono.DocTest.Generic.MyList`2()">MyList</a>
</b>()</div>
</td>
<td>
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`2.Dispose">Dispose</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`2.Dispose()">Dispose</a>
</b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`2.Foo">Foo</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`2.Foo()">Foo</a>
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.KeyValuePair`2">KeyValuePair<IEnumerable<A>, IEnumerable<B>></a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`2.GetEnumerator">GetEnumerator</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`2.GetEnumerator()">GetEnumerator</a>
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List<A>.Enumerator</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`2.MoveNext">MoveNext</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`2.MoveNext()">MoveNext</a>
</b>()<nobr> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a></nobr><blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Generic.MyList`2.Reset">Reset</a>
+ <a href="#M:Mono.DocTest.Generic.MyList`2.Reset()">Reset</a>
</b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
</table>
</div>
</td>
<td>
- <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear">
+ <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear()">
<b>ICollection<A>.Clear</b>
</a>
</td>
</div>
</td>
<td>
- <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator">
+ <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator()">
<b>IEnumerable<A>.GetEnumerator</b>
</a>
</td>
</div>
</td>
<td>
- <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator">
+ <a href="#M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator()">
<b>IEnumerable.GetEnumerator</b>
</a>
</td>
<div class="Members" id="T:Mono.DocTest.Generic.MyList`2:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Generic.MyList`2">MyList Constructor</h3>
- <blockquote id="C:Mono.DocTest.Generic.MyList`2:member">
+ <h3 id="C:Mono.DocTest.Generic.MyList`2()">MyList Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Generic.MyList`2():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>MyList</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Generic.MyList`2():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.Dispose">Dispose Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.Dispose:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.Dispose()">Dispose Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.Dispose():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Dispose</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose():Remarks">
<tt>M:Mono.DocTest.MyList`2.Dispose</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Dispose():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.Foo">Foo Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.Foo:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.Foo()">Foo Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.Foo():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.KeyValuePair`2">KeyValuePair<IEnumerable<A>, IEnumerable<B>></a> <b>Foo</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Returns">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Remarks">M:Mono.DocTest.Generic.MyList`2.Foo</div>
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Remarks">M:Mono.DocTest.Generic.MyList`2.Foo</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Foo():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator">GetEnumerator Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator()">GetEnumerator Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List<A>.Enumerator</a> <b>GetEnumerator</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List<`0>.Enumerator</a>.</blockquote>
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.List`1.Enumerator">List<`0>.Enumerator</a>.</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Remarks">
<tt>M:Mono.DocTest.MyList`2.GetEnumerator</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.GetEnumerator():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.MoveNext">MoveNext Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.MoveNext:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.MoveNext()">MoveNext Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.MoveNext():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a> <b>MoveNext</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Returns">
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean">bool</a>
</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Remarks">
<tt>M:Mono.DocTest.MyList`2.MoveNext</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.MoveNext():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.Reset">Reset Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.Reset:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.Reset()">Reset Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.Reset():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Reset</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset():Remarks">
<tt>M:Mono.DocTest.MyList`2.Reset</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.Reset():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear">System.Collections.Generic.ICollection<A>.Clear Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear()">System.Collections.Generic.ICollection<A>.Clear Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<div class="Signature">
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>System.Collections.Generic.ICollection<A>.Clear</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():Remarks">
<tt>M:Mono.DocTest.MyList`2.System#Collections#Generic#ICollection{A}#Clear</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#ICollection{A}#Clear():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator">System.Collections.Generic.IEnumerable<A>.GetEnumerator Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator()">System.Collections.Generic.IEnumerable<A>.GetEnumerator Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<div class="Signature">
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<A></a> <b>System.Collections.Generic.IEnumerable<A>.GetEnumerator</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<`0></a>.</blockquote>
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Returns">A <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.Generic.IEnumerator`1">IEnumerator<`0></a>.</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Remarks">
<tt>M:Mono.DocTest.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#Generic#IEnumerable{A}#GetEnumerator():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator">System.Collections.IEnumerable.GetEnumerator Method</h3>
- <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:member">
+ <h3 id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator()">System.Collections.IEnumerable.GetEnumerator Method</h3>
+ <blockquote id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<div class="Signature">
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Collections.IEnumerator">IEnumerator</a> <b>System.Collections.IEnumerable.GetEnumerator</b> ()</div>
<h4 class="Subsection">Returns</h4>
- <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Returns">
+ <blockquote class="SubsectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Returns">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</blockquote>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Remarks">
<tt>M:Mono.DocTest.MyList`2.System#Collections#GetEnumerator</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Generic.MyList`2.System#Collections#IEnumerable#GetEnumerator():Version Information">
<b>Namespace: </b>Mono.DocTest.Generic<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
</div>
<h1 class="PageTitle" id="T:Mono.DocTest.Color">Color Enum</h1>
<p class="Summary" id="T:Mono.DocTest.Color:Summary">Possible colors</p>
- <div id="T:Mono.DocTest.Color:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public enum <b>Color</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Color:Signature">public enum <b>Color</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Color:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:Mono.DocTest.D:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.D:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object">object</a> <b>D</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Func`3">Func<string, object, object></a> value)</div>
+ <div class="Signature" id="T:Mono.DocTest.D:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object">object</a> <b>D</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Func`3">Func<string, object, object></a> value)</div>
</div>
<div class="Remarks" id="T:Mono.DocTest.D:Docs">
<h4 class="Subsection">Parameters</h4>
<p class="Summary" id="T:Mono.DocTest.DocAttribute:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.DocAttribute:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">[System.AttributeUsage(System.AttributeTargets.All)]<br />public class <b>DocAttribute</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute">Attribute</a></div>
+ <div class="Signature" id="T:Mono.DocTest.DocAttribute:Signature">[System.AttributeUsage(System.AttributeTargets.All)]<br />public class <b>DocAttribute</b> : <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Attribute">Attribute</a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.DocAttribute:Docs">
<h2 class="Section">Remarks</h2>
</div>
<h1 class="PageTitle" id="T:Mono.DocTest.DocValueType">DocValueType Struct</h1>
<p class="Summary" id="T:Mono.DocTest.DocValueType:Summary">Process interface</p>
- <div id="T:Mono.DocTest.DocValueType:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public struct <b>DocValueType</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
+ <div class="Signature" id="T:Mono.DocTest.DocValueType:Signature">public struct <b>DocValueType</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.DocValueType:Docs">
<h2 class="Section">Remarks</h2>
</div>
<h1 class="PageTitle" id="T:Mono.DocTest.IProcess">IProcess Interface</h1>
<p class="Summary" id="T:Mono.DocTest.IProcess:Summary">Process interface</p>
- <div id="T:Mono.DocTest.IProcess:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public interface <b>IProcess</b></div>
+ <div class="Signature" id="T:Mono.DocTest.IProcess:Signature">public interface <b>IProcess</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.IProcess:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:Mono.DocTest.UseLists:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.UseLists:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>UseLists</b></div>
+ <div class="Signature" id="T:Mono.DocTest.UseLists:Signature">public class <b>UseLists</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.UseLists:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.UseLists">UseLists</a>
+ <a href="#C:Mono.DocTest.UseLists()">UseLists</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.UseLists:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.UseLists">UseLists Constructor</h3>
- <blockquote id="C:Mono.DocTest.UseLists:member">
+ <h3 id="C:Mono.DocTest.UseLists()">UseLists Constructor</h3>
+ <blockquote id="C:Mono.DocTest.UseLists():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>UseLists</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.UseLists:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.UseLists():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.UseLists:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.UseLists():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.Del:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.Del:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Widget.Del</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> i)</div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.Del:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Widget.Del</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32">int</a> i)</div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.Del:Docs">
<h4 class="Subsection">Parameters</h4>
<p class="Summary" id="T:Mono.DocTest.Widget.Direction:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.Direction:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">[System.Flags]<br />protected enum <b>Widget.Direction</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.Direction:Signature">[System.Flags]<br />protected enum <b>Widget.Direction</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.Direction:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:Mono.DocTest.Widget.IMenuItem:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.IMenuItem:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public interface <b>Widget.IMenuItem</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.IMenuItem:Signature">public interface <b>Widget.IMenuItem</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.IMenuItem:Docs">
<h2 class="Section">Remarks</h2>
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Widget.IMenuItem.A">A</a>
+ <a href="#M:Mono.DocTest.Widget.IMenuItem.A()">A</a>
</b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
</table>
<div class="Members" id="T:Mono.DocTest.Widget.IMenuItem:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="M:Mono.DocTest.Widget.IMenuItem.A">A Method</h3>
- <blockquote id="M:Mono.DocTest.Widget.IMenuItem.A:member">
+ <h3 id="M:Mono.DocTest.Widget.IMenuItem.A()">A Method</h3>
+ <blockquote id="M:Mono.DocTest.Widget.IMenuItem.A():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>A</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A():Remarks">
<tt>M:Mono.DocTest.Widget.IMenuItem.A</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Widget.IMenuItem.A():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget.NestedClass.Double.Triple.Quadruple</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Signature">public class <b>Widget.NestedClass.Double.Triple.Quadruple</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple">Widget.NestedClass.Double.Triple.Quadruple</a>
+ <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple()">Widget.NestedClass.Double.Triple.Quadruple</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple">Widget.NestedClass.Double.Triple.Quadruple Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:member">
+ <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple()">Widget.NestedClass.Double.Triple.Quadruple Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget.NestedClass.Double.Triple.Quadruple</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple.Quadruple():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget.NestedClass.Double.Triple</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Signature">public class <b>Widget.NestedClass.Double.Triple</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple">Widget.NestedClass.Double.Triple</a>
+ <a href="#C:Mono.DocTest.Widget.NestedClass.Double.Triple()">Widget.NestedClass.Double.Triple</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double.Triple:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple">Widget.NestedClass.Double.Triple Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:member">
+ <h3 id="C:Mono.DocTest.Widget.NestedClass.Double.Triple()">Widget.NestedClass.Double.Triple Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget.NestedClass.Double.Triple</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double.Triple():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.NestedClass.Double:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.NestedClass.Double:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget.NestedClass.Double</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass.Double:Signature">public class <b>Widget.NestedClass.Double</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass.Double:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget.NestedClass.Double">Widget.NestedClass.Double</a>
+ <a href="#C:Mono.DocTest.Widget.NestedClass.Double()">Widget.NestedClass.Double</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Widget.NestedClass.Double:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget.NestedClass.Double">Widget.NestedClass.Double Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double:member">
+ <h3 id="C:Mono.DocTest.Widget.NestedClass.Double()">Widget.NestedClass.Double Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget.NestedClass.Double():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget.NestedClass.Double</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass.Double():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.NestedClass:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.NestedClass:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget.NestedClass</b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass:Signature">public class <b>Widget.NestedClass</b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget.NestedClass">Widget.NestedClass</a>
+ <a href="#C:Mono.DocTest.Widget.NestedClass()">Widget.NestedClass</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Widget.NestedClass:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget.NestedClass">Widget.NestedClass Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget.NestedClass:member">
+ <h3 id="C:Mono.DocTest.Widget.NestedClass()">Widget.NestedClass Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget.NestedClass():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget.NestedClass</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget.NestedClass`1:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget.NestedClass`1:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget.NestedClass<T></b></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget.NestedClass`1:Signature">public class <b>Widget.NestedClass<T></b></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget.NestedClass`1:Docs">
<h4 class="Subsection">Type Parameters</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget.NestedClass`1">Widget.NestedClass</a>
+ <a href="#C:Mono.DocTest.Widget.NestedClass`1()">Widget.NestedClass</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:Mono.DocTest.Widget.NestedClass`1:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget.NestedClass`1">Widget.NestedClass Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget.NestedClass`1:member">
+ <h3 id="C:Mono.DocTest.Widget.NestedClass`1()">Widget.NestedClass Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget.NestedClass`1():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget.NestedClass</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget.NestedClass`1():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:Mono.DocTest.Widget:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:Mono.DocTest.Widget:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Widget</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
+ <div class="Signature" id="T:Mono.DocTest.Widget:Signature">public class <b>Widget</b> : <a href="../Mono.DocTest/IProcess.html">IProcess</a></div>
</div>
<div class="Remarks" id="T:Mono.DocTest.Widget:Docs">
<h4 class="Subsection">See Also</h4>
<td>
<div>
<b>
- <a href="#C:Mono.DocTest.Widget">Widget</a>
+ <a href="#C:Mono.DocTest.Widget()">Widget</a>
</b>()</div>
</td>
<td>
</td>
<td colspan="2">
<b>
- <a href="#M:Mono.DocTest.Widget.M0">M0</a>
+ <a href="#M:Mono.DocTest.Widget.M0()">M0</a>
</b>()<blockquote><span class="NotEntered">Documentation for this section has not yet been entered.</span></blockquote></td>
</tr>
<tr valign="top">
<div class="Members" id="T:Mono.DocTest.Widget:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:Mono.DocTest.Widget">Widget Constructor</h3>
- <blockquote id="C:Mono.DocTest.Widget:member">
+ <h3 id="C:Mono.DocTest.Widget()">Widget Constructor</h3>
+ <blockquote id="C:Mono.DocTest.Widget():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Widget</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget:Remarks">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget():Remarks">
<p>
<tt>C:Mono.DocTest.Widget</tt>.</p>
<p>
</p>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:Mono.DocTest.Widget:Version Information">
+ <div class="SectionBox" id="C:Mono.DocTest.Widget():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</td>
</tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
<tr valign="top">
<td>
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</td>
</tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentNullException">ArgumentNullException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.ArgumentOutOfRangeException">ArgumentOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.FormatException">FormatException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IndexOutOfRangeException">IndexOutOfRangeException</a>
+ </td>
+ <td>
+ <span class="NotEntered">Documentation for this section has not yet been entered.</span>
+ </td>
+ </tr>
<tr valign="top">
<td>
<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.MulticastNotSupportedException">MulticastNotSupportedException</a>
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
- <h3 id="M:Mono.DocTest.Widget.M0">M0 Method</h3>
- <blockquote id="M:Mono.DocTest.Widget.M0:member">
+ <h3 id="M:Mono.DocTest.Widget.M0()">M0 Method</h3>
+ <blockquote id="M:Mono.DocTest.Widget.M0():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public static <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>M0</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Widget.M0:Remarks">
+ <div class="SectionBox" id="M:Mono.DocTest.Widget.M0():Remarks">
<tt>M:Mono.DocTest.Widget.M0</tt>.</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="M:Mono.DocTest.Widget.M0:Version Information">
+ <div class="SectionBox" id="M:Mono.DocTest.Widget.M0():Version Information">
<b>Namespace: </b>Mono.DocTest<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
</div>
<h1 class="PageTitle" id="T:NoNamespace">NoNamespace Class</h1>
<p class="Summary" id="T:NoNamespace:Summary">Namespace Test: [<a href="Mono.DocTest/index.html">Mono.DocTest</a>]</p>
- <div id="T:NoNamespace:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>NoNamespace</b></div>
+ <div class="Signature" id="T:NoNamespace:Signature">public class <b>NoNamespace</b></div>
</div>
<div class="Remarks" id="T:NoNamespace:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:NoNamespace">NoNamespace</a>
+ <a href="#C:NoNamespace()">NoNamespace</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:NoNamespace:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:NoNamespace">NoNamespace Constructor</h3>
- <blockquote id="C:NoNamespace:member">
+ <h3 id="C:NoNamespace()">NoNamespace Constructor</h3>
+ <blockquote id="C:NoNamespace():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>NoNamespace</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:NoNamespace:Remarks">
+ <div class="SectionBox" id="C:NoNamespace():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:NoNamespace:Version Information">
+ <div class="SectionBox" id="C:NoNamespace():Version Information">
<b>Namespace: </b>
<br />
<b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<p class="Summary" id="T:System.Action`1:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:System.Action`1:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Action<T></b> (<i title="To be added.">T</i> obj)</div>
+ <div class="Signature" id="T:System.Action`1:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>Action<T></b> (<i title="To be added.">T</i> obj)</div>
</div>
<div class="Remarks" id="T:System.Action`1:Docs">
<h4 class="Subsection">Type Parameters</h4>
<p class="Summary" id="T:System.Array:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:System.Array:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public class <b>Array</b></div>
+ <div class="Signature" id="T:System.Array:Signature">public class <b>Array</b></div>
</div>
<div class="Remarks" id="T:System.Array:Docs">
<h2 class="Section">Remarks</h2>
<td>
<div>
<b>
- <a href="#C:System.Array">Array</a>
+ <a href="#C:System.Array()">Array</a>
</b>()</div>
</td>
<td>
<div class="Members" id="T:System.Array:Members">
<h2 class="Section" id="MemberDetails">Member Details</h2>
<div class="SectionBox" id="_MemberDetails">
- <h3 id="C:System.Array">Array Constructor</h3>
- <blockquote id="C:System.Array:member">
+ <h3 id="C:System.Array()">Array Constructor</h3>
+ <blockquote id="C:System.Array():member">
<p class="Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
<h2>Syntax</h2>
<div class="Signature">public <b>Array</b> ()</div>
<h2 class="Section">Remarks</h2>
- <div class="SectionBox" id="C:System.Array:Remarks">
+ <div class="SectionBox" id="C:System.Array():Remarks">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</div>
<h2 class="Section">Requirements</h2>
- <div class="SectionBox" id="C:System.Array:Version Information">
+ <div class="SectionBox" id="C:System.Array():Version Information">
<b>Namespace: </b>System<br /><b>Assembly: </b>DocTest (in DocTest.dll)<br /><b>Assembly Versions: </b>0.0.0.0</div>
<hr size="1" />
</blockquote>
<p class="Summary" id="T:System.AsyncCallback:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:System.AsyncCallback:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>AsyncCallback</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IAsyncResult">IAsyncResult</a> ar)</div>
+ <div class="Signature" id="T:System.AsyncCallback:Signature">public delegate <a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void">void</a> <b>AsyncCallback</b> (<a href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.IAsyncResult">IAsyncResult</a> ar)</div>
</div>
<div class="Remarks" id="T:System.AsyncCallback:Docs">
<h4 class="Subsection">Parameters</h4>
<p class="Summary" id="T:System.Environment.SpecialFolder:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:System.Environment.SpecialFolder:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public enum <b>Environment.SpecialFolder</b></div>
+ <div class="Signature" id="T:System.Environment.SpecialFolder:Signature">public enum <b>Environment.SpecialFolder</b></div>
</div>
<div class="Remarks" id="T:System.Environment.SpecialFolder:Docs">
<h2 class="Section">Remarks</h2>
<p class="Summary" id="T:System.Environment:Summary">
<span class="NotEntered">Documentation for this section has not yet been entered.</span>
</p>
- <div id="T:System.Environment:Signature">
+ <div>
<h2>Syntax</h2>
- <div class="Signature">public static class <b>Environment</b></div>
+ <div class="Signature" id="T:System.Environment:Signature">public static class <b>Environment</b></div>
</div>
<div class="Remarks" id="T:System.Environment:Docs">
<h2 class="Section">Remarks</h2>
<remarks>
<c>C:Mono.DocTest.DocAttribute(System.String)</c>
</remarks>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.DocAttribute.#ctor(System.String)" /></exception>
</member>
<member name="F:Mono.DocTest.DocAttribute.Field">
<summary>To be added.</summary>
<summary>To be added.</summary>
<remarks>
<see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" />.</remarks>
- <exception cref="T:System.ApplicationException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
- <exception cref="T:System.SystemException">To be added; from: <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.ApplicationException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
+ <exception cref="T:System.SystemException">To be added; from:
+ <see cref="M:Mono.DocTest.DocValueType.M(System.Int32)" /></exception>
</member>
<member name="F:Mono.DocTest.DocValueType.total">
<summary>To be added.</summary>
<see cref="M:System.Collections.Generic.List{System.Int32}.Remove(`0)" />
</para>
</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Int32})" /></exception>
</member>
<member name="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})">
<param name="list">A <see cref="T:Mono.DocTest.Generic.MyList{System.Predicate{System.Int32}}" />.</param>
<summary>To be added.</summary>
<remarks>
<c>M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process(System.Collections.Generic.List{System.Predicate{System.Int32}})" />,
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" />,
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</member>
<member name="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})">
<typeparam name="T">Something Else</typeparam>
<summary>To be added.</summary>
<remarks>
<c>M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
- <exception cref="T:System.ArgumentNullException">To be added; from: <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" />, <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:Mono.DocTest.UseLists.Process``1(System.Collections.Generic.List{System.Predicate{``0}})" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Linq.Check.SourceAndPredicate(System.Object,System.Object)" /></exception>
</member>
<member name="M:Mono.DocTest.UseLists.UseHelper``3(Mono.DocTest.Generic.MyList{``0}+Helper{``1,``2})">
<typeparam name="T">
<summary>To be added.</summary>
<remarks>
<c>E:Mono.DocTest.Widget.AnotherEvent</c>.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</member>
<member name="F:Mono.DocTest.Widget.array1">
<summary>To be added.</summary>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Linq.Expressions.Error.TypeMustBeDerivedFromSystemDelegate" /></exception>
</member>
<member name="M:Mono.DocTest.Widget.Dynamic1(System.Collections.Generic.Dictionary{System.Object,System.String})">
<param name="value">To be added.</param>
<remarks>
<c>E:Mono.DocTest.Widget.DynamicE1</c>
</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</member>
<member name="E:Mono.DocTest.Widget.DynamicE2">
<summary>To be added.</summary>
<member name="E:Mono.DocTest.Generic.GenericBase`1.ItemChanged">
<summary>To be added.</summary>
<remarks>E:Mono.DocTest.Generic.GenericBase`1.ItemChanged</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</member>
<member name="E:Mono.DocTest.Generic.GenericBase`1.MyEvent">
<summary>To be added.</summary>
<remarks>E:Mono.DocTest.Generic.GenericBase`1.MyEvent</remarks>
- <exception cref="T:System.ArgumentException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />, <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" /></exception>
- <exception cref="T:System.MulticastNotSupportedException">To be added; from: <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />, <see cref="M:System.Delegate.CombineImpl(System.Delegate)" /></exception>
+ <exception cref="T:System.ArgumentException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.Delegate.Remove(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentNullException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.FormatException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.IndexOutOfRangeException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
+ <exception cref="T:System.MulticastNotSupportedException">To be added; from:
+ <see cref="M:System.Delegate.Combine(System.Delegate,System.Delegate)" />,
+ <see cref="M:System.Delegate.CombineImpl(System.Delegate)" />,
+ <see cref="M:System.String.FormatHelper(System.Text.StringBuilder,System.IFormatProvider,System.String,System.Object[])" />,
+ <see cref="M:System.String.get_Chars(System.Int32)" />,
+ <see cref="M:System.String.InternalSetChar(System.Int32,System.Char)" />,
+ <see cref="M:System.String.ParseFormatSpecifier(System.String,System.Int32@,System.Int32@,System.Int32@,System.Boolean@,System.String@)" />,
+ <see cref="M:System.String.Substring(System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.Char,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.Append(System.String,System.Int32,System.Int32)" />,
+ <see cref="M:System.Text.StringBuilder.InternalEnsureCapacity(System.Int32)" /></exception>
</member>
<member name="M:Mono.DocTest.Generic.GenericBase`1.op_Explicit(`0Mono`0.`0DocTest`0.`0Generic`0.`0GenericBase`0{`0U`0})~`0U`0">
<param name="list">Insert description here</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.NotImplementedException">To be added; from: <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
+ <exception cref="T:System.NotImplementedException">To be added; from:
+ <see cref="M:System.Array.AsReadOnly``1(``0[])" /></exception>
</member>
<member name="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})">
<typeparam name="TInput">To be added.</typeparam>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
- <exception cref="T:System.InvalidOperationException">To be added; from: <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
+ <exception cref="T:System.InvalidOperationException">To be added; from:
+ <see cref="M:System.Array.ConvertAll``2(``0[],System.Converter{``0,``1})" /></exception>
</member>
<member name="M:System.Array.Resize``1(``0[]@,System.Int32)">
<typeparam name="T">To be added.</typeparam>
<param name="newSize">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
- <exception cref="T:System.Exception">To be added; from: <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
+ <exception cref="T:System.Exception">To be added; from:
+ <see cref="M:System.Array.Resize``1(``0[]@,System.Int32)" /></exception>
</member>
<member name="T:System.AsyncCallback">
<param name="ar">To be added.</param>
<remarks>
<c>M:System.Environment.GetFolderPath(System.Environment+SpecialFolder)</c>
</remarks>
- <exception cref="T:System.NotSupportedException">To be added; from: <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
+ <exception cref="T:System.NotSupportedException">To be added; from:
+ <see cref="M:System.Environment.GetFolderPath(System.Environment.SpecialFolder)" /></exception>
</member>
<member name="T:System.Environment+SpecialFolder">
<summary>To be added.</summary>
static string style = "linux";
static bool compress;
static bool nomain;
+ static bool? use_dos2unix = null;
static int Main (string [] args)
{
Console.WriteLine (cmdLine);
return system (cmdLine);
}
-
+
// on Windows, we have to pipe the output of a
// `cmd` interpolation to dos2unix, because the shell does not
// strip the CRLFs generated by the native pkg-config distributed
// with Mono.
+ //
+ // But if it's *not* on cygwin, just skip it.
+
+ // check if dos2unix is applicable.
+ if (use_dos2unix == null) {
+ use_dos2unix = false;
+ try {
+ var dos2unix = Process.Start ("dos2unix");
+ dos2unix.StandardInput.WriteLine ("aaa");
+ dos2unix.StandardInput.WriteLine ("\u0004");
+ dos2unix.WaitForExit ();
+ if (dos2unix.ExitCode == 0)
+ use_dos2unix = true;
+ } catch {
+ // ignore
+ }
+ }
+ // and if there is no dos2unix, just run cmd /c.
+ if (use_dos2unix == false) {
+ Console.WriteLine (cmdLine);
+ ProcessStartInfo dos2unix = new ProcessStartInfo ();
+ dos2unix.UseShellExecute = false;
+ dos2unix.FileName = "cmd";
+ dos2unix.Arguments = String.Format ("/c \"{0}\"", cmdLine);
+
+ using (Process p = Process.Start (dos2unix)) {
+ p.WaitForExit ();
+ return p.ExitCode;
+ }
+ }
+
StringBuilder b = new StringBuilder ();
int count = 0;
for (int i = 0; i < cmdLine.Length; i++) {
<Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
</ReadLinesFromFile>
- <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
- <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
- </RemoveDuplicates>
-
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
+ <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+ <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+ </RemoveDuplicates>
+
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"
<Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
</ReadLinesFromFile>
- <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
- <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
- </RemoveDuplicates>
-
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
+ <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+ <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+ </RemoveDuplicates>
+
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"
<Output TaskParameter="TargetFrameworkMonikerDisplayName" PropertyName="TargetFrameworkMonikerDisplayName"/>
</GetReferenceAssemblyPaths>
- <CreateProperty Value="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)">
- <Output TaskParameter="Value" PropertyName="TargetFrameworkDirectory"/>
- </CreateProperty>
+
+ <!-- Remove duplicates. -->
+ <ItemGroup>
+ <_TargetFrameworkDirectories Include="$(_TargetFrameworkDirectories);$(TargetFrameworkDirectory)" KeepDuplicates="false" />
+ </ItemGroup>
+ <PropertyGroup>
+ <TargetFrameworkDirectory>@(_TargetFrameworkDirectories)</TargetFrameworkDirectory>
+ </PropertyGroup>
<ItemGroup Condition="'$(ImplicitlyExpandDesignTimeFacades)' == 'true'">
<DesignTimeFacadeDirectoryRoots Include="$(TargetFrameworkDirectory)" />
<Output TaskParameter="Lines" ItemName="PreviousFileWrites"/>
</ReadLinesFromFile>
- <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
- <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
- </RemoveDuplicates>
-
<!-- CopyLocal files: In case all the projects build to common output
directory, then other projects might depend on some of these
CopyLocal files, so delete only the ones under *this* project
<Output TaskParameter="InPath" ItemName="FileWrites"/>
</FindUnderPath>
+ <RemoveDuplicates Inputs="@(PreviousFileWrites);@(FileWrites->'%(FullPath)')">
+ <Output TaskParameter="Filtered" ItemName="CombinedFileWrites"/>
+ </RemoveDuplicates>
+
<WriteLinesToFile
File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(CombinedFileWrites)"
%_prefix/lib/mono/4.5/System.Json.Microsoft.dll
%_prefix/lib/mono/4.5/System.Net.dll
%_prefix/lib/mono/4.5/System.Net.Http.dll
+%_prefix/lib/mono/4.5/System.Net.Http.WebRequest.dll
%_prefix/lib/mono/4.5/System.Numerics.dll
%_prefix/lib/mono/4.5/System.Security.dll
%_prefix/lib/mono/4.5/System.Threading.Tasks.Dataflow.dll
%_prefix/lib/mono/4.5/System.dll
%_prefix/lib/mono/4.5/cscompmgd.dll
%_prefix/lib/mono/4.5/mscorlib.dll*
+%_prefix/lib/mono/4.5/System.Windows.dll
+%_prefix/lib/mono/4.5/System.Xml.Serialization.dll
%_prefix/lib/mono/4.5/Facades/*.dll
%_prefix/lib/mono/4.5/Facades/*.dll.mdb
%_prefix/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll
%_prefix/lib/mono/gac/System.IO.Compression.FileSystem
%_prefix/lib/mono/gac/System.Net
%_prefix/lib/mono/gac/System.Net.Http
+%_prefix/lib/mono/gac/System.Net.Http.WebRequest
%_prefix/lib/mono/gac/System.Numerics
%_prefix/lib/mono/gac/System.Security
%_prefix/lib/mono/gac/System.Threading.Tasks.Dataflow
%_prefix/lib/mono/gac/System.Xml.Linq
%_prefix/lib/mono/gac/System.Json
%_prefix/lib/mono/gac/System.Json.Microsoft
+%_prefix/lib/mono/gac/System.Windows
+%_prefix/lib/mono/gac/System.Xml.Serialization
%_prefix/lib/mono/gac/cscompmgd
%_prefix/lib/mono/mono-configuration-crypto
keepalivetime /= 1000;
if (keepalivetime == 0 || rem >= 500)
keepalivetime++;
- ret = setsockopt (fd, SOL_TCP, TCP_KEEPIDLE, &keepalivetime, sizeof (uint32_t));
+ ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPIDLE, &keepalivetime, sizeof (uint32_t));
if (ret == 0) {
rem = keepaliveinterval % 1000;
keepaliveinterval /= 1000;
if (keepaliveinterval == 0 || rem >= 500)
keepaliveinterval++;
- ret = setsockopt (fd, SOL_TCP, TCP_KEEPINTVL, &keepaliveinterval, sizeof (uint32_t));
+ ret = setsockopt (fd, IPPROTO_TCP, TCP_KEEPINTVL, &keepaliveinterval, sizeof (uint32_t));
}
if (ret != 0) {
gint errnum = errno;
#include <mono/utils/mono-io-portability.h>
#include <mono/utils/mono-error-internals.h>
#include <mono/utils/atomic.h>
+#include <mono/utils/mono-memory-model.h>
#ifdef HOST_WIN32
#include <direct.h>
#endif
static gunichar2 process_guid [36];
static gboolean process_guid_set = FALSE;
-static gboolean shutting_down = FALSE;
-
static gboolean no_exec = FALSE;
static MonoAssembly *
void
mono_runtime_cleanup (MonoDomain *domain)
{
- shutting_down = TRUE;
-
mono_attach_cleanup ();
/* This ends up calling any pending pending (for at most 2 seconds) */
quit_function (mono_get_root_domain (), NULL);
}
-/**
- * mono_runtime_set_shutting_down:
- *
- * Invoked by System.Environment.Exit to flag that the runtime
- * is shutting down.
- */
-void
-mono_runtime_set_shutting_down (void)
-{
- shutting_down = TRUE;
-}
-
-/**
- * mono_runtime_is_shutting_down:
- *
- * Returns whether the runtime has been flagged for shutdown.
- *
- * This is consumed by the P:System.Environment.HasShutdownStarted
- * property.
- *
- */
-gboolean
-mono_runtime_is_shutting_down (void)
-{
- return shutting_down;
-}
-
/**
* mono_domain_create_appdomain:
* @friendly_name: The friendly name of the appdomain to create
}
typedef struct unload_data {
+ gboolean done;
MonoDomain *domain;
char *failure_reason;
+ gint32 refcount;
} unload_data;
+static void
+unload_data_unref (unload_data *data)
+{
+ gint32 count;
+ do {
+ count = mono_atomic_load_acquire (&data->refcount);
+ g_assert (count >= 1 && count <= 2);
+ if (count == 1) {
+ g_free (data);
+ return;
+ }
+ } while (InterlockedCompareExchange (&data->refcount, count, count - 1) != count);
+}
+
static void
deregister_reflection_info_roots_nspace_table (gpointer key, gpointer value, gpointer image)
{
int i;
/* Have to attach to the runtime so shutdown can wait for this thread */
- thread = mono_thread_attach (mono_get_root_domain ());
+ /* Force it to be attached to avoid racing during shutdown. */
+ thread = mono_thread_attach_full (mono_get_root_domain (), TRUE);
/*
* FIXME: Abort our parent thread last, so we can return a failure
*/
if (!mono_threads_abort_appdomain_threads (domain, -1)) {
data->failure_reason = g_strdup_printf ("Aborting of threads in domain %s timed out.", domain->friendly_name);
- return 1;
+ goto failure;
}
if (!mono_thread_pool_remove_domain_jobs (domain, -1)) {
data->failure_reason = g_strdup_printf ("Cleanup of threadpool jobs of domain %s timed out.", domain->friendly_name);
- return 1;
+ goto failure;
}
/* Finalize all finalizable objects in the doomed appdomain */
if (!mono_domain_finalize (domain, -1)) {
data->failure_reason = g_strdup_printf ("Finalization of domain %s timed out.", domain->friendly_name);
- return 1;
+ goto failure;
}
/* Clear references to our vtables in class->runtime_info.
mono_gc_collect (mono_gc_max_generation ());
+ mono_atomic_store_release (&data->done, TRUE);
+ unload_data_unref (data);
mono_thread_detach (thread);
-
return 0;
+
+failure:
+ mono_atomic_store_release (&data->done, TRUE);
+ unload_data_unref (data);
+ mono_thread_detach (thread);
+ return 1;
}
/*
{
HANDLE thread_handle;
gsize tid;
- guint32 res;
MonoAppDomainState prev_state;
MonoMethod *method;
- unload_data thread_data;
+ unload_data *thread_data;
MonoDomain *caller_domain = mono_domain_get ();
/* printf ("UNLOAD STARTING FOR %s (%p) IN THREAD 0x%x.\n", domain->friendly_name, domain, GetCurrentThreadId ()); */
}
mono_domain_set (caller_domain, FALSE);
- thread_data.domain = domain;
- thread_data.failure_reason = NULL;
+ thread_data = g_new0 (unload_data, 1);
+ thread_data->domain = domain;
+ thread_data->failure_reason = NULL;
+ thread_data->done = FALSE;
+ thread_data->refcount = 2; /*Must be 2: unload thread + initiator */
/*The managed callback finished successfully, now we start tearing down the appdomain*/
domain->state = MONO_APPDOMAIN_UNLOADING;
#if 0
thread_handle = mono_create_thread (NULL, 0, unload_thread_main, &thread_data, 0, &tid);
#else
- thread_handle = mono_create_thread (NULL, 0, (LPTHREAD_START_ROUTINE)unload_thread_main, &thread_data, CREATE_SUSPENDED, &tid);
+ thread_handle = mono_create_thread (NULL, 0, (LPTHREAD_START_ROUTINE)unload_thread_main, thread_data, CREATE_SUSPENDED, &tid);
if (thread_handle == NULL) {
return;
}
#endif
/* Wait for the thread */
- while ((res = WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION)) {
+ while (!thread_data->done && WaitForSingleObjectEx (thread_handle, INFINITE, TRUE) == WAIT_IO_COMPLETION) {
if (mono_thread_internal_has_appdomain_ref (mono_thread_internal_current (), domain) && (mono_thread_interruption_requested ())) {
/* The unload thread tries to abort us */
/* The icall wrapper will execute the abort */
CloseHandle (thread_handle);
+ unload_data_unref (thread_data);
return;
}
}
CloseHandle (thread_handle);
- if (thread_data.failure_reason) {
+ if (thread_data->failure_reason) {
/* Roll back the state change */
domain->state = MONO_APPDOMAIN_CREATED;
- g_warning ("%s", thread_data.failure_reason);
+ g_warning ("%s", thread_data->failure_reason);
- *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain (thread_data.failure_reason);
+ *exc = (MonoObject *) mono_get_exception_cannot_unload_appdomain (thread_data->failure_reason);
- g_free (thread_data.failure_reason);
- thread_data.failure_reason = NULL;
+ g_free (thread_data->failure_reason);
+ thread_data->failure_reason = NULL;
}
+
+ unload_data_unref (thread_data);
}
gchar buf[4096];
guint buf_size = sizeof (buf);
+ name = NULL;
if (_NSGetExecutablePath (buf, &buf_size) == 0)
name = g_strdup (buf);
{ "System.ComponentModel.Composition", WINFX_KEY, ECMA_KEY },
{ "System.ComponentModel.DataAnnotations", "ddd0da4d3e678217", WINFX_KEY },
{ "System.Core", SILVERLIGHT_KEY, ECMA_KEY },
+ // FIXME: MS uses MSFINAL_KEY for .NET 4.5
+ { "System.Net", SILVERLIGHT_KEY, ECMA_KEY },
{ "System.Numerics", WINFX_KEY, ECMA_KEY },
{ "System.Runtime.Serialization", SILVERLIGHT_KEY, ECMA_KEY },
{ "System.ServiceModel", WINFX_KEY, ECMA_KEY },
MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
image->references = g_new0 (MonoAssembly *, t->rows + 1);
+ image->nreferences = t->rows;
}
reference = image->references [index];
mono_assemblies_unlock ();
*/
MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
{
int offset = -1;
int atype;
- MonoClass *klass = vtable->klass;
MONO_THREAD_VAR_OFFSET (GC_thread_tls, offset);
/*g_print ("thread tls: %d\n", offset);*/
return NULL;
if (klass->rank)
return NULL;
+ if (mono_class_is_open_constructed_type (&klass->byval_arg))
+ return NULL;
if (klass->byval_arg.type == MONO_TYPE_STRING) {
atype = ATYPE_STRING;
} else if (!klass->has_references) {
}
MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
{
return NULL;
}
MonoClass *internals_visible_class;
MonoClass *generic_ilist_class;
MonoClass *generic_nullable_class;
-#ifndef DISABLE_COM
- MonoClass *variant_class;
- MonoClass *com_object_class;
- MonoClass *com_interop_proxy_class;
- MonoClass *iunknown_class;
- MonoClass *idispatch_class;
-#endif
MonoClass *safehandle_class;
MonoClass *handleref_class;
MonoClass *attribute_class;
#define mono_object_is_transparent_proxy(object) (((MonoObject*)object)->vtable->klass == mono_defaults.transparent_proxy_class)
#endif
+
+#define GENERATE_GET_CLASS_WITH_CACHE_DECL(shortname) \
+MonoClass* mono_class_get_##shortname##_class (void);
+
+#define GENERATE_GET_CLASS_WITH_CACHE(shortname,namespace,name) \
+MonoClass* \
+mono_class_get_##shortname##_class (void) \
+{ \
+ static MonoClass *tmp_class; \
+ MonoClass *class = tmp_class; \
+ if (!class) { \
+ class = mono_class_from_name (mono_defaults.corlib, #namespace, #name); \
+ g_assert (class); \
+ mono_memory_barrier (); \
+ tmp_class = class; \
+ } \
+ return class; \
+}
+
+#define GENERATE_STATIC_GET_CLASS_WITH_CACHE(shortname,namespace,name) \
+static GENERATE_GET_CLASS_WITH_CACHE (shortname,namespace,name)
+
+
+#ifndef DISABLE_COM
+
+GENERATE_GET_CLASS_WITH_CACHE_DECL (interop_proxy)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (idispatch)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (iunknown)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (com_object)
+GENERATE_GET_CLASS_WITH_CACHE_DECL (variant)
+
+#endif
+
extern MonoDefaults mono_defaults MONO_INTERNAL;
void
#ifndef DISABLE_COM
/*
- * COM initialization (using mono_init_com_types) is delayed until needed.
+ * COM initialization is delayed until needed.
* However when a [ComImport] attribute is present on a type it will trigger
* the initialization. This is not a problem unless the BCL being executed
* lacks the types that COM depends on (e.g. Variant on Silverlight).
}
/* FIXME : we should add an extra checks to ensure COM can be initialized properly before continuing */
- mono_init_com_types ();
}
#endif /*DISABLE_COM*/
if (MONO_CLASS_IS_IMPORT (class)) {
init_com_from_comimport (class);
if (parent == mono_defaults.object_class)
- parent = mono_defaults.com_object_class;
+ parent = mono_class_get_com_object_class ();
}
#endif
if (!parent) {
if (!class->enumtype) {
if (!mono_metadata_interfaces_from_typedef_full (
image, type_token, &interfaces, &icount, FALSE, context)){
- mono_class_set_failure_and_error (class, error, g_strdup ("Could not load interfaces"));
+ mono_class_set_failure_from_loader_error (class, error, g_strdup ("Could not load interfaces"));
mono_loader_unlock ();
mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
- g_assert (!mono_loader_get_last_error ());
return NULL;
}
#include "mono/metadata/attrdefs.h"
#include "mono/metadata/gc-internal.h"
#include "mono/utils/mono-counters.h"
+#include "mono/utils/strenc.h"
#include "mono/utils/atomic.h"
#include <string.h>
#include <errno.h>
#define STDCALL
#endif
+GENERATE_GET_CLASS_WITH_CACHE (interop_proxy, Mono.Interop, ComInteropProxy)
+GENERATE_GET_CLASS_WITH_CACHE (idispatch, Mono.Interop, IDispatch)
+GENERATE_GET_CLASS_WITH_CACHE (iunknown, Mono.Interop, IUnknown)
+
+GENERATE_GET_CLASS_WITH_CACHE (com_object, System, __ComObject)
+GENERATE_GET_CLASS_WITH_CACHE (variant, System, Variant)
+
/* Upon creation of a CCW, only allocate a weak handle and set the
* reference count to 0. If the unmanaged client code decides to addref and
* hold onto the CCW, I then allocate a strong handle. Once the reference count
return FALSE;
klass = mono_object_class (real_proxy);
- return (klass && klass == mono_defaults.com_interop_proxy_class);
+ return (klass && klass == mono_class_get_interop_proxy_class ());
}
static int
int real_proxy;
guint32 pos_null = 0, pos_ccw = 0, pos_end = 0;
MonoClass *klass = NULL;
-
- /* COM types are initialized lazily */
- mono_init_com_types ();
klass = mono_class_from_mono_type (type);
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ptr (mb, &mono_defaults.com_object_class->byval_arg);
+ mono_mb_emit_ptr (mb, &mono_class_get_com_object_class ()->byval_arg);
mono_mb_emit_icall (mb, cominterop_type_from_handle);
mono_mb_emit_managed_call (mb, com_interop_proxy_get_proxy, NULL);
mono_mb_emit_managed_call (mb, get_transparent_proxy, NULL);
case MONO_MARSHAL_CONV_OBJECT_IDISPATCH:
case MONO_MARSHAL_CONV_OBJECT_IUNKNOWN: {
guint32 pos_null = 0, pos_rcw = 0, pos_end = 0;
-
- /* COM types are initialized lazily */
- mono_init_com_types ();
-
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_icon (mb, 0);
static MonoProperty* iunknown = NULL;
if (!iunknown)
- iunknown = mono_class_get_property_from_name (mono_defaults.com_object_class, "IUnknown");
+ iunknown = mono_class_get_property_from_name (mono_class_get_com_object_class (), "IUnknown");
mono_mb_emit_managed_call (mb, iunknown->get, NULL);
}
else if (conv == MONO_MARSHAL_CONV_OBJECT_IDISPATCH) {
static MonoProperty* idispatch = NULL;
if (!idispatch)
- idispatch = mono_class_get_property_from_name (mono_defaults.com_object_class, "IDispatch");
+ idispatch = mono_class_get_property_from_name (mono_class_get_com_object_class (), "IDispatch");
mono_mb_emit_managed_call (mb, idispatch->get, NULL);
}
else {
if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE)
mono_mb_emit_ptr (mb, mono_type_get_class (type));
else if (conv == MONO_MARSHAL_CONV_OBJECT_IUNKNOWN)
- mono_mb_emit_ptr (mb, mono_defaults.iunknown_class);
+ mono_mb_emit_ptr (mb, mono_class_get_iunknown_class ());
else if (conv == MONO_MARSHAL_CONV_OBJECT_IDISPATCH)
- mono_mb_emit_ptr (mb, mono_defaults.idispatch_class);
+ mono_mb_emit_ptr (mb, mono_class_get_idispatch_class ());
else
g_assert_not_reached ();
mono_mb_emit_icall (mb, cominterop_get_ccw);
if ((res = mono_marshal_find_in_cache (cache, method)))
return res;
- mono_init_com_types ();
-
if (!method->klass->vtable)
mono_class_setup_vtable (method->klass);
static MonoMethod *ctor = NULL;
if (!ctor)
- ctor = mono_class_get_method_from_name (mono_defaults.com_object_class, ".ctor", 0);
+ ctor = mono_class_get_method_from_name (mono_class_get_com_object_class (), ".ctor", 0);
mono_mb_emit_ldarg (mb, 0);
mono_mb_emit_managed_call (mb, ctor, NULL);
mono_mb_emit_byte (mb, CEE_RET);
if (!marshal_release)
marshal_release = mono_class_get_method_from_name (mono_defaults.marshal_class, "Release", 1);
- /* COM types are initialized lazily */
- mono_init_com_types ();
-
switch (action) {
case MARSHAL_ACTION_CONV_IN: {
guint32 pos_null = 0;
#define MONO_S_OK 0x00000000L
#define MONO_E_NOINTERFACE 0x80004002L
#define MONO_E_NOTIMPL 0x80004001L
+#define MONO_E_INVALIDARG 0x80070057L
+#define MONO_E_DISP_E_UNKNOWNNAME 0x80020006L
+#define MONO_E_DISPID_UNKNOWN (gint32)-1
int
ves_icall_System_Runtime_InteropServices_Marshal_AddRefInternal (gpointer pUnk)
if (cominterop_object_is_rcw (object)) {
return cominterop_get_interface (((MonoComInteropProxy*)((MonoTransparentProxy*)object)->rp)->com_object,
- mono_defaults.idispatch_class, TRUE);
+ mono_class_get_idispatch_class (), TRUE);
}
else {
MonoClass* klass = mono_object_class (object);
if (!cominterop_can_support_dispatch (klass) )
cominterop_raise_hr_exception (MONO_E_NOINTERFACE);
- return cominterop_get_ccw (object, mono_defaults.idispatch_class);
+ return cominterop_get_ccw (object, mono_class_get_idispatch_class ());
}
}
if (!object)
return NULL;
- mono_init_com_types ();
-
if (cominterop_object_is_rcw (object)) {
MonoClass *klass = NULL;
MonoRealProxy* real_proxy = NULL;
}
klass = mono_object_class (real_proxy);
- if (klass != mono_defaults.com_interop_proxy_class) {
+ if (klass != mono_class_get_interop_proxy_class ()) {
g_assert_not_reached ();
return NULL;
}
return ((MonoComInteropProxy*)real_proxy)->com_object->iunknown;
}
else {
- return cominterop_get_ccw (object, mono_defaults.iunknown_class);
+ return cominterop_get_ccw (object, mono_class_get_iunknown_class ());
}
#else
g_assert_not_reached ();
ves_icall_System_Runtime_InteropServices_Marshal_GetIDispatchForObjectInternal (MonoObject* object)
{
#ifndef DISABLE_COM
- mono_init_com_types ();
-
return cominterop_get_idispatch_for_object (object);
#else
g_assert_not_reached ();
}
iface = itf;
- if (iface == mono_defaults.iunknown_class) {
+ if (iface == mono_class_get_iunknown_class ()) {
start_slot = 3;
}
- else if (iface == mono_defaults.idispatch_class) {
+ else if (iface == mono_class_get_idispatch_class ()) {
start_slot = 7;
}
else {
if (!ccw->free_marshaler) {
int ret = 0;
gpointer tunk;
- tunk = cominterop_get_ccw (object, mono_defaults.iunknown_class);
+ tunk = cominterop_get_ccw (object, mono_class_get_iunknown_class ());
ret = CoCreateFreeThreadedMarshaler (tunk, (LPUNKNOWN*)&ccw->free_marshaler);
}
mono_thread_attach (mono_get_root_domain ());
/* handle IUnknown special */
- if (cominterop_class_guid_equal (riid, mono_defaults.iunknown_class)) {
- *ppv = cominterop_get_ccw (object, mono_defaults.iunknown_class);
+ if (cominterop_class_guid_equal (riid, mono_class_get_iunknown_class ())) {
+ *ppv = cominterop_get_ccw (object, mono_class_get_iunknown_class ());
/* remember to addref on QI */
cominterop_ccw_addref (*ppv);
return MONO_S_OK;
}
/* handle IDispatch special */
- if (cominterop_class_guid_equal (riid, mono_defaults.idispatch_class)) {
+ if (cominterop_class_guid_equal (riid, mono_class_get_idispatch_class ())) {
if (!cominterop_can_support_dispatch (klass))
return MONO_E_NOINTERFACE;
- *ppv = cominterop_get_ccw (object, mono_defaults.idispatch_class);
+ *ppv = cominterop_get_ccw (object, mono_class_get_idispatch_class ());
/* remember to addref on QI */
cominterop_ccw_addref (*ppv);
return MONO_S_OK;
static int STDCALL
cominterop_ccw_get_type_info_count (MonoCCWInterface* ccwe, guint32 *pctinfo)
{
- return MONO_E_NOTIMPL;
+ if(!pctinfo)
+ return MONO_E_INVALIDARG;
+
+ *pctinfo = 1;
+
+ return MONO_S_OK;
}
static int STDCALL
gunichar2** rgszNames, guint32 cNames,
guint32 lcid, gint32 *rgDispId)
{
- return MONO_E_NOTIMPL;
+ int i,ret = MONO_S_OK;
+ MonoMethod* method;
+ gchar* methodname;
+ MonoClass *klass = NULL;
+ MonoCCW* ccw = ccwe->ccw;
+ MonoObject* object = mono_gchandle_get_target (ccw->gc_handle);
+
+ g_assert (object);
+ klass = mono_object_class (object);
+
+ if (!mono_domain_get ())
+ mono_thread_attach (mono_get_root_domain ());
+
+ for (i=0; i < cNames; i++) {
+ methodname = mono_unicode_to_external (rgszNames[i]);
+
+ method = mono_class_get_method_from_name(klass, methodname, -1);
+ if (method)
+ rgDispId[i] = (gint32)method->token;
+ else {
+ rgDispId[i] = MONO_E_DISPID_UNKNOWN;
+ ret = MONO_E_DISP_E_UNKNOWNNAME;
+ }
+ }
+
+ return ret;
}
static int STDCALL
{
MonoMethodBuilder *mb = m->mb;
- mono_init_com_types ();
-
switch (action) {
case MARSHAL_ACTION_CONV_IN: {
get_native_variant_for_object = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetNativeVariantForObject", 2);
g_assert (get_native_variant_for_object);
- elem_var = mono_mb_add_local (mb, &mono_defaults.variant_class->byval_arg);
+ elem_var = mono_mb_add_local (mb, &mono_class_get_variant_class ()->byval_arg);
mono_mb_emit_ldloc_addr (mb, elem_var);
mono_mb_emit_managed_call (mb, get_native_variant_for_object, NULL);
mono_mb_emit_icall (mb, mono_marshal_safearray_set_value);
if (!variant_clear)
- variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+ variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
mono_mb_emit_ldloc_addr (mb, elem_var);
mono_mb_emit_managed_call (mb, variant_clear, NULL);
return NULL;
}
/* allow two :: to separate the method name */
- if (method_name [-1] == ':')
+ if (method_name != class_nspace && method_name [-1] == ':')
method_name [-1] = 0;
*method_name++ = 0;
class_name = strrchr (class_nspace, '.');
void
mono_install_free_domain_hook (MonoFreeDomainFunc func) MONO_INTERNAL;
-void
-mono_init_com_types (void) MONO_INTERNAL;
-
void
mono_cleanup (void) MONO_INTERNAL;
#include <mono/metadata/mono-debug-debugger.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/threads-types.h>
+#include <mono/metadata/runtime.h>
#include <metadata/threads.h>
#include <metadata/profiler-private.h>
#include <mono/metadata/coree.h>
mono_classes_init ();
mono_loader_init ();
mono_reflection_init ();
+ mono_runtime_init_tls ();
/* FIXME: When should we release this memory? */
MONO_GC_REGISTER_ROOT_FIXED (appdomains_list);
mono_defaults.corlib, "System.Reflection", "CustomAttributeData");
/* these are initialized lazily when COM features are used */
-#ifndef DISABLE_COM
- mono_defaults.variant_class = NULL;
- mono_defaults.com_object_class = NULL;
- mono_defaults.com_interop_proxy_class = NULL;
- mono_defaults.iunknown_class = NULL;
- mono_defaults.idispatch_class = NULL;
-#endif
mono_class_init (mono_defaults.array_class);
mono_defaults.generic_nullable_class = mono_class_from_name (
return mono_init_internal (domain_name, NULL, version);
}
-#ifndef DISABLE_COM
-/**
- * mono_init_com_types:
- *
- * Initializes all types needed for COM Interop in mono_defaults structure.
- */
-void
-mono_init_com_types (void)
-{
- static gboolean initialized = FALSE;
-
- if (initialized)
- return;
-
- /* FIXME: do I need some threading protection here */
-
- g_assert (mono_defaults.corlib);
-
- mono_defaults.variant_class = mono_class_from_name (
- mono_defaults.corlib, "System", "Variant");
- g_assert (mono_defaults.variant_class != 0);
-
- mono_defaults.com_object_class = mono_class_from_name (
- mono_defaults.corlib, "System", "__ComObject");
- g_assert (mono_defaults.com_object_class != 0);
-
- mono_defaults.com_interop_proxy_class = mono_class_from_name (
- mono_defaults.corlib, "Mono.Interop", "ComInteropProxy");
- g_assert (mono_defaults.com_interop_proxy_class != 0);
-
- mono_defaults.iunknown_class = mono_class_from_name (
- mono_defaults.corlib, "Mono.Interop", "IUnknown");
- g_assert (mono_defaults.iunknown_class != 0);
-
- mono_defaults.idispatch_class = mono_class_from_name (
- mono_defaults.corlib, "Mono.Interop", "IDispatch");
- g_assert (mono_defaults.idispatch_class != 0);
-
- initialized = TRUE;
-}
-#endif /*DISABLE_COM*/
-
/**
* mono_cleanup:
*
/* This needs to be done before closing assemblies */
mono_gc_clear_domain (domain);
+ /* Close dynamic assemblies first, since they have no ref count */
+ for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
+ MonoAssembly *ass = tmp->data;
+ if (!ass->image || !ass->image->dynamic)
+ continue;
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
+ if (!mono_assembly_close_except_image_pools (ass))
+ tmp->data = NULL;
+ }
+
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
MonoAssembly *ass = tmp->data;
+ if (!ass)
+ continue;
+ if (!ass->image || ass->image->dynamic)
+ continue;
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
if (!mono_assembly_close_except_image_pools (ass))
tmp->data = NULL;
int alloc_type;
} AllocatorWrapperInfo;
-MonoMethod* mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box) MONO_INTERNAL;
+MonoMethod* mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box) MONO_INTERNAL;
MonoMethod* mono_gc_get_managed_array_allocator (MonoClass *klass) MONO_INTERNAL;
MonoMethod *mono_gc_get_managed_allocator_by_type (int atype) MONO_INTERNAL;
RefQueueEntry **iter = &queue->queue;
RefQueueEntry *entry;
while ((entry = *iter)) {
- MonoObject *obj;
if (entry->domain == domain) {
#ifdef HAVE_SGEN_GC
mono_gc_weak_link_remove (&entry->dis_link, TRUE);
* NaCl exits anyway.
*/
#ifndef __native_client__
- mono_runtime_shutdown ();
-
- /* This will kill the tp threads which cannot be suspended */
- mono_thread_pool_cleanup ();
+ if (!mono_runtime_try_shutdown ())
+ mono_thread_exit ();
/* Suspend all managed threads since the runtime is going away */
mono_thread_suspend_all_other_threads ();
* MonoImage might outlive its associated MonoAssembly.
*/
if (image->references && !image->dynamic) {
- MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
- int i;
-
- for (i = 0; i < t->rows; i++) {
+ for (i = 0; i < image->nreferences; i++) {
if (image->references [i] && image->references [i] != REFERENCE_MISSING) {
if (!mono_assembly_close_except_image_pools (image->references [i]))
image->references [i] = NULL;
image->reflection_info_unregister_classes = NULL;
if (image->references && !image->dynamic) {
- MonoTableInfo *t = &image->tables [MONO_TABLE_ASSEMBLYREF];
- int i;
-
- for (i = 0; i < t->rows; i++) {
+ for (i = 0; i < image->nreferences; i++) {
if (image->references [i] && image->references [i] != REFERENCE_MISSING)
mono_assembly_close_finish (image->references [i]);
}
return sig;
}
+void
+mono_marshal_init_tls (void)
+{
+ mono_native_tls_alloc (&last_error_tls_id, NULL);
+ mono_native_tls_alloc (&load_type_info_tls_id, NULL);
+}
+
void
mono_marshal_init (void)
{
module_initialized = TRUE;
InitializeCriticalSection (&marshal_mutex);
marshal_mutex_initialized = TRUE;
- mono_native_tls_alloc (&last_error_tls_id, NULL);
- mono_native_tls_alloc (&load_type_info_tls_id, NULL);
register_icall (ves_icall_System_Threading_Thread_ResetAbort, "ves_icall_System_Threading_Thread_ResetAbort", "void", TRUE);
register_icall (mono_marshal_string_to_utf16, "mono_marshal_string_to_utf16", "ptr obj", FALSE);
}
case MONO_TYPE_OBJECT: {
#ifndef DISABLE_COM
- mono_init_com_types ();
if (to_object) {
static MonoMethod *variant_clear = NULL;
static MonoMethod *get_object_for_native_variant = NULL;
if (!variant_clear)
- variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+ variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
if (!get_object_for_native_variant)
get_object_for_native_variant = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1);
mono_mb_emit_ldloc (mb, 1);
/* this seems to be the best plase to put this, as all remoting invokes seem to get filtered through here */
#ifndef DISABLE_COM
- if (mono_class_is_com_object (method->klass) || method->klass == mono_defaults.com_object_class) {
+ if (mono_class_is_com_object (method->klass) || method->klass == mono_class_get_com_object_class ()) {
MonoVTable *vtable = mono_class_vtable (mono_domain_get (), method->klass);
g_assert (vtable); /*FIXME do proper error handling*/
static MonoMethod *get_object_for_native_variant = NULL;
static MonoMethod *get_native_variant_for_object = NULL;
- mono_init_com_types ();
-
if (!get_object_for_native_variant)
get_object_for_native_variant = mono_class_get_method_from_name (mono_defaults.marshal_class, "GetObjectForNativeVariant", 1);
g_assert (get_object_for_native_variant);
switch (action) {
case MARSHAL_ACTION_CONV_IN: {
- conv_arg = mono_mb_add_local (mb, &mono_defaults.variant_class->byval_arg);
+ conv_arg = mono_mb_add_local (mb, &mono_class_get_variant_class ()->byval_arg);
if (t->byref)
- *conv_arg_type = &mono_defaults.variant_class->this_arg;
+ *conv_arg_type = &mono_class_get_variant_class ()->this_arg;
else
- *conv_arg_type = &mono_defaults.variant_class->byval_arg;
+ *conv_arg_type = &mono_class_get_variant_class ()->byval_arg;
if (t->byref && !(t->attrs & PARAM_ATTRIBUTE_IN) && t->attrs & PARAM_ATTRIBUTE_OUT)
break;
static MonoMethod *variant_clear = NULL;
if (!variant_clear)
- variant_clear = mono_class_get_method_from_name (mono_defaults.variant_class, "Clear", 0);
+ variant_clear = mono_class_get_method_from_name (mono_class_get_variant_class (), "Clear", 0);
g_assert (variant_clear);
conv_arg = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
if (t->byref)
- *conv_arg_type = &mono_defaults.variant_class->this_arg;
+ *conv_arg_type = &mono_class_get_variant_class ()->this_arg;
else
- *conv_arg_type = &mono_defaults.variant_class->byval_arg;
+ *conv_arg_type = &mono_class_get_variant_class ()->byval_arg;
if (t->byref && !(t->attrs & PARAM_ATTRIBUTE_IN) && t->attrs & PARAM_ATTRIBUTE_OUT)
break;
void
mono_marshal_init (void) MONO_INTERNAL;
+void
+mono_marshal_init_tls (void) MONO_INTERNAL;
+
void
mono_marshal_cleanup (void) MONO_INTERNAL;
* It is NULL terminated.
*/
MonoAssembly **references;
+ int nreferences;
MonoImage **modules;
guint32 module_count;
static void
collect_method_images (MonoMethodInflated *method, CollectData *data)
{
+ MonoMethod *m = method->declaring;
+
add_image (method->declaring->klass->image, data);
if (method->context.class_inst)
collect_ginst_images (method->context.class_inst, data);
if (method->context.method_inst)
collect_ginst_images (method->context.method_inst, data);
/*
- if (((MonoMethod*)method)->signature)
- collect_signature_images (mono_method_signature ((MonoMethod*)method), data);
- */
+ * Dynamic assemblies have no references, so the images they depend on can be unloaded before them.
+ */
+ if (m->klass->image->dynamic)
+ collect_signature_images (mono_method_signature (m), data);
}
static void
for (i = 0; i < jit->num_locals; i++)
write_variable (&jit->locals [i], ptr, &ptr);
+ *ptr++ = jit->gsharedvt_info_var ? 1 : 0;
+ if (jit->gsharedvt_info_var) {
+ write_variable (jit->gsharedvt_info_var, ptr, &ptr);
+ write_variable (jit->gsharedvt_locals_var, ptr, &ptr);
+ }
+
size = ptr - oldptr;
g_assert (size < max_size);
total_size = size + sizeof (MonoDebugMethodAddress);
g_free (jit->this_var);
g_free (jit->params);
g_free (jit->locals);
+ g_free (jit->gsharedvt_info_var);
+ g_free (jit->gsharedvt_locals_var);
g_free (jit);
}
for (i = 0; i < jit->num_locals; i++)
read_variable (&jit->locals [i], ptr, &ptr);
+ if (*ptr++) {
+ jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+ jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+ read_variable (jit->gsharedvt_info_var, ptr, &ptr);
+ read_variable (jit->gsharedvt_locals_var, ptr, &ptr);
+ }
+
return jit;
}
MonoDebugVarInfo *params;
uint32_t num_locals;
MonoDebugVarInfo *locals;
+ MonoDebugVarInfo *gsharedvt_info_var;
+ MonoDebugVarInfo *gsharedvt_locals_var;
};
struct _MonoDebugMethodAddressList {
/* The variable is dead. */
#define MONO_DEBUG_VAR_ADDRESS_MODE_DEAD 0x30000000
+/* Same as REGOFFSET, but do an indirection */
+#define MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR 0x40000000
+
+/* gsharedvt local */
+#define MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL 0x50000000
+
struct _MonoDebugVarInfo {
uint32_t index;
uint32_t offset;
}
MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
{
return NULL;
}
type = ((MonoReflectionType *)rp->class_to_proxy)->type;
klass = mono_class_from_mono_type (type);
#ifndef DISABLE_COMf
- if ((mono_class_is_com_object (klass) || (mono_defaults.com_object_class && klass == mono_defaults.com_object_class)) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
+ if ((mono_class_is_com_object (klass) || (mono_class_get_com_object_class () && klass == mono_class_get_com_object_class ())) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP);
else
#endif
res = mono_marshal_get_remoting_invoke_with_check (res);
else {
#ifndef DISABLE_COM
- if (klass == mono_defaults.com_object_class || mono_class_is_com_object (klass))
+ if (klass == mono_class_get_com_object_class () || mono_class_is_com_object (klass))
res = mono_cominterop_get_invoke (res);
else
#endif
#include <mono/metadata/runtime.h>
#include <mono/metadata/monitor.h>
#include <mono/metadata/threads-types.h>
+#include <mono/metadata/threadpool.h>
+#include <mono/metadata/marshal.h>
+#include <mono/utils/atomic.h>
+
+static gboolean shutting_down_inited = FALSE;
+static gboolean shutting_down = FALSE;
+
+/**
+ * mono_runtime_set_shutting_down:
+ *
+ * Invoked by System.Environment.Exit to flag that the runtime
+ * is shutting down.
+ *
+ * Deprecated. This function can break the shutdown sequence.
+ */
+void
+mono_runtime_set_shutting_down (void)
+{
+ shutting_down = TRUE;
+}
+
+/**
+ * mono_runtime_is_shutting_down:
+ *
+ * Returns whether the runtime has been flagged for shutdown.
+ *
+ * This is consumed by the P:System.Environment.HasShutdownStarted
+ * property.
+ *
+ */
+gboolean
+mono_runtime_is_shutting_down (void)
+{
+ return shutting_down;
+}
static void
fire_process_exit_event (MonoDomain *domain, gpointer user_data)
#endif
}
-/*
-Initialize runtime shutdown.
-After this call completes the thread pool will stop accepting new jobs and
-*/
-void
-mono_runtime_shutdown (void)
+/*
+ * Try to initialize runtime shutdown.
+ * After this call completes the thread pool will stop accepting new jobs and no further threads will be created.
+ *
+ * @return true if shutdown was initiated by this call or false is other thread beat this one
+ */
+gboolean
+mono_runtime_try_shutdown (void)
{
+ if (InterlockedCompareExchange (&shutting_down_inited, TRUE, FALSE))
+ return FALSE;
+
mono_runtime_fire_process_exit_event ();
+ shutting_down = TRUE;
+
mono_threads_set_shutting_down ();
/* No new threads will be created after this point */
mono_runtime_set_shutting_down ();
+ /* This will kill the tp threads which cannot be suspended */
+ mono_thread_pool_cleanup ();
+
+ /*TODO move the follow to here:
+ mono_thread_suspend_all_other_threads (); OR mono_thread_wait_all_other_threads
+
+ mono_runtime_quit ();
+ */
+
+ return TRUE;
}
return TRUE;
return FALSE;
}
+
+/*
+Coordinate the creation of all remaining TLS slots in the runtime.
+No further TLS slots should be created after this function finishes.
+This restriction exists because AOT requires offsets to be constant
+across runs.
+*/
+void
+mono_runtime_init_tls (void)
+{
+ mono_marshal_init_tls ();
+ mono_thread_pool_init_tls ();
+ mono_thread_init_tls ();
+}
MONO_BEGIN_DECLS
gboolean mono_runtime_is_critical_method (MonoMethod *method) MONO_INTERNAL;
-void mono_runtime_shutdown (void) MONO_INTERNAL;
+gboolean mono_runtime_try_shutdown (void) MONO_INTERNAL;
+void mono_runtime_init_tls (void) MONO_INTERNAL;
MONO_END_DECLS
#endif /* _MONO_METADATA_RUNTIME_H_ */
if (!registered) {
mono_register_jit_icall (mono_gc_alloc_obj, "mono_gc_alloc_obj", mono_create_icall_signature ("object ptr int"), FALSE);
mono_register_jit_icall (mono_gc_alloc_vector, "mono_gc_alloc_vector", mono_create_icall_signature ("object ptr int int"), FALSE);
+ mono_register_jit_icall (mono_gc_alloc_string, "mono_gc_alloc_string", mono_create_icall_signature ("object ptr int int32"), FALSE);
registered = TRUE;
}
} else if (atype == ATYPE_VECTOR) {
num_params = 2;
name = "AllocVector";
+ } else if (atype == ATYPE_STRING) {
+ num_params = 2;
+ name = "AllocString";
} else {
g_assert_not_reached ();
}
csig = mono_metadata_signature_alloc (mono_defaults.corlib, num_params);
- csig->ret = &mono_defaults.object_class->byval_arg;
- for (i = 0; i < num_params; ++i)
- csig->params [i] = &mono_defaults.int_class->byval_arg;
+ if (atype == ATYPE_STRING) {
+ csig->ret = &mono_defaults.string_class->byval_arg;
+ csig->params [0] = &mono_defaults.int_class->byval_arg;
+ csig->params [1] = &mono_defaults.int32_class->byval_arg;
+ } else {
+ csig->ret = &mono_defaults.object_class->byval_arg;
+ for (i = 0; i < num_params; ++i)
+ csig->params [i] = &mono_defaults.int_class->byval_arg;
+ }
mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_ALLOC);
mono_mb_set_clauses (mb, 1, clause);
mono_mb_patch_branch (mb, pos_leave);
/* end catch */
+ } else if (atype == ATYPE_STRING) {
+ /* a string allocator method takes the args: (vtable, len) */
+ /* bytes = (sizeof (MonoString) + ((len + 1) * 2)); */
+ mono_mb_emit_ldarg (mb, 1);
+ mono_mb_emit_icon (mb, 1);
+ mono_mb_emit_byte (mb, MONO_CEE_SHL);
+ //WE manually fold the above + 2 here
+ mono_mb_emit_icon (mb, sizeof (MonoString) + 2);
+ mono_mb_emit_byte (mb, CEE_ADD);
+ mono_mb_emit_stloc (mb, size_var);
} else {
g_assert_not_reached ();
}
} else if (atype == ATYPE_VECTOR) {
mono_mb_emit_ldarg (mb, 1);
mono_mb_emit_icall (mb, mono_gc_alloc_vector);
+ } else if (atype == ATYPE_STRING) {
+ mono_mb_emit_ldarg (mb, 1);
+ mono_mb_emit_icall (mb, mono_gc_alloc_string);
} else {
g_assert_not_reached ();
}
#else
mono_mb_emit_byte (mb, CEE_STIND_I4);
#endif
+ } else if (atype == ATYPE_STRING) {
+ /* need to set length and clear the last char */
+ /* s->length = len; */
+ mono_mb_emit_ldloc (mb, p_var);
+ mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, length));
+ mono_mb_emit_byte (mb, MONO_CEE_ADD);
+ mono_mb_emit_ldarg (mb, 1);
+ mono_mb_emit_byte (mb, MONO_CEE_STIND_I4);
+ /* s->chars [len] = 0; */
+ mono_mb_emit_ldloc (mb, p_var);
+ mono_mb_emit_ldloc (mb, size_var);
+ mono_mb_emit_icon (mb, 2);
+ mono_mb_emit_byte (mb, MONO_CEE_SUB);
+ mono_mb_emit_byte (mb, MONO_CEE_ADD);
+ mono_mb_emit_icon (mb, 0);
+ mono_mb_emit_byte (mb, MONO_CEE_STIND_I2);
}
/*
* object allocate (MonoVTable *vtable)
*/
MonoMethod*
-mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
+mono_gc_get_managed_allocator (MonoClass *klass, gboolean for_box)
{
#ifdef MANAGED_ALLOCATION
- MonoClass *klass = vtable->klass;
#ifdef HAVE_KW_THREAD
int tlab_next_offset = -1;
return NULL;
if (klass->instance_size > tlab_size)
return NULL;
+
if (klass->has_finalize || mono_class_is_marshalbyref (klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
return NULL;
if (klass->rank)
return NULL;
if (klass->byval_arg.type == MONO_TYPE_STRING)
- return NULL;
+ return mono_gc_get_managed_allocator_by_type (ATYPE_STRING);
if (collect_before_allocs)
return NULL;
-
- if (ALIGN_TO (klass->instance_size, ALLOC_ALIGN) < MAX_SMALL_OBJ_SIZE)
+ /* Generic classes have dynamic field and can go above MAX_SMALL_OBJ_SIZE. */
+ if (ALIGN_TO (klass->instance_size, ALLOC_ALIGN) < MAX_SMALL_OBJ_SIZE && !mono_class_is_open_constructed_type (&klass->byval_arg))
return mono_gc_get_managed_allocator_by_type (ATYPE_SMALL);
else
return mono_gc_get_managed_allocator_by_type (ATYPE_NORMAL);
void
mono_gc_pthread_exit (void *retval)
{
+ mono_thread_info_dettach ();
pthread_exit (retval);
}
ATYPE_NORMAL,
ATYPE_VECTOR,
ATYPE_SMALL,
+ ATYPE_STRING,
ATYPE_NUM
} SgenAllocatorType;
*/
if (!card_data)
continue;
+#else
+ g_assert_not_reached ();
+ card_data = NULL;
#endif
} else {
card_data = card_base = sgen_card_table_get_card_scan_address ((mword)block_start);
#include "metadata/sgen-protocol.h"
#include "metadata/sgen-archdep.h"
#include "metadata/sgen-bridge.h"
+#include "metadata/sgen-memory-governor.h"
#include "metadata/mono-gc.h"
#include "metadata/method-builder.h"
#include "metadata/profiler-private.h"
static volatile int next_record;
static volatile int alloc_count;
+void dump_alloc_records (void);
+void verify_alloc_records (void);
static const char*
get_reason_name (AllocRecord *rec)
*error = 0;
- if (code == FIONBIO) {
+ if ((guint32)code == FIONBIO) {
/* Invalid command. Must use Socket.Blocking */
return -1;
}
}
void
-mono_thread_pool_init ()
+mono_thread_pool_init_tls (void)
+{
+ mono_wsq_init ();
+}
+
+void
+mono_thread_pool_init (void)
{
gint threads_per_cpu = 1;
gint thread_count;
InitializeCriticalSection (&wsqs_lock);
wsqs = g_ptr_array_sized_new (MAX (100 * cpu_count, thread_count));
- mono_wsq_init ();
#ifndef DISABLE_PERFCOUNTERS
async_tp.pc_nitems = init_perf_counter ("Mono Threadpool", "Work Items Added");
threadpool_clear_queue (ThreadPool *tp, MonoDomain *domain)
{
MonoObject *obj;
- MonoMList *other;
+ MonoMList *other = NULL;
+ MonoCQ *queue = tp->queue;
- other = NULL;
- while (mono_cq_dequeue (tp->queue, &obj)) {
+ if (!queue)
+ return;
+
+ while (mono_cq_dequeue (queue, &obj)) {
if (obj == NULL)
continue;
if (obj->vtable->domain != domain)
threadpool_jobs_dec (obj);
}
+ if (mono_runtime_is_shutting_down ())
+ return;
+
while (other) {
threadpool_append_job (tp, (MonoObject *) mono_mlist_get_data (other));
other = mono_mlist_next (other);
/* No managed code here */
void mono_thread_pool_init (void) MONO_INTERNAL;
+void mono_thread_pool_init_tls (void) MONO_INTERNAL;
void icall_append_job (MonoObject *ar) MONO_INTERNAL;
void icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state) MONO_INTERNAL;
void mono_thread_cleanup_apartment_state (void) MONO_INTERNAL;
void mono_threads_set_shutting_down (void) MONO_INTERNAL;
-gboolean mono_threads_is_shutting_down (void) MONO_INTERNAL;
gunichar2* mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len) MONO_INTERNAL;
MonoException* mono_thread_resume_interruption (void) MONO_INTERNAL;
void mono_threads_perform_thread_dump (void) MONO_INTERNAL;
+MonoThread *mono_thread_attach_full (MonoDomain *domain, gboolean force_attach) MONO_INTERNAL;
+
+void mono_thread_init_tls (void) MONO_INTERNAL;
#endif /* _MONO_METADATA_THREADS_TYPES_H_ */
* If handle_store() returns FALSE the thread must not be started
* because Mono is shutting down.
*/
-static gboolean handle_store(MonoThread *thread)
+static gboolean handle_store(MonoThread *thread, gboolean force_attach)
{
mono_threads_lock ();
if (threads_starting_up)
mono_g_hash_table_remove (threads_starting_up, thread);
- if (shutting_down) {
+ if (shutting_down && !force_attach) {
mono_threads_unlock ();
return FALSE;
}
if (threadpool_thread)
mono_thread_set_state (internal, ThreadState_Background);
- if (handle_store (thread))
+ if (handle_store (thread, FALSE))
ResumeThread (thread_handle);
/* Check that the managed and unmanaged layout of MonoInternalThread matches */
void
mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
- *staddr = NULL;
- *stsize = 0;
#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
*staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
*stsize = pthread_get_stacksize_np (pthread_self ());
/* When running under emacs, sometimes staddr is not aligned to a page size */
*staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
-}
+}
MonoThread *
mono_thread_attach (MonoDomain *domain)
+{
+ return mono_thread_attach_full (domain, FALSE);
+}
+
+MonoThread *
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
{
MonoThreadInfo *info;
MonoInternalThread *thread;
current_thread = new_thread_with_internal (domain, thread);
- if (!handle_store (current_thread)) {
+ if (!handle_store (current_thread, force_attach)) {
/* Mono is shutting down, so just wait for the end */
for (;;)
Sleep (10000);
* launched, to avoid the main thread deadlocking while trying
* to clean up a thread that will never be signalled.
*/
- if (!handle_store (thread))
+ if (!handle_store (thread, FALSE))
return;
ResumeThread (internal->handle);
mono_gc_wbarrier_generic_nostore (ptr);
}
+void
+mono_thread_init_tls (void)
+{
+ MONO_FAST_TLS_INIT (tls_current_object);
+ mono_native_tls_alloc (¤t_object_key, NULL);
+}
+
void mono_thread_init (MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb)
{
mono_init_static_data_info (&thread_static_info);
mono_init_static_data_info (&context_static_info);
- MONO_FAST_TLS_INIT (tls_current_object);
- mono_native_tls_alloc (¤t_object_key, NULL);
THREAD_DEBUG (g_message ("%s: Allocated current_object_key %d", __func__, current_object_key));
mono_thread_start_cb = start_cb;
}
}
-/**
- * mono_threads_is_shutting_down:
- *
- * Returns whether a thread has commenced shutdown of Mono. Note that
- * if the function returns FALSE the caller must not assume that
- * shutdown is not in progress, because the situation might have
- * changed since the function returned. For that reason this function
- * is of very limited utility.
- */
-gboolean
-mono_threads_is_shutting_down (void)
-{
- return shutting_down;
-}
-
void mono_thread_manage (void)
{
struct wait_data wait_data;
THREAD_DEBUG (g_message ("%s: I have %d threads after waiting.", __func__, wait->num));
} while(wait->num>0);
- mono_runtime_shutdown ();
-
- THREAD_DEBUG (g_message ("%s: threadpool cleanup", __func__));
- mono_thread_pool_cleanup ();
+ /* Mono is shutting down, so just wait for the end */
+ if (!mono_runtime_try_shutdown ()) {
+ /*FIXME mono_thread_suspend probably should call mono_thread_execute_interruption when self interrupting. */
+ mono_thread_suspend (mono_thread_internal_current ());
+ mono_thread_execute_interruption (mono_thread_internal_current ());
+ }
/*
* Remove everything but the finalizer thread and self.
if (!is_valid_type_in_context (ctx, type)) {
char *str = mono_type_full_name (type);
ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid generic type (%s%s) (argument out of range or %s is not generic) at 0x%04x",
- type->type == MONO_TYPE_VAR ? "!" : "!!",
+ str [0] == '!' ? "" : type->type == MONO_TYPE_VAR ? "!" : "!!",
str,
type->type == MONO_TYPE_VAR ? "class" : "method",
ctx->ip_offset),
ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Catch clause %d with invalid type", i));
break;
}
-
+ if (!mono_type_is_valid_in_context (&ctx, &clause->data.catch_class->byval_arg))
+ break;
+
init_stack_with_value_at_exception_boundary (&ctx, ctx.code + clause->handler_offset, clause->data.catch_class);
}
else if (clause->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
}
}
+ if (!ctx.valid)
+ goto cleanup;
+
original_bb = bb = mono_basic_block_split (method, &error);
if (!mono_error_ok (&error)) {
ADD_VERIFY_ERROR (&ctx, g_strdup_printf ("Invalid branch target: %s", mono_error_get_message (&error)));
/inssel.c
/inssel.h
/mini.pc
-/cpu-pentium.h
-/cpu-g4.h
-/cpu-amd64.h
+/cpu-*.h
/mono
/monow
-/cpu-sparc.h
-/cpu-s390.h
-/cpu-x86.h
/.hidden
/semantic.cache
/.project
CLASS=$(mcs_topdir)/class/lib/net_4_5
-RUNTIME_EXECUTABLE = $(if $(SGEN),$(top_builddir)/mono/mini/mono-sgen,$(top_builddir)/runtime/mono-wrapper)
+RUNTIME_EXECUTABLE = $(if $(BOEHM),$(top_builddir)/mono/mini/mono-boehm,$(top_builddir)/runtime/mono-wrapper)
RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
RUNTIME_AOTCHECK = MONO_PATH=$(CLASS):. $(RUNTIME_EXECUTABLE)
if NO_VERSION_SCRIPT
monoldflags=$(export_ldflags)
-monobinldflags=$(export_ldflags)
+monobinldflags=$(export_ldflags) $(extra_runtime_ldflags)
else
monoldflags=-Wl,-version-script=$(srcdir)/ldscript $(export_ldflags)
-monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags)
+monobinldflags=-Wl,-version-script=$(srcdir)/ldscript.mono $(export_ldflags) $(extra_runtime_ldflags)
endif
if HOST_WIN32
-libmono_2_0_la_LDFLAGS=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
+libmonoldflags=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
else
-libmono_2_0_la_LDFLAGS=$(monoldflags) -version-info 1:0:0
+if PLATFORM_ANDROID
+libmonoldflags= -avoid-version $(monoldflags)
+else
+libmonoldflags=$(monoldflags) -version-info 1:0:0
+endif
endif
if JIT_SUPPORTED
endif
if SUPPORT_BOEHM
-boehm_libraries = libmono-2.0.la
+boehm_libraries = libmonoboehm-2.0.la
boehm_static_libraries = libmini-static.la $(static_libs)
-boehm_binaries = mono
+boehm_binaries = mono-boehm
+endif
+
+#The mono uses sgen, while libmono remains boehm
+mono_bin_suffix = sgen
+libmono_suffix = boehm
+
+if DISABLE_EXECUTABLES
+else
+bin_SCRIPTS = mono
+noinst_SCRIPTS = mono
+
+mono: mono-$(mono_bin_suffix)
+ ln -sf $< $@
+
+install-exec-hook:
+ ln -sf $(DESTDIR)$(bindir)/mono-$(libmono_suffix) $(DESTDIR)$(bindir)/mono
+ (cd $(DESTDIR)$(libdir); for i in libmono$(libmono_suffix)*; do ln -sf $$i `echo $$i | sed s/$(libmono_suffix)//` ; done)
endif
if DISABLE_EXECUTABLES
endif
endif
+if DISABLE_EXECUTABLES
noinst_PROGRAMS = genmdesc
+else
+noinst_PROGRAMS = genmdesc mono
+endif
if DISABLE_EXECUTABLES
shared_libraries = $(boehm_libraries) $(sgen_libraries)
endif
-mono_SOURCES = \
+mono_boehm_SOURCES = \
main.c
mono_CFLAGS = $(AM_CFLAGS)
+mono_boehm_CFLAGS = $(AM_CFLAGS)
+
AM_CPPFLAGS = $(LIBGC_CPPFLAGS)
-mono_sgen_SOURCES = $(mono_SOURCES)
+mono_sgen_SOURCES = \
+ main-sgen.c
+
+mono_SOURCES = \
+ main-sgen.c
+
mono_sgen_CFLAGS = $(AM_CFLAGS)
# We build this after libmono was built so it contains the date when the final
# link was done
if SUPPORT_BOEHM
-buildver.h: libmini-static.la
- @echo "const char *build_date = \"`date`\";" > buildver.h
-mono-main.$(OBJEXT): buildver.h
+if DISABLE_EXECUTABLES
+buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime.la
+else
+buildver-boehm.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntime-static.la
+endif
+ @echo "const char *build_date = \"`date`\";" > buildver-boehm.h
+mono_boehm-main.$(OBJEXT): buildver-boehm.h
endif
-buildver-sgen.h: libmini-static.la
+if DISABLE_EXECUTABLES
+buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen.la
+else
+buildver-sgen.h: libmini-static.la $(monodir)/mono/metadata/libmonoruntimesgen-static.la
+endif
@echo "const char *build_date = \"`date`\";" > buildver-sgen.h
-mono_sgen-main.$(OBJEXT): buildver-sgen.h
+mono_sgen-main-sgen.$(OBJEXT): buildver-sgen.h
if DTRACE_G_REQUIRED
LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.$(OBJEXT)
MONO_LIB=$(boehm_static_libraries)
MONO_SGEN_LIB=$(sgen_static_libraries)
else
-MONO_LIB=libmono-2.0.la
-MONO_SGEN_LIB=libmonosgen-2.0.la
+MONO_LIB=libmonoboehm-2.0.la
+MONO_LIBLIB=libmonosgen-2.0.la
endif
if LOADED_LLVM
LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS)
endif
-mono_LDADD = \
+mono_boehm_LDADD = \
$(MONO_LIB) \
$(GLIB_LIBS) \
$(LLVMMONOF) \
-lm \
$(MONO_DTRACE_OBJECT)
-mono_LDFLAGS = \
+mono_boehm_LDFLAGS = \
$(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
mono_sgen_LDADD = \
mono_sgen_LDFLAGS = $(static_flags) -export-dynamic $(monobinldflags) $(monobin_platform_ldflags)
+# if SUPPORT_SGEN
+#
+# mono_LDADD = $(mono_sgen_LDADD)
+# mono_LDFLAGS = $(mono_sgen_LDFLAGS)
+#
+# endif
+
+
if DTRACE_G_REQUIRED
mono-dtrace.$(OBJEXT): $(top_srcdir)/data/mono.d mini.lo $(monodir)/mono/metadata/libmonoruntime-static.la
# Create monow.exe, linked for the 'windows' subsystem
if HOST_WIN32
-monow_LDADD = $(mono_LDADD)
-monow_LDFLAGS = $(mono_LDFLAGS) -mwindows
-monow_SOURCES = $(mono_SOURCES)
+monow_LDADD = $(mono_boehm_LDADD)
+monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows
+monow_SOURCES = $(mono_boehm_SOURCES)
endif
genmdesc_SOURCES = \
libmini_la_SOURCES = $(common_sources) $(llvm_sources) $(arch_sources) $(os_sources)
libmini_la_CFLAGS = $(mono_CFLAGS)
-libmono_2_0_la_SOURCES =
-libmono_2_0_la_CFLAGS = $(mono_CFLAGS)
-libmono_2_0_la_LIBADD = libmini.la $(libs) $(LIBMONO_DTRACE_OBJECT)
+libmonoboehm_2_0_la_SOURCES =
+libmonoboehm_2_0_la_CFLAGS = $(mono_boehm_CFLAGS)
+libmonoboehm_2_0_la_LIBADD = libmini.la $(libs) $(LIBMONO_DTRACE_OBJECT)
+libmonoboehm_2_0_la_LDFLAGS = $(libmonoldflags)
libmonosgen_2_0_la_SOURCES =
libmonosgen_2_0_la_CFLAGS = $(mono_sgen_CFLAGS)
libmonosgen_2_0_la_LIBADD = libmini.la $(sgen_libs) $(LIBMONO_DTRACE_OBJECT)
-
-if PLATFORM_ANDROID
-libmonosgen_2_0_la_LDFLAGS = -avoid-version
-endif
+libmonosgen_2_0_la_LDFLAGS = $(libmonoldflags)
if MOONLIGHT
libmono_moon_la_SOURCES = $(libmini_la_SOURCES)
check-local: rcheck
clean-local:
- rm -f mono a.out gmon.out *.o buildver.h buildver-sgen.h test.exe
+ rm -f mono a.out gmon.out *.o buildver-boehm.h buildver-sgen.h test.exe
pkgconfigdir = $(libdir)/pkgconfig
gboolean no_direct_calls;
gboolean use_trampolines_page;
gboolean no_instances;
+ gboolean gnu_asm;
int nthreads;
int ntrampolines;
int nrgctx_trampolines;
char *static_linking_symbol;
CRITICAL_SECTION mutex;
gboolean use_bin_writer;
+ gboolean gas_line_numbers;
MonoImageWriter *w;
MonoDwarfWriter *dwarf;
FILE *fp;
GHashTable *plt_entry_debug_sym_cache;
gboolean thumb_mixed, need_no_dead_strip, need_pt_gnu_stack;
GHashTable *ginst_hash;
+ GHashTable *dwarf_ln_filenames;
gboolean global_symbols;
gboolean direct_method_addresses;
} MonoAotCompile;
*endbuf = p;
}
+static void
+emit_unset_mode (MonoAotCompile *acfg)
+{
+ img_writer_emit_unset_mode (acfg->w);
+}
+
+static G_GNUC_UNUSED void
+emit_set_thumb_mode (MonoAotCompile *acfg)
+{
+ emit_unset_mode (acfg);
+ fprintf (acfg->fp, ".code 16\n");
+}
+
+static G_GNUC_UNUSED void
+emit_set_arm_mode (MonoAotCompile *acfg)
+{
+ emit_unset_mode (acfg);
+ fprintf (acfg->fp, ".code 32\n");
+}
+
/* ARCHITECTURE SPECIFIC CODE */
#if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_POWERPC)
acfg->llvm_label_prefix = "";
acfg->user_symbol_prefix = "";
+#if defined(TARGET_AMD64) && defined(TARGET_MACH)
+ /* osx contains an old as which doesn't support avx opcodes */
+ g_string_append (acfg->llc_args, "-mattr=-avx");
+#endif
+
#ifdef TARGET_ARM
if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
g_string_append (acfg->llc_args, "-mattr=+v6");
acfg->user_symbol_prefix = "_";
acfg->llvm_label_prefix = "_";
acfg->need_no_dead_strip = TRUE;
+ acfg->aot_opts.gnu_asm = TRUE;
#endif
#if defined(__linux__) && !defined(TARGET_ARM)
#if defined(TARGET_X86) || defined(TARGET_AMD64)
/* Need to make sure this is exactly 5 bytes long */
if (external && !acfg->use_bin_writer) {
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, "call %s\n", target);
} else {
emit_byte (acfg, '\xe8');
img_writer_emit_reloc (acfg->w, R_ARM_CALL, target, -8);
emit_bytes (acfg, buf, 4);
} else {
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, "bl %s\n", target);
}
*call_size = 4;
if (acfg->use_bin_writer) {
g_assert_not_reached ();
} else {
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, "bl %s\n", target);
*call_size = 4;
}
{
#if defined(TARGET_POWERPC64)
g_assert (!acfg->use_bin_writer);
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
/*
* The ppc32 code doesn't seem to work on ppc64, the assembler complains about
* unsupported relocations. So we store the got address into the .Lgot_addr
*code_size = 16;
#elif defined(TARGET_POWERPC)
g_assert (!acfg->use_bin_writer);
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, ".L%d:\n", acfg->label_generator);
fprintf (acfg->fp, "lis 0, (%s + 4 - .L%d)@h\n", acfg->got_symbol, acfg->label_generator);
fprintf (acfg->fp, "ori 0, 0, (%s + 4 - .L%d)@l\n", acfg->got_symbol, acfg->label_generator);
/* The GOT address is guaranteed to be in r30 by OP_LOAD_GOTADDR */
g_assert (!acfg->use_bin_writer);
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, "lis 11, %d@h\n", offset);
fprintf (acfg->fp, "ori 11, 11, %d@l\n", offset);
fprintf (acfg->fp, "add 11, 11, 30\n");
/* LLVM calls the PLT entries using bl, so these have to be thumb2 */
/* The caller already transitioned to thumb */
/* The code below should be 12 bytes long */
+ /* clang has trouble encoding these instructions, so emit the binary */
+#if 0
fprintf (acfg->fp, "ldr ip, [pc, #8]\n");
/* thumb can't encode ld pc, [pc, ip] */
fprintf (acfg->fp, "add ip, pc, ip\n");
fprintf (acfg->fp, "ldr ip, [ip, #0]\n");
fprintf (acfg->fp, "bx ip\n");
+#endif
+ emit_set_thumb_mode (acfg);
+ fprintf (acfg->fp, ".4byte 0xc008f8df\n");
+ fprintf (acfg->fp, ".2byte 0x44fc\n");
+ fprintf (acfg->fp, ".4byte 0xc000f8dc\n");
+ fprintf (acfg->fp, ".2byte 0x4760\n");
emit_symbol_diff (acfg, acfg->got_symbol, ".", ((acfg->plt_got_offset_base + index) * sizeof (gpointer)) + 4);
emit_int32 (acfg, acfg->plt_got_info_offsets [index]);
+ emit_unset_mode (acfg);
+ emit_set_arm_mode (acfg);
#else
g_assert_not_reached ();
#endif
* in the second got slot of every aot image. The caller already computed
* the address of its got and placed it into r30.
*/
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
/* Load mscorlib got address */
fprintf (acfg->fp, "%s 0, %d(30)\n", PPC_LD_OP, (int)sizeof (gpointer));
/* Load generic trampoline address */
* in the second got slot of every aot image. The caller already computed
* the address of its got and placed it into r30.
*/
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
/* Load mscorlib got address */
fprintf (acfg->fp, "%s 0, %d(30)\n", PPC_LD_OP, (int)sizeof (gpointer));
/* Load rgctx */
{
#if defined(TARGET_POWERPC) && defined(__mono_ilp32__)
/* Based on code generated by gcc */
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp,
#if defined(_MSC_VER) || defined(MONO_CROSS_COMPILE)
}
if (strcmp (acfg->image->assembly->aname.name, "mscorlib") == 0) {
-#ifdef MONO_ARCH_HAVE_TLS_GET
MonoMethodDesc *desc;
MonoMethod *orig_method;
int nallocators;
-#endif
/* Runtime invoke wrappers */
/* stelemref */
add_method (acfg, mono_marshal_get_stelemref ());
-#ifdef MONO_ARCH_HAVE_TLS_GET
- /* Managed Allocators */
- nallocators = mono_gc_get_managed_allocator_types ();
- for (i = 0; i < nallocators; ++i) {
- m = mono_gc_get_managed_allocator_by_type (i);
- if (m)
- add_method (acfg, m);
- }
+ if (MONO_ARCH_HAVE_TLS_GET) {
+ /* Managed Allocators */
+ nallocators = mono_gc_get_managed_allocator_types ();
+ for (i = 0; i < nallocators; ++i) {
+ m = mono_gc_get_managed_allocator_by_type (i);
+ if (m)
+ add_method (acfg, m);
+ }
- /* Monitor Enter/Exit */
- desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
- orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
- /* This is a v4 method */
- if (orig_method) {
+ /* Monitor Enter/Exit */
+ desc = mono_method_desc_new ("Monitor:Enter(object,bool&)", FALSE);
+ orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
+ /* This is a v4 method */
+ if (orig_method) {
+ method = mono_monitor_get_fast_path (orig_method);
+ if (method)
+ add_method (acfg, method);
+ }
+ mono_method_desc_free (desc);
+
+ desc = mono_method_desc_new ("Monitor:Exit(object)", FALSE);
+ orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
+ g_assert (orig_method);
+ mono_method_desc_free (desc);
method = mono_monitor_get_fast_path (orig_method);
if (method)
- add_method (acfg, method);
+ add_method (acfg, method);
}
- mono_method_desc_free (desc);
-
- desc = mono_method_desc_new ("Monitor:Exit(object)", FALSE);
- orig_method = mono_method_desc_search_in_class (desc, mono_defaults.monitor_class);
- g_assert (orig_method);
- mono_method_desc_free (desc);
- method = mono_monitor_get_fast_path (orig_method);
- if (method)
- add_method (acfg, method);
-#endif
/* Stelemref wrappers */
{
return FALSE;
}
+static gboolean
+is_vt_inst (MonoGenericInst *inst)
+{
+ int i;
+
+ for (i = 0; i < inst->type_argc; ++i) {
+ MonoType *t = inst->type_argv [i];
+ if (t->type == MONO_TYPE_VALUETYPE)
+ return TRUE;
+ }
+ return FALSE;
+}
+
static gboolean
method_has_type_vars (MonoMethod *method)
{
MonoMethod *method;
MonoClassField *field;
gpointer iter;
+ gboolean use_gsharedvt = FALSE;
if (!acfg->ginst_hash)
acfg->ginst_hash = g_hash_table_new (NULL, NULL);
g_hash_table_insert (acfg->ginst_hash, klass, klass);
+ /*
+ * Use gsharedvt for generic collections with vtype arguments to avoid code blowup.
+ * Enable this only for some classes since gsharedvt might not support all methods.
+ */
+ if ((acfg->opts & MONO_OPT_GSHAREDVT) && klass->image == mono_defaults.corlib && klass->generic_class && klass->generic_class->context.class_inst && is_vt_inst (klass->generic_class->context.class_inst) && (!strcmp (klass->name, "Dictionary`2") || !strcmp (klass->name, "List`1")))
+ use_gsharedvt = TRUE;
+
iter = NULL;
while ((method = mono_class_get_methods (klass, &iter))) {
- if (mono_method_is_generic_sharable_full (method, FALSE, FALSE, FALSE))
+ if (mono_method_is_generic_sharable_full (method, FALSE, FALSE, use_gsharedvt))
/* Already added */
continue;
direct_callable = FALSE;
}
+ if (callee_cfg->method->wrapper_type == MONO_WRAPPER_ALLOC)
+ /* sgen does some initialization when the allocator method is created */
+ direct_callable = FALSE;
+
if (direct_callable)
return TRUE;
}
return import;
}
+static gint
+compare_lne (MonoDebugLineNumberEntry *a, MonoDebugLineNumberEntry *b)
+{
+ if (a->native_offset == b->native_offset)
+ return a->il_offset - b->il_offset;
+ else
+ return a->native_offset - b->native_offset;
+}
+
+/*
+ * compute_line_numbers:
+ *
+ * Returns a sparse array of size CODE_SIZE containing MonoDebugSourceLocation* entries for the native offsets which have a corresponding line number
+ * entry.
+ */
+static MonoDebugSourceLocation**
+compute_line_numbers (MonoMethod *method, int code_size, MonoDebugMethodJitInfo *debug_info)
+{
+ MonoDebugMethodInfo *minfo;
+ MonoDebugLineNumberEntry *ln_array;
+ MonoDebugSourceLocation *loc;
+ int i, prev_line, prev_il_offset;
+ int *native_to_il_offset = NULL;
+ MonoDebugSourceLocation **res;
+ gboolean first;
+
+ minfo = mono_debug_lookup_method (method);
+ if (!minfo)
+ return NULL;
+ // FIXME: This seems to happen when two methods have the same cfg->method_to_register
+ if (debug_info->code_size != code_size)
+ return NULL;
+
+ g_assert (code_size);
+
+ /* Compute the native->IL offset mapping */
+
+ ln_array = g_new0 (MonoDebugLineNumberEntry, debug_info->num_line_numbers);
+ memcpy (ln_array, debug_info->line_numbers, debug_info->num_line_numbers * sizeof (MonoDebugLineNumberEntry));
+
+ qsort (ln_array, debug_info->num_line_numbers, sizeof (MonoDebugLineNumberEntry), (gpointer)compare_lne);
+
+ native_to_il_offset = g_new0 (int, code_size + 1);
+
+ for (i = 0; i < debug_info->num_line_numbers; ++i) {
+ int j;
+ MonoDebugLineNumberEntry *lne = &ln_array [i];
+
+ if (i == 0) {
+ for (j = 0; j < lne->native_offset; ++j)
+ native_to_il_offset [j] = -1;
+ }
+
+ if (i < debug_info->num_line_numbers - 1) {
+ MonoDebugLineNumberEntry *lne_next = &ln_array [i + 1];
+
+ for (j = lne->native_offset; j < lne_next->native_offset; ++j)
+ native_to_il_offset [j] = lne->il_offset;
+ } else {
+ for (j = lne->native_offset; j < code_size; ++j)
+ native_to_il_offset [j] = lne->il_offset;
+ }
+ }
+ g_free (ln_array);
+
+ /* Compute the native->line number mapping */
+ res = g_new0 (MonoDebugSourceLocation*, code_size);
+ prev_il_offset = -1;
+ prev_line = -1;
+ first = TRUE;
+ for (i = 0; i < code_size; ++i) {
+ int il_offset = native_to_il_offset [i];
+
+ if (il_offset == -1 || il_offset == prev_il_offset)
+ continue;
+ prev_il_offset = il_offset;
+ loc = mono_debug_symfile_lookup_location (minfo, il_offset);
+ if (!(loc && loc->source_file))
+ continue;
+ if (loc->row == prev_line) {
+ mono_debug_symfile_free_location (loc);
+ continue;
+ }
+ prev_line = loc->row;
+ //printf ("D: %s:%d il=%x native=%x\n", loc->source_file, loc->row, il_offset, i);
+ if (first)
+ /* This will cover the prolog too */
+ res [0] = loc;
+ else
+ res [i] = loc;
+ first = FALSE;
+ }
+ return res;
+}
+
+static int
+get_file_index (MonoAotCompile *acfg, const char *source_file)
+{
+ int findex;
+
+ // FIXME: Free these
+ if (!acfg->dwarf_ln_filenames)
+ acfg->dwarf_ln_filenames = g_hash_table_new (g_str_hash, g_str_equal);
+ findex = GPOINTER_TO_INT (g_hash_table_lookup (acfg->dwarf_ln_filenames, source_file));
+ if (!findex) {
+ findex = g_hash_table_size (acfg->dwarf_ln_filenames) + 1;
+ g_hash_table_insert (acfg->dwarf_ln_filenames, g_strdup (source_file), GINT_TO_POINTER (findex));
+ emit_unset_mode (acfg);
+ fprintf (acfg->fp, ".file %d \"%s\"\n", findex, source_file);
+ }
+ return findex;
+}
+
/*
* emit_and_reloc_code:
*
* since trampolines are needed to make PTL work.
*/
static void
-emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, guint32 code_len, MonoJumpInfo *relocs, gboolean got_only)
+emit_and_reloc_code (MonoAotCompile *acfg, MonoMethod *method, guint8 *code, guint32 code_len, MonoJumpInfo *relocs, gboolean got_only, MonoDebugMethodJitInfo *debug_info)
{
int i, pindex, start_index, method_index;
GPtrArray *patches;
MonoJumpInfo *patch_info;
MonoMethodHeader *header;
+ MonoDebugSourceLocation **locs = NULL;
gboolean skip, direct_call, external_call;
guint32 got_slot;
const char *direct_call_target;
method_index = get_method_index (acfg, method);
}
+ if (acfg->gas_line_numbers && method && debug_info) {
+ locs = compute_line_numbers (method, code_len, debug_info);
+ if (!locs) {
+ int findex = get_file_index (acfg, "<unknown>");
+ emit_unset_mode (acfg);
+ fprintf (acfg->fp, ".loc %d %d 0\n", findex, 1);
+ }
+ }
+
/* Collect and sort relocations */
patches = g_ptr_array_new ();
for (patch_info = relocs; patch_info; patch_info = patch_info->next)
break;
}
+ if (locs && locs [i]) {
+ MonoDebugSourceLocation *loc = locs [i];
+ int findex;
+
+ findex = get_file_index (acfg, loc->source_file);
+ emit_unset_mode (acfg);
+ fprintf (acfg->fp, ".loc %d %d 0\n", findex, loc->row);
+ mono_debug_symfile_free_location (loc);
+ }
+
#ifdef MONO_ARCH_AOT_SUPPORTED
skip = FALSE;
if (patch_info && (patch_info->ip.i == i) && (pindex < patches->len)) {
/* Try to emit multiple bytes at once */
if (pindex < patches->len && patch_info->ip.i > i) {
- emit_bytes (acfg, code + i, patch_info->ip.i - i);
- i = patch_info->ip.i - 1;
+ int limit;
+
+ for (limit = i + 1; limit < patch_info->ip.i; ++limit) {
+ if (locs && locs [limit])
+ break;
+ }
+
+ emit_bytes (acfg, code + i, limit - i);
+ i = limit - 1;
} else {
emit_bytes (acfg, code + i, 1);
}
}
}
+
+ g_free (locs);
}
/*
acfg->cfgs [method_index]->got_offset = acfg->got_offset;
- emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE);
+ emit_and_reloc_code (acfg, method, code, cfg->code_len, cfg->patch_info, FALSE, mono_debug_find_method (cfg->jit_info->method, mono_domain_get ()));
emit_line (acfg);
}
encode_value (offset, p, &p);
- g_assert (entry->info_type < 256);
+ g_assert ((int)entry->info_type < 256);
g_assert (entry->data->type < 256);
encode_value ((entry->in_mrgctx ? 1 : 0) | (entry->info_type << 1) | (entry->data->type << 9), p, &p);
encode_patch (acfg, entry->data, p, &p);
case MONO_PATCH_INFO_SIGNATURE:
encode_signature (acfg, (MonoMethodSignature*)patch_info->data.target, p, &p);
break;
+ case MONO_PATCH_INFO_TLS_OFFSET:
+ encode_value (GPOINTER_TO_INT (patch_info->data.target), p, &p);
+ break;
case MONO_PATCH_INFO_GSHAREDVT_CALL:
encode_signature (acfg, (MonoMethodSignature*)patch_info->data.gsharedvt->sig, p, &p);
encode_method_ref (acfg, patch_info->data.gsharedvt->method, p, &p);
break;
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+ MonoGSharedVtMethodInfo *info = patch_info->data.gsharedvt_method;
+ int i;
+
+ encode_method_ref (acfg, info->method, p, &p);
+ encode_value (info->entries->len, p, &p);
+ for (i = 0; i < info->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *template = g_ptr_array_index (info->entries, i);
+
+ encode_value (template->info_type, p, &p);
+ switch (mini_rgctx_info_type_to_patch_info_type (template->info_type)) {
+ case MONO_PATCH_INFO_CLASS:
+ encode_klass_ref (acfg, mono_class_from_mono_type (template->data), p, &p);
+ break;
+ case MONO_PATCH_INFO_FIELD:
+ encode_field_info (acfg, template->data, p, &p);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+ }
+ break;
+ }
default:
g_warning ("unable to handle jump info %d", patch_info->type);
g_assert_not_reached ();
if (callee_cfg) {
if (acfg->thumb_mixed && !callee_cfg->compile_llvm) {
/* LLVM calls the PLT entries using bl, so emit a stub */
+ emit_set_thumb_mode (acfg);
fprintf (acfg->fp, "\n.thumb_func\n");
emit_label (acfg, plt_entry->llvm_symbol);
fprintf (acfg->fp, "bx pc\n");
fprintf (acfg->fp, "nop\n");
- fprintf (acfg->fp, ".arm\n");
+ emit_set_arm_mode (acfg);
fprintf (acfg->fp, "b %s\n", callee_cfg->asm_symbol);
} else {
fprintf (acfg->fp, "\n.set %s, %s\n", plt_entry->llvm_symbol, callee_cfg->asm_symbol);
if (debug_sym) {
if (acfg->need_no_dead_strip) {
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
fprintf (acfg->fp, " .no_dead_strip %s\n", debug_sym);
}
emit_local_symbol (acfg, debug_sym, NULL, TRUE);
* The code should access everything through the GOT, so we pass
* TRUE here.
*/
- emit_and_reloc_code (acfg, NULL, code, code_size, ji, TRUE);
+ emit_and_reloc_code (acfg, NULL, code, code_size, ji, TRUE, NULL);
emit_symbol_size (acfg, start_symbol, ".");
* does not need to support them by creating a fake GOT etc.
*/
cfg = mini_method_compile (method, acfg->opts, mono_get_root_domain (), FALSE, TRUE, 0);
+ mono_loader_clear_error ();
+
if (cfg->exception_type == MONO_EXCEPTION_GENERIC_SHARING_FAILED) {
if (acfg->aot_opts.print_skipped_methods)
printf ("Skip (gshared failure): %s (%s)\n", mono_method_full_name (method, TRUE), cfg->exception_message);
mono_destroy_compile (cfg);
return;
}
+ cfg->method_index = index;
/* Nullify patches which need no aot processing */
for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
#endif
}
+int
+mono_aot_get_method_index (MonoMethod *method)
+{
+ g_assert (llvm_acfg);
+ return get_method_index (llvm_acfg, method);
+}
+
MonoJumpInfo*
mono_aot_patch_info_dup (MonoJumpInfo* ji)
{
if (acfg->aot_opts.mtriple)
g_string_append_printf (acfg->llc_args, " -mtriple=%s", acfg->aot_opts.mtriple);
+#if defined(TARGET_MACH) && defined(TARGET_ARM)
+ /* ios requires PIC code now */
+ g_string_append_printf (acfg->llc_args, " -relocation-model=pic");
+#else
if (llvm_acfg->aot_opts.static_link)
g_string_append_printf (acfg->llc_args, " -relocation-model=static");
else
g_string_append_printf (acfg->llc_args, " -relocation-model=pic");
+#endif
unlink (acfg->tmpfname);
command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o %s %s.opt.bc", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpfname);
emit_alignment (acfg, AOT_FUNC_ALIGNMENT);
#endif
- if (acfg->thumb_mixed && cfg->compile_llvm)
+ if (acfg->thumb_mixed && cfg->compile_llvm) {
+ emit_set_thumb_mode (acfg);
fprintf (acfg->fp, "\n.thumb_func\n");
+ }
emit_label (acfg, symbol);
arch_emit_unbox_trampoline (acfg, cfg, cfg->orig_method, cfg->asm_symbol);
+
+ if (acfg->thumb_mixed && cfg->compile_llvm) {
+ emit_set_arm_mode (acfg);
+ }
}
if (cfg->compile_llvm)
emit_alignment (acfg, 8);
emit_label (acfg, symbol);
emit_local_symbol (acfg, symbol, "method_addresses_end", TRUE);
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
if (acfg->need_no_dead_strip)
fprintf (acfg->fp, " .no_dead_strip %s\n", symbol);
emit_int32 (acfg, index);
if (acfg->direct_method_addresses) {
- img_writer_emit_unset_mode (acfg->w);
+ emit_unset_mode (acfg);
if (acfg->thumb_mixed && cfg->compile_llvm)
fprintf (acfg->fp, "\n\tblx %s\n", symbol);
else
memset (&t, 0, sizeof (MonoType));
t.type = MONO_TYPE_R8;
mono_type_size (&t, &align);
-
emit_int32 (acfg, align);
memset (&t, 0, sizeof (MonoType));
method = mono_get_method (acfg->image, token, NULL);
if (!method)
continue;
+ /*
+ if (strcmp (method->name, "gshared2"))
+ continue;
+ */
+ /*
+ if (!strstr (method->klass->image->name, "mini"))
+ continue;
+ */
if (method->is_generic || method->klass->generic_container) {
MonoMethod *gshared;
int i, res;
MonoAotCompile *acfg;
char *outfile_name, *tmp_outfile_name, *p;
+ char llvm_stats_msg [256];
TV_DECLARE (atv);
TV_DECLARE (btv);
acfg->method_index = 1;
+ // FIXME:
+ /*
if (acfg->aot_opts.full_aot)
mono_set_partial_sharing_supported (TRUE);
+ */
collect_methods (acfg);
}
}
+ if (acfg->aot_opts.dwarf_debug && acfg->aot_opts.asm_only && acfg->aot_opts.gnu_asm) {
+ /*
+ * CLANG supports GAS .file/.loc directives, so emit line number information this way
+ */
+ acfg->gas_line_numbers = TRUE;
+ }
+
if (!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) {
if (acfg->aot_opts.dwarf_debug && mono_debug_format == MONO_DEBUG_FORMAT_NONE) {
fprintf (stderr, "The dwarf AOT option requires the --debug option.\n");
return 1;
}
- acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE);
+ acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE, !acfg->gas_line_numbers);
}
img_writer_emit_start (acfg->w);
if (acfg->llvm)
g_assert (acfg->got_offset <= acfg->final_got_size);
+ if (acfg->llvm)
+ sprintf (llvm_stats_msg, ", LLVM: %d (%d%%)", acfg->stats.llvm_count, acfg->stats.mcount ? (acfg->stats.llvm_count * 100) / acfg->stats.mcount : 100);
+ else
+ strcpy (llvm_stats_msg, "");
printf ("Code: %d Info: %d Ex Info: %d Unwind Info: %d Class Info: %d PLT: %d GOT Info: %d GOT: %d Offsets: %d\n", acfg->stats.code_size, acfg->stats.info_size, acfg->stats.ex_info_size, acfg->stats.unwind_info_size, acfg->stats.class_info_size, acfg->plt_offset, acfg->stats.got_info_size, (int)(acfg->got_offset * sizeof (gpointer)), acfg->stats.offsets_size);
- printf ("Compiled: %d/%d (%d%%), No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n",
+ printf ("Compiled: %d/%d (%d%%)%s, No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n",
acfg->stats.ccount, acfg->stats.mcount, acfg->stats.mcount ? (acfg->stats.ccount * 100) / acfg->stats.mcount : 100,
+ llvm_stats_msg,
acfg->stats.methods_without_got_slots, acfg->stats.mcount ? (acfg->stats.methods_without_got_slots * 100) / acfg->stats.mcount : 100,
acfg->stats.direct_calls, acfg->stats.all_calls ? (acfg->stats.direct_calls * 100) / acfg->stats.all_calls : 100);
if (acfg->stats.genericcount)
printf ("%d methods contain lmf pointers (%d%%)\n", acfg->stats.lmfcount, acfg->stats.mcount ? (acfg->stats.lmfcount * 100) / acfg->stats.mcount : 100);
if (acfg->stats.ocount)
printf ("%d methods have other problems (%d%%)\n", acfg->stats.ocount, acfg->stats.mcount ? (acfg->stats.ocount * 100) / acfg->stats.mcount : 100);
- if (acfg->llvm)
- printf ("Methods compiled with LLVM: %d (%d%%)\n", acfg->stats.llvm_count, acfg->stats.mcount ? (acfg->stats.llvm_count * 100) / acfg->stats.mcount : 100);
TV_GETTIME (atv);
res = img_writer_emit_writeout (acfg->w);
int i, version;
guint8 *blob;
gboolean do_load_image = TRUE;
+ int align_double, align_int64;
if (mono_compile_aot)
return;
return;
}
+#if defined (TARGET_ARM) && defined (TARGET_MACH)
+ {
+ MonoType t;
+ int align = 0;
+
+ memset (&t, 0, sizeof (MonoType));
+ t.type = MONO_TYPE_R8;
+ mono_type_size (&t, &align);
+ align_double = align;
+
+ memset (&t, 0, sizeof (MonoType));
+ t.type = MONO_TYPE_I8;
+ align_int64 = align;
+ }
+#else
+ align_double = __alignof__ (double);
+ align_int64 = __alignof__ (gint64);
+#endif
+
/* Sanity check */
- g_assert (info->double_align == __alignof__ (double));
- g_assert (info->long_align == __alignof__ (gint64));
+ g_assert (info->double_align == align_double);
+ g_assert (info->long_align == align_int64);
blob = info->blob;
/* Header */
version = *p;
- g_assert (version == 1 || version == 2);
+ g_assert (version == 3);
+ p ++;
+ func_encoding = *p;
p ++;
- if (version == 2) {
- func_encoding = *p;
- p ++;
- } else {
- func_encoding = DW_EH_PE_pcrel;
- }
p = ALIGN_PTR_TO (p, 4);
fde_count = *(guint32*)p;
cie = p + ((fde_count + 1) * 8);
/* Binary search in the table to find the entry for code */
- if (func_encoding == DW_EH_PE_absptr) {
- /*
- * Table entries are encoded as DW_EH_PE_absptr, because the ios linker can move functions inside object files to make thumb work,
- * so the offsets between two symbols in the text segment are not assembler constant.
- */
- g_assert (sizeof(gpointer) == 4);
- offset = GPOINTER_TO_INT (code);
- } else {
- /* Table entries are encoded as DW_EH_PE_pcrel relative to mono_eh_frame */
- offset = code - amodule->mono_eh_frame;
- }
-
+ offset = code - amodule->code;
left = 0;
right = fde_count;
while (TRUE) {
pos = (left + right) / 2;
- offset1 = table [(pos * 2)];
+ /* The table contains method index/fde offset pairs */
+ g_assert (table [(pos * 2)] != -1);
+ offset1 = amodule->code_offsets [table [(pos * 2)]];
if (pos + 1 == fde_count) {
- if (func_encoding == DW_EH_PE_absptr)
- offset2 = GPOINTER_TO_INT (amodule->code_end);
- else
- offset2 = amodule->code_end - amodule->code;
+ offset2 = amodule->code_end - amodule->code;
} else {
- offset2 = table [(pos + 1) * 2];
+ g_assert (table [(pos + 1) * 2] != -1);
+ offset2 = amodule->code_offsets [table [(pos + 1) * 2]];
}
if (offset < offset1)
break;
}
- if (func_encoding == DW_EH_PE_absptr) {
- code_start = (gpointer)(gsize)table [(pos * 2)];
- code_end = (gpointer)(gsize)table [(pos * 2) + 2];
- } else {
- code_start = amodule->mono_eh_frame + table [(pos * 2)];
- /* This won't overflow because there is +1 entry in the table */
- code_end = amodule->mono_eh_frame + table [(pos * 2) + 2];
- }
+ code_start = amodule->code + amodule->code_offsets [table [(pos * 2)]];
+ if (pos + 1 == fde_count)
+ /* End of table */
+ code_end = amodule->code_end;
+ else
+ code_end = amodule->code + amodule->code_offsets [table [(pos + 1) * 2]];
code_len = code_end - code_start;
g_assert (code >= code_start && code < code_end);
case MONO_PATCH_INFO_SIGNATURE:
ji->data.target = decode_signature (aot_module, p, &p);
break;
+ case MONO_PATCH_INFO_TLS_OFFSET:
+ ji->data.target = GINT_TO_POINTER (decode_value (p, &p));
+ break;
case MONO_PATCH_INFO_GSHAREDVT_CALL: {
MonoJumpInfoGSharedVtCall *info = g_new0 (MonoJumpInfoGSharedVtCall, 1);
info->sig = decode_signature (aot_module, p, &p);
ji->data.target = info;
break;
}
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+ MonoGSharedVtMethodInfo *info = g_new0 (MonoGSharedVtMethodInfo, 1);
+ int i, nentries;
+
+ info->method = decode_resolve_method_ref (aot_module, p, &p);
+ g_assert (info->method);
+ nentries = decode_value (p, &p);
+ info->entries = g_ptr_array_new ();
+ for (i = 0; i < nentries; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *template = g_new0 (MonoRuntimeGenericContextInfoTemplate, 1);
+
+ template->info_type = decode_value (p, &p);
+ switch (mini_rgctx_info_type_to_patch_info_type (template->info_type)) {
+ case MONO_PATCH_INFO_CLASS: {
+ MonoClass *klass = decode_klass_ref (aot_module, p, &p);
+ if (!klass)
+ goto cleanup;
+ template->data = &klass->byval_arg;
+ break;
+ }
+ case MONO_PATCH_INFO_FIELD:
+ template->data = decode_field_info (aot_module, p, &p);
+ if (!template->data)
+ goto cleanup;
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ g_ptr_array_add (info->entries, template);
+ }
+ ji->data.target = info;
+ break;
+ }
default:
g_warning ("unhandled type %d", ji->type);
g_assert_not_reached ();
g_assert (klass->inited);
/* Find method index */
+ method_index = 0xffffff;
if (method->is_inflated && !method->wrapper_type && mono_method_is_generic_sharable_full (method, FALSE, FALSE, FALSE)) {
/*
* For generic methods, we store the fully shared instance in place of the
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class ArrayTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_10_create () {
int[] a = new int [10];
return 0;
}
- private Int32[] m_array = new int [10];
-
- void setBit (int bitIndex, bool value) {
- int index = bitIndex/32;
- int shift = bitIndex%32;
+ class BitClass {
+ private Int32[] m_array = new int [10];
- Int32 theBit = 1 << shift;
- if (value)
- m_array[index] |= theBit;
- else
- m_array[index] &= ~theBit;
- }
-
- bool getBit (int bitIndex) {
- int index = bitIndex/32;
- int shift = bitIndex%32;
+ public void setBit (int bitIndex, bool value) {
+ int index = bitIndex/32;
+ int shift = bitIndex%32;
- Int32 theBit = m_array[index] & (1 << shift);
- return (theBit == 0) ? false : true;
+ Int32 theBit = 1 << shift;
+ if (value)
+ m_array[index] |= theBit;
+ else
+ m_array[index] &= ~theBit;
+ }
+
+ public bool getBit (int bitIndex) {
+ int index = bitIndex/32;
+ int shift = bitIndex%32;
+ Int32 theBit = m_array[index] & (1 << shift);
+ return (theBit == 0) ? false : true;
+ }
}
public static int test_1_bit_index () {
- Tests t = new Tests ();
+ var t = new BitClass ();
t.setBit (0, true);
t.setBit (3, true);
if (t.getBit (1))
return y;
}
+ class RefClass {
+ }
+
public static int test_0_stelem_ref_null_opt () {
- object[] arr = new Tests [1];
+ object[] arr = new RefClass [1];
- arr [0] = new Tests ();
+ arr [0] = new RefClass ();
arr [0] = null;
return arr [0] == null ? 0 : 1;
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class CallsTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
static void dummy () {
}
/* A comparison made to same variable. */
#pragma warning disable 1718
-class Tests {
-
+#if MOBILE
+class FloatTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_beq () {
double a = 2.0;
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class LongTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_10_simple_cast () {
long a = 10;
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class MathTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_sin_precision () {
double d1 = Math.Sin (1);
* the IL code looks.
*/
-class Tests {
-
+#if MOBILE
+class BasicTests
+#else
+class Tests
+#endif
+{
+
+#if !MOBILE
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_0_return () {
return 0;
amd64_set_xmmreg_r8: dest:f src1:f len:14 clob:m
amd64_save_sp_to_lmf: len:16
tls_get: dest:i len:16
+tls_get_reg: dest:i src1:i len:20
atomic_add_i4: src1:b src2:i dest:i len:32
atomic_add_new_i4: src1:b src2:i dest:i len:32
atomic_exchange_i4: src1:b src2:i dest:a len:32
sext_i1: dest:i src1:y len:3
sext_i2: dest:i src1:y len:3
tls_get: dest:i len:20
+tls_get_reg: dest:i src1:i len:20
atomic_add_i4: src1:b src2:i dest:i len:16
atomic_add_new_i4: src1:b src2:i dest:i len:16
atomic_exchange_i4: src1:b src2:i dest:a len:24
var->index = inst->dreg | MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER;
else if (inst->flags & MONO_INST_IS_DEAD)
var->index = MONO_DEBUG_VAR_ADDRESS_MODE_DEAD;
- else {
+ else if (inst->opcode == OP_REGOFFSET) {
/* the debug interface needs fixing to allow 0(%base) address */
var->index = inst->inst_basereg | MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET;
var->offset = inst->inst_offset;
+ } else if (inst->opcode == OP_GSHAREDVT_ARG_REGOFFSET) {
+ var->index = inst->inst_basereg | MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR;
+ var->offset = inst->inst_offset;
+ } else if (inst->opcode == OP_GSHAREDVT_LOCAL) {
+ var->index = inst->inst_imm | MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL;
+ } else {
+ g_assert_not_reached ();
}
}
for (i = 0; i < jit->num_params; i++)
write_variable (cfg->args [i + sig->hasthis], &jit->params [i]);
+ if (cfg->gsharedvt_info_var) {
+ jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+ jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+ write_variable (cfg->gsharedvt_info_var, jit->gsharedvt_info_var);
+ write_variable (cfg->gsharedvt_locals_var, jit->gsharedvt_locals_var);
+ }
+
jit->num_line_numbers = info->line_numbers->len;
jit->line_numbers = g_new0 (MonoDebugLineNumberEntry, jit->num_line_numbers);
case MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER:
break;
case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
+ case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
encode_value (var->offset, p, &p);
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
break;
default:
for (i = 0; i < jit->num_locals; i++)
serialize_variable (&jit->locals [i], p, &p);
+ if (jit->gsharedvt_info_var) {
+ encode_value (1, p, &p);
+ serialize_variable (jit->gsharedvt_info_var, p, &p);
+ serialize_variable (jit->gsharedvt_locals_var, p, &p);
+ } else {
+ encode_value (0, p, &p);
+ }
+
encode_value (jit->num_line_numbers, p, &p);
prev_offset = 0;
case MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER:
break;
case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
+ case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
var->offset = decode_value (p, &p);
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
break;
default:
for (i = 0; i < jit->num_locals; i++)
deserialize_variable (&jit->locals [i], p, &p);
+ if (decode_value (p, &p)) {
+ jit->gsharedvt_info_var = g_new0 (MonoDebugVarInfo, 1);
+ jit->gsharedvt_locals_var = g_new0 (MonoDebugVarInfo, 1);
+ deserialize_variable (jit->gsharedvt_info_var, p, &p);
+ deserialize_variable (jit->gsharedvt_locals_var, p, &p);
+ }
+
jit->num_line_numbers = decode_value (p, &p);
jit->line_numbers = g_new0 (MonoDebugLineNumberEntry, jit->num_line_numbers);
case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET:
g_print ("%s %s (%d) in memory: base register %s + %d\n", type, name, idx, mono_arch_regname (info->index & (~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS)), info->offset);
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+ g_print ("%s %s (%d) in indir memory: base register %s + %d\n", type, name, idx, mono_arch_regname (info->index & (~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS)), info->offset);
+ break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL:
+ g_print ("%s %s (%d) gsharedvt local.\n", type, name, idx);
+ break;
case MONO_DEBUG_VAR_ADDRESS_MODE_TWO_REGISTERS:
default:
g_assert_not_reached ();
#include <mono/metadata/assembly.h>
#include <mono/metadata/runtime.h>
#include <mono/metadata/threadpool.h>
+#include <mono/metadata/verify-internals.h>
#include <mono/utils/mono-semaphore.h>
#include <mono/utils/mono-error-internals.h>
#include <mono/utils/mono-stack-unwinding.h>
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
-#define MINOR_VERSION 23
+#define MINOR_VERSION 24
typedef enum {
CMD_SET_VM = 1,
CMD_METHOD_GET_BODY = 7,
CMD_METHOD_RESOLVE_TOKEN = 8,
CMD_METHOD_GET_CATTRS = 9,
+ CMD_METHOD_MAKE_GENERIC_METHOD = 10
} CmdMethod;
typedef enum {
GSList *l;
MonoDomain *domain = mono_domain_get ();
MonoThread *thread = NULL;
+ MonoObject *keepalive_obj = NULL;
gboolean send_success = FALSE;
static int ecount;
int nevents;
case EVENT_KIND_EXCEPTION: {
EventInfo *ei = arg;
buffer_add_objid (&buf, ei->exc);
+ /*
+ * We are not yet suspending, so get_objref () will not keep this object alive. So we need to do it
+ * later after the suspension. (#12494).
+ */
+ keepalive_obj = ei->exc;
break;
}
case EVENT_KIND_USER_BREAK:
*/
save_thread_context (ctx);
suspend_vm ();
+
+ if (keepalive_obj)
+ /* This will keep this object alive */
+ get_objref (keepalive_obj);
}
send_success = send_packet (CMD_SET_EVENT, CMD_COMPOSITE, &buf);
if (val == 0)
mono_arch_stop_single_stepping ();
+ if (ss_req != NULL)
+ ss_invoke_addr = NULL;
#else
g_assert_not_reached ();
#endif
}
static void
-add_var (Buffer *buf, MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domain, gboolean as_vtype)
+add_var (Buffer *buf, MonoDebugMethodJitInfo *jit, MonoType *t, MonoDebugVarInfo *var, MonoContext *ctx, MonoDomain *domain, gboolean as_vtype)
{
guint32 flags;
int reg;
- guint8 *addr;
+ guint8 *addr, *gaddr;
mgreg_t reg_val;
flags = var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
NOT_IMPLEMENTED;
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+ /* Same as regoffset, but with an indirection */
+ addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ addr += (gint32)var->offset;
+
+ gaddr = *(gpointer*)addr;
+ g_assert (gaddr);
+ buffer_add_value_full (buf, t, gaddr, domain, as_vtype);
+ break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_GSHAREDVT_LOCAL: {
+ MonoDebugVarInfo *info_var = jit->gsharedvt_info_var;
+ MonoDebugVarInfo *locals_var = jit->gsharedvt_locals_var;
+ MonoGSharedVtMethodRuntimeInfo *info;
+ guint8 *locals;
+ int idx;
+
+ idx = reg;
+
+ g_assert (info_var);
+ g_assert (locals_var);
+
+ flags = info_var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+ reg = info_var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+ if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET) {
+ addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ addr += (gint32)info_var->offset;
+ info = *(gpointer*)addr;
+ } else if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER) {
+ info = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ } else {
+ g_assert_not_reached ();
+ }
+ g_assert (info);
+
+ flags = locals_var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+ reg = locals_var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
+ if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET) {
+ addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ addr += (gint32)locals_var->offset;
+ locals = *(gpointer*)addr;
+ } else if (flags == MONO_DEBUG_VAR_ADDRESS_MODE_REGISTER) {
+ locals = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ } else {
+ g_assert_not_reached ();
+ }
+ g_assert (locals);
+
+ addr = locals + GPOINTER_TO_INT (info->entries [idx]);
+
+ buffer_add_value_full (buf, t, addr, domain, as_vtype);
+ break;
+ }
+
default:
g_assert_not_reached ();
}
{
guint32 flags;
int reg, size;
- guint8 *addr;
+ guint8 *addr, *gaddr;
flags = var->index & MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
reg = var->index & ~MONO_DEBUG_VAR_ADDRESS_MODE_FLAGS;
// FIXME: Write barriers
mono_gc_memmove (addr, val, size);
break;
+ case MONO_DEBUG_VAR_ADDRESS_MODE_REGOFFSET_INDIR:
+ /* Same as regoffset, but with an indirection */
+ addr = (gpointer)mono_arch_context_get_int_reg (ctx, reg);
+ addr += (gint32)var->offset;
+
+ gaddr = *(gpointer*)addr;
+ g_assert (gaddr);
+ // FIXME: Write barriers
+ mono_gc_memmove (gaddr, val, size);
+ break;
case MONO_DEBUG_VAR_ADDRESS_MODE_DEAD:
NOT_IMPLEMENTED;
break;
while (suspend_count > 0)
resume_vm ();
- mono_runtime_shutdown ();
+ if (!mono_runtime_try_shutdown ())
+ break;
/* Suspend all managed threads since the runtime is going away */
DEBUG(1, fprintf (log_file, "Suspending all threads...\n"));
buffer_add_cattrs (buf, domain, method->klass->image, attr_klass, cinfo);
break;
}
+ case CMD_METHOD_MAKE_GENERIC_METHOD: {
+ MonoType **type_argv;
+ int i, type_argc;
+ MonoDomain *d;
+ MonoClass *klass;
+ MonoGenericInst *ginst;
+ MonoGenericContext tmp_context;
+ MonoMethod *inflated;
+
+ type_argc = decode_int (p, &p, end);
+ type_argv = g_new0 (MonoType*, type_argc);
+ for (i = 0; i < type_argc; ++i) {
+ klass = decode_typeid (p, &p, end, &d, &err);
+ if (err) {
+ g_free (type_argv);
+ return err;
+ }
+ if (domain != d) {
+ g_free (type_argv);
+ return ERR_INVALID_ARGUMENT;
+ }
+ type_argv [i] = &klass->byval_arg;
+ }
+ ginst = mono_metadata_get_generic_inst (type_argc, type_argv);
+ g_free (type_argv);
+ tmp_context.class_inst = method->klass->generic_class ? method->klass->generic_class->context.class_inst : NULL;
+ tmp_context.method_inst = ginst;
+
+ inflated = mono_class_inflate_generic_method (method, &tmp_context);
+ if (!mono_verifier_is_method_valid_generic_instantiation (inflated))
+ return ERR_INVALID_ARGUMENT;
+ buffer_add_methodid (buf, domain, inflated);
+ break;
+ }
default:
return ERR_NOT_IMPLEMENTED;
}
frame = tls->frames [frame_idx];
if (!frame->has_ctx)
- // FIXME:
- return ERR_INVALID_FRAMEID;
+ return ERR_ABSENT_INFORMATION;
if (!frame->jit) {
frame->jit = mono_debug_find_method (frame->api_method, frame->domain);
var = &jit->params [pos];
- add_var (buf, sig->params [pos], &jit->params [pos], &frame->ctx, frame->domain, FALSE);
+ add_var (buf, jit, sig->params [pos], &jit->params [pos], &frame->ctx, frame->domain, FALSE);
} else {
g_assert (pos >= 0 && pos < jit->num_locals);
var = &jit->locals [pos];
- add_var (buf, header->locals [pos], &jit->locals [pos], &frame->ctx, frame->domain, FALSE);
+ add_var (buf, jit, header->locals [pos], &jit->locals [pos], &frame->ctx, frame->domain, FALSE);
}
}
mono_metadata_free_mh (header);
MonoObject *p = NULL;
buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &p, frame->domain);
} else {
- add_var (buf, &frame->actual_method->klass->this_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
+ add_var (buf, jit, &frame->actual_method->klass->this_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
}
} else {
if (!sig->hasthis) {
MonoObject *p = NULL;
buffer_add_value (buf, &frame->actual_method->klass->byval_arg, &p, frame->domain);
} else {
- add_var (buf, &frame->api_method->klass->byval_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
+ add_var (buf, jit, &frame->api_method->klass->byval_arg, jit->this_var, &frame->ctx, frame->domain, TRUE);
}
}
break;
g_free (data);
buffer_free (&buf);
- if (command_set == CMD_SET_VM && command == CMD_VM_DISPOSE)
+ if (command_set == CMD_SET_VM && (command == CMD_VM_DISPOSE || command == CMD_VM_EXIT))
break;
}
}
#endif
}
-
+
+static void
+switch_gc (char* argv[], const char* target_gc)
+{
+ GString *path;
+
+ if (!strcmp (mono_gc_get_gc_name (), target_gc)) {
+ return;
+ }
+
+ path = g_string_new (argv [0]);
+
+ /*Running mono without any argument*/
+ if (strstr (argv [0], "-sgen"))
+ g_string_truncate (path, path->len - 5);
+ else if (strstr (argv [0], "-boehm"))
+ g_string_truncate (path, path->len - 6);
+
+ g_string_append_c (path, '-');
+ g_string_append (path, target_gc);
+
+#ifdef HAVE_EXECVP
+ execvp (path->str, argv);
+#else
+ fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
+#endif
+}
/**
* mono_main:
} else if (strncmp (argv [i], "-O=", 3) == 0) {
opt = parse_optimizations (argv [i] + 3);
} else if (strcmp (argv [i], "--gc=sgen") == 0) {
- if (!strcmp (mono_gc_get_gc_name (), "boehm")) {
- GString *path = g_string_new (argv [0]);
- g_string_append (path, "-sgen");
- argv [0] = path->str;
-#ifdef HAVE_EXECVP
- execvp (path->str, argv);
-#else
- fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
-#endif
- }
+ switch_gc (argv, "sgen");
} else if (strcmp (argv [i], "--gc=boehm") == 0) {
- if (!strcmp (mono_gc_get_gc_name (), "sgen")) {
- char *copy = g_strdup (argv [0]);
- char *p = strstr (copy, "-sgen");
- if (p == NULL){
- fprintf (stderr, "Error, this process is not named mono-sgen and the command line option --boehm was passed");
- exit (1);
- }
- *p = 0;
- argv [0] = p;
-#ifdef HAVE_EXECVP
- execvp (p, argv);
-#else
- fprintf (stderr, "Error: --gc=<NAME> option not supported on this platform.\n");
-#endif
- }
+ switch_gc (argv, "boehm");
} else if (strcmp (argv [i], "--config") == 0) {
if (i +1 >= argc){
fprintf (stderr, "error: --config requires a filename argument\n");
* debug information.
*/
MonoDwarfWriter*
-mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending)
+mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending, gboolean emit_line_numbers)
{
MonoDwarfWriter *w = g_new0 (MonoDwarfWriter, 1);
w->collect_line_info = TRUE;
}
+ if (!emit_line_numbers) {
+ w->emit_line = FALSE;
+ w->collect_line_info = FALSE;
+ }
+
w->fp = img_writer_get_fp (w->w);
w->temp_prefix = img_writer_get_temp_label_prefix (w->w);
//printf ("FIRST: %d %d %d\n", prev_line, loc->row, il_offset);
emit_sleb128 (w, (gint32)loc->row - (gint32)prev_line);
prev_line = loc->row;
+ prev_native_offset = i;
first = FALSE;
}
typedef struct _MonoDwarfWriter MonoDwarfWriter;
-MonoDwarfWriter* mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending) MONO_INTERNAL;
+MonoDwarfWriter* mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean appending, gboolean emit_line_numbers) MONO_INTERNAL;
void mono_dwarf_writer_destroy (MonoDwarfWriter *w) MONO_INTERNAL;
using System.Threading;
using System.Threading.Tasks;
-class Tests {
-
+#if MOBILE
+class GenericsTests
+#else
+class Tests
+#endif
+{
struct TestStruct {
public int i;
public int j;
}
}
+#if !MOBILE
class Enumerator <T> : MyIEnumerator <T> {
T MyIEnumerator<T>.Current {
get {
return true;
}
}
+#endif
+#if !MOBILE
static int Main (string[] args)
{
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
public static int test_1_nullable_unbox ()
{
public static int test_0_constrained_vtype_box () {
GenericClass<TestStruct> t = new GenericClass<TestStruct> ();
+#if MOBILE
+ return t.toString (new TestStruct ()) == "GenericsTests+TestStruct" ? 0 : 1;
+#else
return t.toString (new TestStruct ()) == "Tests+TestStruct" ? 0 : 1;
+#endif
}
public static int test_0_constrained_vtype () {
return 0;
}
+#if !MOBILE
public static int test_0_variance_reflection () {
// covariance on IEnumerator
if (!typeof (MyIEnumerator<object>).IsAssignableFrom (typeof (MyIEnumerator<string>)))
return 6;
return 0;
}
+#endif
public static int test_0_ldvirtftn_generic_method () {
- new Tests ().ldvirtftn<string> ();
+ new GenericsTests ().ldvirtftn<string> ();
return the_type == typeof (string) ? 0 : 1;
}
/* Test that treating arrays as generic collections works with full-aot */
public static int test_0_fullaot_array_wrappers () {
- Tests[] arr = new Tests [10];
- enumerate<Tests> (arr);
+ GenericsTests[] arr = new GenericsTests [10];
+ enumerate<GenericsTests> (arr);
return 0;
}
}
public static int test_0_full_aot_nullable_unbox_from_gshared_code () {
- if (!new Tests ().IsNull2<FooStruct> (null))
+ if (!new GenericsTests ().IsNull2<FooStruct> (null))
return 1;
- if (new Tests ().IsNull2<FooStruct> (new FooStruct ()))
+ if (new GenericsTests ().IsNull2<FooStruct> (new FooStruct ()))
return 2;
return 0;
}
public static int test_0_partial_sharing () {
if (PartialShared1 (new List<string> (), 1) != typeof (string))
return 1;
- if (PartialShared1 (new List<Tests> (), 1) != typeof (Tests))
+ if (PartialShared1 (new List<GenericsTests> (), 1) != typeof (GenericsTests))
return 2;
if (PartialShared2 (new List<string> (), 1) != typeof (int))
return 3;
- if (PartialShared2 (new List<Tests> (), 1) != typeof (int))
+ if (PartialShared2 (new List<GenericsTests> (), 1) != typeof (int))
return 4;
return 0;
}
}
#endif
}
+
+#if !MOBILE
+class GenericsTests : Tests
+{
+}
+#endif
using System.Runtime.CompilerServices;
struct Foo {
- public int i, j;
+ public int i, j, k, l, m, n;
}
struct GFoo<T> {
// FIXME: Add mixed ref/noref tests, i.e. Dictionary<string, int>
+#if MOBILE
+public class GSharedTests
+#else
public class Tests
+#endif
{
+#if !MOBILE
public static int Main (String[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
+#endif
[MethodImplAttribute (MethodImplOptions.NoInlining)]
static void gshared<T> (T [] array, int i, int j) {
}
public static int test_0_vt_unbox_any () {
+ int[] iarr = new int [16];
+ unbox_any<int> (iarr, new object [] { 12 });
+
Foo[] arr = new Foo [2];
object[] arr2 = new object [16];
var v2 = return_t<GFoo2<int>> (v);
if (v2.t != 55 || v2.t2 != 32)
return 6;
- i = new Tests ().return_this_t<int> (42);
+ i = new GSharedTests ().return_this_t<int> (42);
if (i != 42)
return 7;
return 0;
return 0;
}
+ interface IFaceKVP {
+ T do_kvp<T> (T a);
+ }
+
static KeyValuePair<T1, T2> make_kvp<T1, T2> (T1 t1, T2 t2) {
return new KeyValuePair<T1, T2> (t1, t2);
}
static T2 use_kvp<T1, T2> (KeyValuePair<T1, T2> kvp) {
return kvp.Value;
}
-
- [MethodImplAttribute (MethodImplOptions.NoInlining)]
- static T do_kvp<T> (T a) {
- var t = make_kvp (a, a);
- // argument is an instance of a vtype instantiated with gsharedvt type arguments
- return use_kvp (t);
+
+ class ClassKVP : IFaceKVP {
+ public T do_kvp<T> (T a) {
+ var t = make_kvp (a, a);
+ // argument is an instance of a vtype instantiated with gsharedvt type arguments
+ return use_kvp (t);
+ }
}
public static int test_0_gsharedvt_ginstvt_constructed_arg () {
- if (do_kvp<long> (1) != 1)
+ IFaceKVP c = new ClassKVP ();
+ if (c.do_kvp<long> (1) != 1)
return 1;
return 0;
}
return t.ToString ();
}
+ enum AnEnum {
+ One
+ };
+
public static int test_0_constrained_tostring () {
if (to_string<int, int> (1, 1) != "1")
return 1;
- if (to_string<string, int> ("A", 1) != "A")
+ if (to_string<AnEnum, int> (AnEnum.One, 1) != "One")
return 2;
+ if (to_string<string, int> ("A", 1) != "A")
+ return 3;
return 0;
}
return 1;
if (get_hash<double, int> (1.0, 1) != 1.0.GetHashCode ())
return 2;
+ if (get_hash<AnEnum, int> (AnEnum.One, 1) != AnEnum.One.GetHashCode ())
+ return 3;
if (get_hash<string, int> ("A", 1) != "A".GetHashCode ())
+ return 4;
+ return 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ static bool equals<T, T2>(T t, T2 t2) {
+ return t.Equals (t);
+ }
+
+ public static int test_0_constrained_equals () {
+ if (equals<int, int> (1, 1) != true)
+ return 1;
+ if (equals<double, int> (1.0, 1) != true)
+ return 2;
+ if (equals<AnEnum, int> (AnEnum.One, 1) != true)
return 3;
+ if (equals<string, int> ("A", 1) != true)
+ return 4;
return 0;
}
TAbstractTableItem<object>.Test ();
return 0;
}
+
+ interface IFaceBox {
+ object box<T> (T t);
+ }
+
+ class ClassBox : IFaceBox {
+ public object box<T> (T t) {
+ object o = t;
+ return o;
+ }
+ }
+
+ public static int test_0_nullable_box () {
+ IFaceBox c = new ClassBox ();
+ int i = 5;
+ object o = c.box<int?> (i);
+ if ((int)o != i)
+ return 1;
+ if (c.box<int?> (null) != null)
+ return 2;
+ long l = Int64.MaxValue - 1;
+ o = c.box<long?> (l);
+ if ((long)o != l)
+ return 3;
+ if (c.box<long?> (null) != null)
+ return 4;
+ string s = "A";
+ if (c.box<string> (s) != (object)s)
+ return 5;
+ return 0;
+ }
+
+ interface IFaceUnbox2 {
+ T unbox<T> (object o);
+ }
+
+ class ClassUnbox2 : IFaceUnbox2 {
+ public T unbox<T> (object o) {
+ return (T)o;
+ }
+ }
+
+ public static int test_0_nullable_unbox () {
+ IFaceUnbox2 c = new ClassUnbox2 ();
+ int? i = c.unbox<int?> (5);
+ if (i != 5)
+ return 1;
+ int? j = c.unbox<int?> (null);
+ if (j != null)
+ return 2;
+ return 0;
+ }
+}
+
+#if !MOBILE
+public class GSharedTests : Tests {
}
+#endif
#define NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL)
+#define NEW_TLS_OFFSETCONST(cfg,dest,key) do { \
+ if (cfg->compile_aot) { \
+ NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_TLS_OFFSET, GINT_TO_POINTER (key)); \
+ } else { \
+ int _offset = mini_get_tls_offset ((key)); \
+ NEW_PCONST ((cfg), (dest), GINT_TO_POINTER (_offset)); \
+ } \
+ } while (0)
+
#define NEW_DECLSECCONST(cfg,dest,image,entry) do { \
if (cfg->compile_aot) { \
NEW_AOTCONST_TOKEN (cfg, dest, MONO_PATCH_INFO_DECLSEC, image, (entry).index, NULL, STACK_OBJ, NULL); \
#define DECOMPOSE_INTO_REGPAIR(stack_type) ((stack_type) == STACK_I8)
#endif
+static inline void
+handle_gsharedvt_ldaddr (MonoCompile *cfg)
+{
+ /* The decomposition of ldaddr makes use of these two variables, so add uses for them */
+ MonoInst *use;
+
+ MONO_INST_NEW (cfg, use, OP_DUMMY_USE);
+ use->sreg1 = cfg->gsharedvt_info_var->dreg;
+ MONO_ADD_INS (cfg->cbb, use);
+ MONO_INST_NEW (cfg, use, OP_DUMMY_USE);
+ use->sreg1 = cfg->gsharedvt_locals_var->dreg;
+ MONO_ADD_INS (cfg->cbb, use);
+}
+
#define NEW_VARLOADA(cfg,dest,var,vartype) do { \
MONO_INST_NEW ((cfg), (dest), OP_LDADDR); \
(dest)->inst_p0 = (var); \
(dest)->type = STACK_MP; \
(dest)->klass = (var)->klass; \
(dest)->dreg = alloc_dreg ((cfg), STACK_MP); \
+ if (G_UNLIKELY (cfg->gsharedvt) && mini_is_gsharedvt_variable_type ((cfg), (var)->inst_vtype)) { handle_gsharedvt_ldaddr ((cfg)); } \
if (SIZEOF_REGISTER == 4 && DECOMPOSE_INTO_REGPAIR ((var)->type)) { MonoInst *var1 = get_vreg_to_inst (cfg, (var)->dreg + 1); MonoInst *var2 = get_vreg_to_inst (cfg, (var)->dreg + 2); g_assert (var1); g_assert (var2); var1->flags |= MONO_INST_INDIRECT; var2->flags |= MONO_INST_INDIRECT; } \
} while (0)
#define EMIT_NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+#define EMIT_NEW_TLS_OFFSETCONST(cfg,dest,key) do { NEW_TLS_OFFSETCONST ((cfg), (dest), (key)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+
#define EMIT_NEW_DOMAINCONST(cfg,dest) do { NEW_DOMAINCONST ((cfg), (dest)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
#define EMIT_NEW_DECLSECCONST(cfg,dest,image,entry) do { NEW_DECLSECCONST ((cfg), (dest), (image), (entry)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
return mono_compile_method (m);
}
-MonoObject*
-mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
+static MonoMethod*
+constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg)
{
MonoMethod *m;
int vt_slot;
- gpointer this_arg;
/* Lookup the virtual method */
mono_class_setup_vtable (klass);
g_assert (klass->vtable);
vt_slot = mono_method_get_vtable_slot (cmethod);
m = klass->vtable [vt_slot];
- if (klass->valuetype)
- this_arg = mp;
+ if (klass->valuetype && (m->klass == mono_defaults.object_class || m->klass == mono_defaults.enum_class->parent || m->klass == mono_defaults.enum_class))
+ /*
+ * Calling a non-vtype method with a vtype receiver, has to box.
+ */
+ *this_arg = mono_value_box (mono_domain_get (), klass, mp);
+ else if (klass->valuetype)
+ /*
+ * Calling a vtype method with a vtype receiver
+ */
+ *this_arg = mp;
else
- this_arg = *(gpointer*)mp;
+ /*
+ * Calling a non-vtype method
+ */
+ *this_arg = *(gpointer*)mp;
+ return m;
+}
+
+MonoObject*
+mono_object_tostring_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
+{
+ MonoMethod *m;
+ gpointer this_arg;
+
+ m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
return mono_runtime_invoke (m, this_arg, NULL, NULL);
}
mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass)
{
MonoMethod *m;
- int vt_slot;
gpointer this_arg;
MonoObject *res;
gpointer p;
- /* Lookup the virtual method */
- mono_class_setup_vtable (klass);
- g_assert (klass->vtable);
- vt_slot = mono_method_get_vtable_slot (cmethod);
- m = klass->vtable [vt_slot];
- if (klass->valuetype)
- this_arg = mp;
- else
- this_arg = *(gpointer*)mp;
+ m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
// FIXME: This boxes the result
res = mono_runtime_invoke (m, this_arg, NULL, NULL);
p = mono_object_unbox (res);
return *(int*)p;
}
+MonoBoolean
+mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg)
+{
+ MonoMethod *m;
+ gpointer this_arg;
+ MonoObject *res;
+ gpointer p;
+ void **args;
+
+ m = constrained_gsharedvt_call_setup (mp, cmethod, klass, &this_arg);
+ // FIXME: This boxes the result
+ args = (void**)&arg;
+ res = mono_runtime_invoke (m, this_arg, args, NULL);
+ p = mono_object_unbox (res);
+ return *(MonoBoolean*)p;
+}
+
+void
+mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass)
+{
+ if (klass->valuetype)
+ mono_value_copy (dest, src, klass);
+ else
+ mono_gc_wbarrier_generic_store (dest, *(MonoObject**)src);
+}
int mono_object_gethashcode_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass) MONO_INTERNAL;
+MonoBoolean mono_object_equals_gsharedvt (gpointer mp, MonoMethod *cmethod, MonoClass *klass, MonoObject *arg) MONO_INTERNAL;
+
+void mono_gsharedvt_value_copy (gpointer dest, gpointer src, MonoClass *klass) MONO_INTERNAL;
+
#endif /* __MONO_JIT_ICALLS_H__ */
--- /dev/null
+
+#include "buildver-sgen.h"
+#define BUILDVER_INCLUDED
+
+#include "main.c"
#include <config.h>
#include "mini.h"
#ifndef HOST_WIN32
-#ifdef HAVE_SGEN_GC
-#include "buildver-sgen.h"
-#else
-#include "buildver.h"
+#ifndef BUILDVER_INCLUDED
+#include "buildver-boehm.h"
#endif
#endif
case MONO_TYPE_GENERICINST:
type = &type->data.generic_class->container_class->byval_arg;
goto handle_enum;
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ /* gsharedvt */
+ return calli? OP_VCALL_REG: virt? OP_VCALLVIRT: OP_VCALL;
default:
g_error ("unknown type 0x%02x in ret_type_to_call_opcode", type->type);
}
case MONO_TYPE_GENERICINST:
simple_type = &simple_type->data.generic_class->container_class->byval_arg;
goto handle_enum;
-
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ /* gsharedvt */
+ if (args [i]->type != STACK_VTYPE)
+ return 1;
+ continue;
default:
g_error ("unknown type 0x%02x in check_call_signature",
simple_type->type);
return 0;
}
+/*
+ * check_method_sharing:
+ *
+ * Check whenever the vtable or an mrgctx needs to be passed when calling CMETHOD.
+ */
+static void
+check_method_sharing (MonoCompile *cfg, MonoMethod *cmethod, gboolean *out_pass_vtable, gboolean *out_pass_mrgctx)
+{
+ gboolean pass_vtable = FALSE;
+ gboolean pass_mrgctx = FALSE;
+
+ if (((cmethod->flags & METHOD_ATTRIBUTE_STATIC) || cmethod->klass->valuetype) &&
+ (cmethod->klass->generic_class || cmethod->klass->generic_container)) {
+ gboolean sharable = FALSE;
+
+ if (mono_method_is_generic_sharable (cmethod, TRUE)) {
+ sharable = TRUE;
+ } else {
+ gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
+ MonoGenericContext *context = mini_class_get_context (cmethod->klass);
+ gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
+
+ sharable = sharing_enabled && context_sharable;
+ }
+
+ /*
+ * Pass vtable iff target method might
+ * be shared, which means that sharing
+ * is enabled for its class and its
+ * context is sharable (and it's not a
+ * generic method).
+ */
+ if (sharable && !(mini_method_get_context (cmethod) && mini_method_get_context (cmethod)->method_inst))
+ pass_vtable = TRUE;
+ }
+
+ if (mini_method_get_context (cmethod) &&
+ mini_method_get_context (cmethod)->method_inst) {
+ g_assert (!pass_vtable);
+
+ if (mono_method_is_generic_sharable (cmethod, TRUE)) {
+ pass_mrgctx = TRUE;
+ } else {
+ gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
+ MonoGenericContext *context = mini_method_get_context (cmethod);
+ gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
+
+ if (sharing_enabled && context_sharable)
+ pass_mrgctx = TRUE;
+ if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, mono_method_signature (cmethod)))
+ pass_mrgctx = TRUE;
+ }
+ }
+
+ if (out_pass_vtable)
+ *out_pass_vtable = pass_vtable;
+ if (out_pass_mrgctx)
+ *out_pass_mrgctx = pass_mrgctx;
+}
+
inline static MonoCallInst *
mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig,
MonoInst **args, int calli, int virtual, int tail, int rgctx, int unbox_trampoline)
return (MonoInst*)call;
}
+static MonoInst*
+emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfoType rgctx_type);
+
static MonoInst*
emit_get_rgctx_method (MonoCompile *cfg, int context_used, MonoMethod *cmethod, MonoRgctxInfoType rgctx_type);
static MonoInst*
emit_get_rgctx_klass (MonoCompile *cfg, int context_used, MonoClass *klass, MonoRgctxInfoType rgctx_type);
static MonoInst*
-mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSignature *sig,
+mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSignature *sig, gboolean tail,
MonoInst **args, MonoInst *this, MonoInst *imt_arg, MonoInst *rgctx_arg)
{
#ifndef DISABLE_REMOTING
int rgctx_reg = 0;
gboolean need_unbox_trampoline;
+ if (!sig)
+ sig = mono_method_signature (method);
+
if (rgctx_arg) {
rgctx_reg = mono_alloc_preg (cfg);
MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, rgctx_reg, rgctx_arg->dreg);
need_unbox_trampoline = method->klass == mono_defaults.object_class || (method->klass->flags & TYPE_ATTRIBUTE_INTERFACE);
- call = mono_emit_call_args (cfg, sig, args, FALSE, virtual, FALSE, rgctx_arg ? TRUE : FALSE, need_unbox_trampoline);
+ call = mono_emit_call_args (cfg, sig, args, FALSE, virtual, tail, rgctx_arg ? TRUE : FALSE, need_unbox_trampoline);
#ifndef DISABLE_REMOTING
if (might_be_remote)
call->method = method;
call->inst.flags |= MONO_INST_HAS_METHOD;
call->inst.inst_left = this;
+ call->tail_call = tail;
if (virtual) {
int vtable_reg, slot_reg, this_reg;
+ int offset;
this_reg = this->dreg;
-#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
- if ((method->klass->parent == mono_defaults.multicastdelegate_class) && (!strcmp (method->name, "Invoke"))) {
+ if (ARCH_HAVE_DELEGATE_TRAMPOLINES && (method->klass->parent == mono_defaults.multicastdelegate_class) && !strcmp (method->name, "Invoke")) {
MonoInst *dummy_use;
MONO_EMIT_NULL_CHECK (cfg, this_reg);
return (MonoInst*)call;
}
-#endif
if ((!cfg->compile_aot || enable_for_aot) &&
(!(method->flags & METHOD_ATTRIBUTE_VIRTUAL) ||
guint32 imt_slot = mono_method_get_imt_slot (method);
emit_imt_argument (cfg, call, call->method, imt_arg);
slot_reg = vtable_reg;
- call->inst.inst_offset = ((gint32)imt_slot - MONO_IMT_SIZE) * SIZEOF_VOID_P;
+ offset = ((gint32)imt_slot - MONO_IMT_SIZE) * SIZEOF_VOID_P;
}
#endif
if (slot_reg == -1) {
slot_reg = alloc_preg (cfg);
mini_emit_load_intf_reg_vtable (cfg, slot_reg, vtable_reg, method->klass);
- call->inst.inst_offset = mono_method_get_vtable_index (method) * SIZEOF_VOID_P;
+ offset = mono_method_get_vtable_index (method) * SIZEOF_VOID_P;
}
} else {
slot_reg = vtable_reg;
- call->inst.inst_offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
+ offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
((mono_method_get_vtable_index (method)) * (SIZEOF_VOID_P));
#ifdef MONO_ARCH_HAVE_IMT
if (imt_arg) {
}
call->inst.sreg1 = slot_reg;
+ call->inst.inst_offset = offset;
call->virtual = TRUE;
}
}
MonoInst*
mono_emit_method_call (MonoCompile *cfg, MonoMethod *method, MonoInst **args, MonoInst *this)
{
- return mono_emit_method_call_full (cfg, method, mono_method_signature (method), args, this, NULL, NULL);
+ return mono_emit_method_call_full (cfg, method, mono_method_signature (method), FALSE, args, this, NULL, NULL);
}
MonoInst*
guint32 align = 0;
MonoMethod *memcpy_method;
MonoInst *size_ins = NULL;
+ MonoInst *memcpy_ins = NULL;
g_assert (klass);
/*
if (mini_is_gsharedvt_klass (cfg, klass)) {
g_assert (!native);
context_used = mini_class_check_context_used (cfg, klass);
- size_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+ size_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+ memcpy_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_MEMCPY);
}
if (native)
}
}
- mono_emit_jit_icall (cfg, mono_value_copy, iargs);
+ if (size_ins)
+ mono_emit_jit_icall (cfg, mono_gsharedvt_value_copy, iargs);
+ else
+ mono_emit_jit_icall (cfg, mono_value_copy, iargs);
return;
}
}
EMIT_NEW_ICONST (cfg, iargs [2], n);
memcpy_method = get_memcpy_method ();
- mono_emit_method_call (cfg, memcpy_method, iargs, NULL);
+ if (memcpy_ins)
+ mono_emit_calli (cfg, mono_method_signature (memcpy_method), iargs, memcpy_ins, NULL, NULL);
+ else
+ mono_emit_method_call (cfg, memcpy_method, iargs, NULL);
}
}
guint32 align;
MonoMethod *memset_method;
MonoInst *size_ins = NULL;
+ MonoInst *bzero_ins = NULL;
+ static MonoMethod *bzero_method;
/* FIXME: Optimize this for the case when dest is an LDADDR */
mono_class_init (klass);
if (mini_is_gsharedvt_klass (cfg, klass)) {
context_used = mini_class_check_context_used (cfg, klass);
- size_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_VALUE_SIZE);
- n = -1;
- } else {
- n = mono_class_value_size (klass, &align);
+ size_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_VALUE_SIZE);
+ bzero_ins = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_BZERO);
+ if (!bzero_method)
+ bzero_method = mono_class_get_method_from_name (mono_defaults.string_class, "bzero_aligned_1", 2);
+ g_assert (bzero_method);
+ iargs [0] = dest;
+ iargs [1] = size_ins;
+ mono_emit_calli (cfg, mono_method_signature (bzero_method), iargs, bzero_ins, NULL, NULL);
+ return;
}
- if (!size_ins && n <= sizeof (gpointer) * 5) {
+ n = mono_class_value_size (klass, &align);
+
+ if (n <= sizeof (gpointer) * 5) {
mini_emit_memset (cfg, dest->dreg, 0, n, 0, align);
}
else {
memset_method = get_memset_method ();
iargs [0] = dest;
EMIT_NEW_ICONST (cfg, iargs [1], 0);
- if (size_ins)
- iargs [2] = size_ins;
- else
- EMIT_NEW_ICONST (cfg, iargs [2], n);
+ EMIT_NEW_ICONST (cfg, iargs [2], n);
mono_emit_method_call (cfg, memset_method, iargs, NULL);
}
}
return emit_rgctx_fetch (cfg, rgctx, entry);
}
+
+static MonoInst*
+emit_get_rgctx_gsharedvt_method (MonoCompile *cfg, int context_used,
+ MonoMethod *cmethod, MonoGSharedVtMethodInfo *info)
+{
+ MonoJumpInfoRgctxEntry *entry;
+ MonoInst *rgctx;
+
+ entry = mono_patch_info_rgctx_entry_new (cfg->mempool, cfg->current_method, context_used & MONO_GENERIC_CONTEXT_USED_METHOD, MONO_PATCH_INFO_GSHAREDVT_METHOD, info, MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO);
+ rgctx = emit_get_rgctx (cfg, cfg->current_method, context_used);
+
+ return emit_rgctx_fetch (cfg, rgctx, entry);
+}
+
/*
* emit_get_rgctx_method:
*
return emit_rgctx_fetch (cfg, rgctx, entry);
}
+static int
+get_gsharedvt_info_slot (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgctx_type)
+{
+ MonoGSharedVtMethodInfo *info = cfg->gsharedvt_info;
+ MonoRuntimeGenericContextInfoTemplate *template;
+ int i, idx;
+
+ g_assert (info);
+
+ for (i = 0; i < info->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (info->entries, i);
+
+ if (otemplate->info_type == rgctx_type && otemplate->data == data && rgctx_type != MONO_RGCTX_INFO_LOCAL_OFFSET)
+ return i;
+ }
+
+ template = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoRuntimeGenericContextInfoTemplate));
+ template->info_type = rgctx_type;
+ template->data = data;
+
+ idx = info->entries->len;
+
+ g_ptr_array_add (info->entries, template);
+
+ return idx;
+}
+
+/*
+ * emit_get_gsharedvt_info:
+ *
+ * This is similar to emit_get_rgctx_.., but loads the data from the gsharedvt info var instead of calling an rgctx fetch trampoline.
+ */
+static MonoInst*
+emit_get_gsharedvt_info (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgctx_type)
+{
+ MonoInst *ins;
+ int idx, dreg;
+
+ idx = get_gsharedvt_info_slot (cfg, data, rgctx_type);
+ /* Load info->entries [idx] */
+ dreg = alloc_preg (cfg);
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, cfg->gsharedvt_info_var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+
+ return ins;
+}
+
+static MonoInst*
+emit_get_gsharedvt_info_klass (MonoCompile *cfg, MonoClass *klass, MonoRgctxInfoType rgctx_type)
+{
+ return emit_get_gsharedvt_info (cfg, &klass->byval_arg, rgctx_type);
+}
+
/*
* On return the caller must check @klass for load errors.
*/
return mono_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx);
} else {
- return mono_emit_method_call (cfg, method, &val, NULL);
+ gboolean pass_vtable, pass_mrgctx;
+ MonoInst *rgctx_arg = NULL;
+
+ check_method_sharing (cfg, method, &pass_vtable, &pass_mrgctx);
+ g_assert (!pass_mrgctx);
+
+ if (pass_vtable) {
+ MonoVTable *vtable = mono_class_vtable (cfg->domain, method->klass);
+
+ g_assert (vtable);
+ EMIT_NEW_VTABLECONST (cfg, rgctx_arg, vtable);
+ }
+
+ return mono_emit_method_call_full (cfg, method, NULL, FALSE, &val, NULL, NULL, rgctx_arg);
}
}
return add;
}
+static MonoInst*
+handle_unbox_gsharedvt (MonoCompile *cfg, int context_used, MonoClass *klass, MonoInst *obj, MonoBasicBlock **out_cbb)
+{
+ MonoInst *addr, *klass_inst, *is_ref, *args[16];
+ MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
+ MonoInst *ins;
+ int dreg, addr_reg;
+
+ klass_inst = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_KLASS);
+
+ /* obj */
+ args [0] = obj;
+
+ /* klass */
+ args [1] = klass_inst;
+
+ /* CASTCLASS */
+ obj = mono_emit_jit_icall (cfg, mono_object_castclass, args);
+
+ NEW_BBLOCK (cfg, is_ref_bb);
+ NEW_BBLOCK (cfg, is_nullable_bb);
+ NEW_BBLOCK (cfg, end_bb);
+ is_ref = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_CLASS_BOX_TYPE);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
+
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 2);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_nullable_bb);
+
+ /* This will contain either the address of the unboxed vtype, or an address of the temporary where the ref is stored */
+ addr_reg = alloc_dreg (cfg, STACK_MP);
+
+ /* Non-ref case */
+ /* UNBOX */
+ NEW_BIALU_IMM (cfg, addr, OP_ADD_IMM, addr_reg, obj->dreg, sizeof (MonoObject));
+ MONO_ADD_INS (cfg->cbb, addr);
+
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+ /* Ref case */
+ MONO_START_BB (cfg, is_ref_bb);
+
+ /* Save the ref to a temporary */
+ dreg = alloc_ireg (cfg);
+ EMIT_NEW_VARLOADA_VREG (cfg, addr, dreg, &klass->byval_arg);
+ addr->dreg = addr_reg;
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, addr->dreg, 0, obj->dreg);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+ /* Nullable case */
+ MONO_START_BB (cfg, is_nullable_bb);
+
+ {
+ MonoInst *addr = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX);
+ MonoInst *unbox_call;
+ MonoMethodSignature *unbox_sig;
+ MonoInst *var;
+
+ var = mono_compile_create_var (cfg, &klass->byval_arg, OP_LOCAL);
+
+ unbox_sig = mono_mempool_alloc0 (cfg->mempool, MONO_SIZEOF_METHOD_SIGNATURE + (1 * sizeof (MonoType *)));
+ unbox_sig->ret = &klass->byval_arg;
+ unbox_sig->param_count = 1;
+ unbox_sig->params [0] = &mono_defaults.object_class->byval_arg;
+ unbox_call = mono_emit_calli (cfg, unbox_sig, &obj, addr, NULL, NULL);
+
+ EMIT_NEW_VARLOADA_VREG (cfg, addr, unbox_call->dreg, &klass->byval_arg);
+ addr->dreg = addr_reg;
+ }
+
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
+ /* End */
+ MONO_START_BB (cfg, end_bb);
+
+ /* LDOBJ */
+ EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr_reg, 0);
+
+ *out_cbb = cfg->cbb;
+
+ return ins;
+}
+
/*
* Returns NULL and set the cfg exception on error.
*/
int rgctx_info;
MonoInst *iargs [2];
- /*
- FIXME: we cannot get managed_alloc here because we can't get
- the class's vtable (because it's not a closed class)
-
- MonoVTable *vtable = mono_class_vtable (cfg->domain, klass);
- MonoMethod *managed_alloc = mono_gc_get_managed_allocator (vtable, for_box);
- */
+ MonoMethod *managed_alloc = mono_gc_get_managed_allocator (klass, for_box);
if (cfg->opt & MONO_OPT_SHARED)
rgctx_info = MONO_RGCTX_INFO_KLASS;
alloc_ftn = mono_object_new_specific;
}
+ if (managed_alloc && !(cfg->opt & MONO_OPT_SHARED))
+ return mono_emit_method_call (cfg, managed_alloc, iargs, NULL);
+
return mono_emit_jit_icall (cfg, alloc_ftn, iargs);
}
}
#ifndef MONO_CROSS_COMPILE
- managed_alloc = mono_gc_get_managed_allocator (vtable, for_box);
+ managed_alloc = mono_gc_get_managed_allocator (klass, for_box);
#endif
if (managed_alloc) {
* Returns NULL and set the cfg exception on error.
*/
static MonoInst*
-handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used)
+handle_box (MonoCompile *cfg, MonoInst *val, MonoClass *klass, int context_used, MonoBasicBlock **out_cbb)
{
MonoInst *alloc, *ins;
+ *out_cbb = cfg->cbb;
+
if (mono_class_is_nullable (klass)) {
MonoMethod* method = mono_class_get_method_from_name (klass, "Box", 1);
return mono_emit_calli (cfg, mono_method_signature (method), &val, addr, NULL, rgctx);
} else {
- return mono_emit_method_call (cfg, method, &val, NULL);
+ gboolean pass_vtable, pass_mrgctx;
+ MonoInst *rgctx_arg = NULL;
+
+ check_method_sharing (cfg, method, &pass_vtable, &pass_mrgctx);
+ g_assert (!pass_mrgctx);
+
+ if (pass_vtable) {
+ MonoVTable *vtable = mono_class_vtable (cfg->domain, method->klass);
+
+ g_assert (vtable);
+ EMIT_NEW_VTABLECONST (cfg, rgctx_arg, vtable);
+ }
+
+ return mono_emit_method_call_full (cfg, method, NULL, FALSE, &val, NULL, NULL, rgctx_arg);
}
}
if (mini_is_gsharedvt_klass (cfg, klass)) {
- MonoBasicBlock *is_ref_bb, *end_bb;
+ MonoBasicBlock *is_ref_bb, *is_nullable_bb, *end_bb;
MonoInst *res, *is_ref, *src_var, *addr;
int addr_reg, dreg;
dreg = alloc_ireg (cfg);
NEW_BBLOCK (cfg, is_ref_bb);
+ NEW_BBLOCK (cfg, is_nullable_bb);
NEW_BBLOCK (cfg, end_bb);
- is_ref = emit_get_rgctx_klass (cfg, context_used, klass,
- MONO_RGCTX_INFO_CLASS_IS_REF);
+ is_ref = emit_get_gsharedvt_info_klass (cfg, klass, MONO_RGCTX_INFO_CLASS_BOX_TYPE);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 2);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_nullable_bb);
+
/* Non-ref case */
alloc = handle_alloc (cfg, klass, TRUE, context_used);
if (!alloc)
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, addr->dreg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+ /* Nullable case */
+ MONO_START_BB (cfg, is_nullable_bb);
+
+ {
+ MonoInst *addr = emit_get_gsharedvt_info_klass (cfg, klass,
+ MONO_RGCTX_INFO_NULLABLE_CLASS_BOX);
+ MonoInst *box_call;
+ MonoMethodSignature *box_sig;
+
+ /*
+ * klass is Nullable<T>, need to call Nullable<T>.Box () using a gsharedvt signature, but we cannot
+ * construct that method at JIT time, so have to do things by hand.
+ */
+ box_sig = mono_mempool_alloc0 (cfg->mempool, MONO_SIZEOF_METHOD_SIGNATURE + (1 * sizeof (MonoType *)));
+ box_sig->ret = &mono_defaults.object_class->byval_arg;
+ box_sig->param_count = 1;
+ box_sig->params [0] = &klass->byval_arg;
+ box_call = mono_emit_calli (cfg, box_sig, &val, addr, NULL, NULL);
+ EMIT_NEW_UNALU (cfg, res, OP_MOVE, dreg, box_call->dreg);
+ res->type = STACK_OBJ;
+ res->klass = klass;
+ }
+
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
+
MONO_START_BB (cfg, end_bb);
+ *out_cbb = cfg->cbb;
+
return res;
} else {
alloc = handle_alloc (cfg, klass, TRUE, context_used);
if (context_used) {
MonoInst *args [3];
- if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+ if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
MonoMethod *mono_castclass = mono_marshal_get_castclass_with_cache ();
MonoInst *cache_ins;
}
klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
- if (is_complex_isinst (klass)) {
- /* Complex case, handle by an icall */
-
- /* obj */
- args [0] = src;
-
- /* klass */
- args [1] = klass_inst;
-
- return mono_emit_jit_icall (cfg, mono_object_castclass, args);
- } else {
- /* Simple case, handled by the code below */
- }
}
NEW_BBLOCK (cfg, is_null_bb);
if (context_used) {
MonoInst *args [3];
- if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
+ if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
MonoMethod *mono_isinst = mono_marshal_get_isinst_with_cache ();
MonoInst *cache_ins;
}
klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
- if (is_complex_isinst (klass)) {
- /* Complex case, handle by an icall */
-
- /* obj */
- args [0] = src;
-
- /* klass */
- args [1] = klass_inst;
-
- return mono_emit_jit_icall (cfg, mono_object_isinst, args);
- } else {
- /* Simple case, the code below can handle it */
- }
}
NEW_BBLOCK (cfg, is_null_bb);
g_assert (cfg->generic_sharing_context);
context_used = mini_class_check_context_used (cfg, klass);
g_assert (context_used);
- rgctx_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE);
+ rgctx_ins = emit_get_gsharedvt_info (cfg, &klass->byval_arg, MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE);
MONO_EMIT_NEW_BIALU (cfg, OP_IMUL, mult_reg, index2_reg, rgctx_ins->dreg);
} else {
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
} else
return NULL;
} else if (cmethod->klass == mono_defaults.array_class) {
- if (strcmp (cmethod->name + 1, "etGenericValueImpl") == 0)
+ if (!cfg->gsharedvt && strcmp (cmethod->name + 1, "etGenericValueImpl") == 0)
return emit_array_generic_access (cfg, fsig, args, *cmethod->name == 'S');
#ifndef MONO_BIG_ARRAYS
g_assert (vtable); /*Should not fail since it System.String*/
#ifndef MONO_CROSS_COMPILE
- managed_alloc = mono_gc_get_managed_allocator (vtable, FALSE);
+ managed_alloc = mono_gc_get_managed_allocator (method->klass, FALSE);
#endif
if (!managed_alloc)
return NULL;
link_bblock (cfg, start_bblock, bblock);
}
+ if (cfg->gsharedvt && cfg->method == method) {
+ MonoGSharedVtMethodInfo *info;
+ MonoInst *var, *locals_var;
+ int dreg;
+
+ info = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoGSharedVtMethodInfo));
+ info->method = cfg->method;
+ // FIXME: Free this
+ info->entries = g_ptr_array_new ();
+ cfg->gsharedvt_info = info;
+
+ var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+ /* prevent it from being register allocated */
+ //var->flags |= MONO_INST_INDIRECT;
+ cfg->gsharedvt_info_var = var;
+
+ ins = emit_get_rgctx_gsharedvt_method (cfg, mini_method_check_context_used (cfg, method), method, info);
+ MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, var->dreg, ins->dreg);
+
+ /* Allocate locals */
+ locals_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+ /* prevent it from being register allocated */
+ //locals_var->flags |= MONO_INST_INDIRECT;
+ cfg->gsharedvt_locals_var = locals_var;
+
+ dreg = alloc_ireg (cfg);
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, dreg, var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, locals_size));
+
+ MONO_INST_NEW (cfg, ins, OP_LOCALLOC);
+ ins->dreg = locals_var->dreg;
+ ins->sreg1 = dreg;
+ MONO_ADD_INS (cfg->cbb, ins);
+ cfg->gsharedvt_locals_var_ins = ins;
+
+ cfg->flags |= MONO_CFG_HAS_ALLOCA;
+ /*
+ if (init_locals)
+ ins->flags |= MONO_INST_INIT;
+ */
+ }
+
/* at this point we know, if security is TRUE, that some code needs to be generated */
if (security && (cfg->method == method)) {
MonoInst *args [2];
MonoInst *vtable_arg = NULL;
gboolean check_this = FALSE;
gboolean supported_tail_call = FALSE;
+ gboolean tail_call = FALSE;
gboolean need_seq_point = FALSE;
guint32 call_opcode = *ip;
gboolean emit_widen = TRUE;
/*
* Constrained calls need to behave differently at runtime dependending on whenever the receiver is instantiated as ref type or as a vtype.
*/
- /* Special case Object:ToString () as its easy to implement */
- if (cmethod->klass == mono_defaults.object_class && !strcmp (cmethod->name, "ToString")) {
- MonoInst *args [3];
+ /* Special case Object methods as they are easy to implement */
+ if (cmethod->klass == mono_defaults.object_class) {
+ MonoInst *args [16];
args [0] = sp [0];
EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
args [2] = emit_get_rgctx_klass (cfg, mono_class_check_context_used (constrained_call), constrained_call, MONO_RGCTX_INFO_KLASS);
- ins = mono_emit_jit_icall (cfg, mono_object_tostring_gsharedvt, args);
- goto call_end;
- } else if (cmethod->klass == mono_defaults.object_class && !strcmp (cmethod->name, "GetHashCode")) {
- MonoInst *args [3];
- args [0] = sp [0];
- EMIT_NEW_METHODCONST (cfg, args [1], cmethod);
- args [2] = emit_get_rgctx_klass (cfg, mono_class_check_context_used (constrained_call), constrained_call, MONO_RGCTX_INFO_KLASS);
- ins = mono_emit_jit_icall (cfg, mono_object_gethashcode_gsharedvt, args);
+ if (!strcmp (cmethod->name, "ToString")) {
+ ins = mono_emit_jit_icall (cfg, mono_object_tostring_gsharedvt, args);
+ } else if (!strcmp (cmethod->name, "Equals")) {
+ args [3] = sp [1];
+ ins = mono_emit_jit_icall (cfg, mono_object_equals_gsharedvt, args);
+ } else if (!strcmp (cmethod->name, "GetHashCode")) {
+ ins = mono_emit_jit_icall (cfg, mono_object_gethashcode_gsharedvt, args);
+ } else {
+ GSHAREDVT_FAILURE (*ip);
+ }
goto call_end;
} else if (constrained_call->valuetype && cmethod->klass->valuetype) {
/* The 'Own method' case below */
*/
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_call->byval_arg, sp [0]->dreg, 0);
ins->klass = constrained_call;
- sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call));
- bblock = cfg->cbb;
+ sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call), &bblock);
CHECK_CFG_EXCEPTION;
} else if (!constrained_call->valuetype) {
int dreg = alloc_ireg_ref (cfg);
/* Enum implements some interfaces, so treat this as the first case */
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &constrained_call->byval_arg, sp [0]->dreg, 0);
ins->klass = constrained_call;
- sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call));
- bblock = cfg->cbb;
+ sp [0] = handle_box (cfg, ins, constrained_call, mono_class_check_context_used (constrained_call), &bblock);
CHECK_CFG_EXCEPTION;
}
}
CHECK_TYPELOAD (cmethod->klass);
}
- if (cmethod && ((cmethod->flags & METHOD_ATTRIBUTE_STATIC) || cmethod->klass->valuetype) &&
- (cmethod->klass->generic_class || cmethod->klass->generic_container)) {
- gboolean sharable = FALSE;
-
- if (mono_method_is_generic_sharable (cmethod, TRUE)) {
- sharable = TRUE;
- } else {
- gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
- MonoGenericContext *context = mini_class_get_context (cmethod->klass);
- gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
-
- sharable = sharing_enabled && context_sharable;
- }
-
- /*
- * Pass vtable iff target method might
- * be shared, which means that sharing
- * is enabled for its class and its
- * context is sharable (and it's not a
- * generic method).
- */
- if (sharable && !(mini_method_get_context (cmethod) && mini_method_get_context (cmethod)->method_inst))
- pass_vtable = TRUE;
- }
-
- if (cmethod && mini_method_get_context (cmethod) &&
- mini_method_get_context (cmethod)->method_inst) {
- g_assert (!pass_vtable);
-
- if (mono_method_is_generic_sharable (cmethod, TRUE)) {
- pass_mrgctx = TRUE;
- } else {
- gboolean sharing_enabled = mono_class_generic_sharing_enabled (cmethod->klass);
- MonoGenericContext *context = mini_method_get_context (cmethod);
- gboolean context_sharable = mono_generic_context_is_sharable (context, TRUE);
-
- if (sharing_enabled && context_sharable)
- pass_mrgctx = TRUE;
- if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig))
- pass_mrgctx = TRUE;
- }
- }
+ if (cmethod)
+ check_method_sharing (cfg, cmethod, &pass_vtable, &pass_mrgctx);
if (cfg->generic_sharing_context && cmethod) {
MonoGenericContext *cmethod_context = mono_method_get_context (cmethod);
g_assert (cmethod->is_inflated);
imt_arg = emit_get_rgctx_method (cfg, context_used,
cmethod, MONO_RGCTX_INFO_METHOD);
- ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp, sp [0], imt_arg, NULL);
+ ins = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, sp [0], imt_arg, NULL);
} else {
this_temp = mono_compile_create_var (cfg, type_from_stack_type (sp [0]), OP_LOCAL);
NEW_TEMPSTORE (cfg, store, this_temp->inst_c0, sp [0]);
/* FIXME: Enabling TAILC breaks some inlining/stack trace/etc tests */
/* FIXME: runtime generic context pointer for jumps? */
/* FIXME: handle this for generic sharing eventually */
- if (cmethod &&
- ((((ins_flag & MONO_INST_TAILCALL) && (call_opcode == CEE_CALL))
- ))//|| ((cfg->opt & MONO_OPT_TAILC) && *ip == CEE_CALL && ip [5] == CEE_RET))
- && !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig))
+ if (cmethod && (ins_flag & MONO_INST_TAILCALL) &&
+ !vtable_arg && !cfg->generic_sharing_context && is_supported_tail_call (cfg, method, cmethod, fsig))
supported_tail_call = TRUE;
+ if (supported_tail_call) {
+ if (call_opcode != CEE_CALL)
+ supported_tail_call = FALSE;
+ }
+
if (supported_tail_call) {
MonoCallInst *call;
//printf ("HIT: %s -> %s\n", mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE));
-#ifdef MONO_ARCH_USE_OP_TAIL_CALL
- /* Handle tail calls similarly to calls */
- call = mono_emit_call_args (cfg, mono_method_signature (cmethod), sp, FALSE, FALSE, TRUE, FALSE, FALSE);
-#else
- MONO_INST_NEW_CALL (cfg, call, OP_JMP);
- call->tail_call = TRUE;
- call->method = cmethod;
- call->signature = mono_method_signature (cmethod);
-
- /*
- * We implement tail calls by storing the actual arguments into the
- * argument variables, then emitting a CEE_JMP.
- */
- for (i = 0; i < n; ++i) {
- /* Prevent argument from being register allocated */
- arg_array [i]->flags |= MONO_INST_VOLATILE;
- EMIT_NEW_ARGSTORE (cfg, ins, i, sp [i]);
- }
-#endif
+ if (ARCH_USE_OP_TAIL_CALL) {
+ /* Handle tail calls similarly to normal calls */
+ tail_call = TRUE;
+ } else {
+ MONO_INST_NEW_CALL (cfg, call, OP_JMP);
+ call->tail_call = TRUE;
+ call->method = cmethod;
+ call->signature = mono_method_signature (cmethod);
- ins = (MonoInst*)call;
- ins->inst_p0 = cmethod;
- ins->inst_p1 = arg_array [0];
- MONO_ADD_INS (bblock, ins);
- link_bblock (cfg, bblock, end_bblock);
- start_new_bblock = 1;
+ /*
+ * We implement tail calls by storing the actual arguments into the
+ * argument variables, then emitting a CEE_JMP.
+ */
+ for (i = 0; i < n; ++i) {
+ /* Prevent argument from being register allocated */
+ arg_array [i]->flags |= MONO_INST_VOLATILE;
+ EMIT_NEW_ARGSTORE (cfg, ins, i, sp [i]);
+ }
+ ins = (MonoInst*)call;
+ ins->inst_p0 = cmethod;
+ ins->inst_p1 = arg_array [0];
+ MONO_ADD_INS (bblock, ins);
+ link_bblock (cfg, bblock, end_bblock);
+ start_new_bblock = 1;
- // FIXME: Eliminate unreachable epilogs
+ // FIXME: Eliminate unreachable epilogs
- /*
- * OP_TAILCALL has no return value, so skip the CEE_RET if it is
- * only reachable from this call.
- */
- GET_BBLOCK (cfg, tblock, ip + 5);
- if (tblock == bblock || tblock->in_count == 0)
- skip_ret = TRUE;
- push_res = FALSE;
+ /*
+ * OP_TAILCALL has no return value, so skip the CEE_RET if it is
+ * only reachable from this call.
+ */
+ GET_BBLOCK (cfg, tblock, ip + 5);
+ if (tblock == bblock || tblock->in_count == 0)
+ skip_ret = TRUE;
+ push_res = FALSE;
- goto call_end;
+ goto call_end;
+ }
}
/*
/* Common call */
INLINE_FAILURE ("call");
- ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp, virtual ? sp [0] : NULL,
+ ins = mono_emit_method_call_full (cfg, cmethod, fsig, tail_call, sp, virtual ? sp [0] : NULL,
imt_arg, vtable_arg);
+ if (tail_call) {
+ link_bblock (cfg, bblock, end_bblock);
+ start_new_bblock = 1;
+
+ // FIXME: Eliminate unreachable epilogs
+
+ /*
+ * OP_TAILCALL has no return value, so skip the CEE_RET if it is
+ * only reachable from this call.
+ */
+ GET_BBLOCK (cfg, tblock, ip + 5);
+ if (tblock == bblock || tblock->in_count == 0)
+ skip_ret = TRUE;
+ push_res = FALSE;
+ }
+
call_end:
/* End of call, INS should contain the result of the call, if any */
/* we simply pass a null pointer */
EMIT_NEW_PCONST (cfg, *sp, NULL);
/* now call the string ctor */
- alloc = mono_emit_method_call_full (cfg, cmethod, fsig, sp, NULL, NULL, NULL);
+ alloc = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, NULL, NULL, NULL);
} else {
MonoInst* callvirt_this_arg = NULL;
// FIXME-VT: Clean this up
if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig))
GSHAREDVT_FAILURE(*ip);
- mono_emit_method_call_full (cfg, cmethod, fsig, sp, callvirt_this_arg, NULL, NULL);
+ mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp, callvirt_this_arg, NULL, NULL);
}
} else if (cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig)) {
MonoInst *addr;
mono_emit_calli (cfg, fsig, sp, cmethod_addr, NULL, vtable_arg);
} else {
INLINE_FAILURE ("ctor call");
- ins = mono_emit_method_call_full (cfg, cmethod, fsig, sp,
+ ins = mono_emit_method_call_full (cfg, cmethod, fsig, FALSE, sp,
callvirt_this_arg, NULL, vtable_arg);
}
}
context_used = mini_class_check_context_used (cfg, klass);
if (mini_is_gsharedvt_klass (cfg, klass)) {
- MonoInst *obj, *addr, *klass_inst, *is_ref, *args[16];
- MonoBasicBlock *is_ref_bb, *end_bb;
- int dreg, addr_reg;
-
- /* Need to check for nullable types at runtime, but those are disabled in mini_is_gsharedvt_sharable_method*/
- if (mono_class_is_nullable (klass))
- GSHAREDVT_FAILURE (*ip);
-
- obj = *sp;
-
- klass_inst = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
-
- /* obj */
- args [0] = obj;
-
- /* klass */
- args [1] = klass_inst;
-
- /* CASTCLASS */
- obj = mono_emit_jit_icall (cfg, mono_object_castclass, args);
-
- NEW_BBLOCK (cfg, is_ref_bb);
- NEW_BBLOCK (cfg, end_bb);
- is_ref = emit_get_rgctx_klass (cfg, context_used, klass,
- MONO_RGCTX_INFO_CLASS_IS_REF);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, is_ref->dreg, 1);
- MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_ref_bb);
-
- /* This will contain either the address of the unboxed vtype, or an address of the temporary where the ref is stored */
- addr_reg = alloc_dreg (cfg, STACK_MP);
-
- /* Non-ref case */
- /* UNBOX */
- NEW_BIALU_IMM (cfg, addr, OP_ADD_IMM, addr_reg, obj->dreg, sizeof (MonoObject));
- MONO_ADD_INS (cfg->cbb, addr);
-
- MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
-
- /* Ref case */
- MONO_START_BB (cfg, is_ref_bb);
-
- /* Save the ref to a temporary */
- dreg = alloc_ireg (cfg);
- EMIT_NEW_VARLOADA_VREG (cfg, addr, dreg, &klass->byval_arg);
- addr->dreg = addr_reg;
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, addr->dreg, 0, obj->dreg);
- MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
-
- MONO_START_BB (cfg, end_bb);
- bblock = cfg->cbb;
-
- /* LDOBJ */
- EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, addr_reg, 0);
- *sp++ = ins;
+ *sp = handle_unbox_gsharedvt (cfg, context_used, klass, *sp, &bblock);
+ sp ++;
ip += 5;
inline_costs += 2;
break;
}
- *sp++ = handle_box (cfg, val, klass, context_used);
- bblock = cfg->cbb;
+ *sp++ = handle_box (cfg, val, klass, context_used, &bblock);
CHECK_CFG_EXCEPTION;
ip += 5;
context_used = mini_class_check_context_used (cfg, klass);
- offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+ offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
dreg = alloc_ireg_mp (cfg);
EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
/* The decomposition will call mini_emit_stobj () which will emit a wbarrier if needed */
if (mini_is_gsharedvt_klass (cfg, klass)) {
MonoInst *offset_ins;
- offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+ offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
} else {
EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, dreg, sp [0]->dreg, foffset);
if (mini_is_gsharedvt_klass (cfg, klass)) {
MonoInst *offset_ins;
- offset_ins = emit_get_rgctx_field (cfg, context_used, field, MONO_RGCTX_INFO_FIELD_OFFSET);
+ offset_ins = emit_get_gsharedvt_info (cfg, field, MONO_RGCTX_INFO_FIELD_OFFSET);
dreg = alloc_ireg_mp (cfg);
EMIT_NEW_BIALU (cfg, ins, OP_PADD, dreg, sp [0]->dreg, offset_ins->dreg);
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, load, field->type, dreg, 0);
lmf_ins = mono_get_lmf_intrinsic (cfg);
#endif
-#ifdef MONO_ARCH_HAVE_TLS_GET
if (MONO_ARCH_HAVE_TLS_GET && ad_ins && lmf_ins) {
NEW_BBLOCK (cfg, next_bb);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, lmf_ins->dreg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, next_bb);
}
-#endif
if (cfg->compile_aot) {
/* AOT code is only used in the root domain */
#endif
/* Arguments are implicitly global */
/* Putting R4 vars into registers doesn't work currently */
- if ((var->opcode != OP_ARG) && (var != cfg->ret) && !(var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)) && (vreg_to_bb [var->dreg] != -1) && (var->klass->byval_arg.type != MONO_TYPE_R4) && !cfg->disable_vreg_to_lvreg) {
+ /* The gsharedvt vars are implicitly referenced by ldaddr opcodes, but those opcodes are only generated later */
+ if ((var->opcode != OP_ARG) && (var != cfg->ret) && !(var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)) && (vreg_to_bb [var->dreg] != -1) && (var->klass->byval_arg.type != MONO_TYPE_R4) && !cfg->disable_vreg_to_lvreg && var != cfg->gsharedvt_info_var && var != cfg->gsharedvt_locals_var) {
/*
* Make that the variable's liveness interval doesn't contain a call, since
* that would cause the lvreg to be spilled, making the whole optimization
guint32 stacktypes [128];
MonoInst **live_range_start, **live_range_end;
MonoBasicBlock **live_range_start_bb, **live_range_end_bb;
+ int *gsharedvt_vreg_to_idx = NULL;
*need_local_opts = FALSE;
ins->flags |= MONO_INST_GC_TRACK;
}
}
+
+ if (cfg->gsharedvt) {
+ gsharedvt_vreg_to_idx = g_new0 (int, cfg->next_vreg);
+
+ for (i = 0; i < cfg->num_varinfo; ++i) {
+ MonoInst *ins = cfg->varinfo [i];
+ int idx;
+
+ if (mini_is_gsharedvt_variable_type (cfg, ins->inst_vtype)) {
+ if (i >= cfg->locals_start) {
+ /* Local */
+ idx = get_gsharedvt_info_slot (cfg, ins->inst_vtype, MONO_RGCTX_INFO_LOCAL_OFFSET);
+ gsharedvt_vreg_to_idx [ins->dreg] = idx + 1;
+ ins->opcode = OP_GSHAREDVT_LOCAL;
+ ins->inst_imm = idx;
+ } else {
+ /* Arg */
+ gsharedvt_vreg_to_idx [ins->dreg] = -1;
+ ins->opcode = OP_GSHAREDVT_ARG_REGOFFSET;
+ }
+ }
+ }
+ }
/* FIXME: widening and truncation */
ins->inst_offset = vtaddr->inst_offset;
} else
NOT_IMPLEMENTED;
+ } else if (cfg->gsharedvt && gsharedvt_vreg_to_idx [var->dreg] < 0) {
+ /* gsharedvt arg passed by ref */
+ g_assert (var->opcode == OP_GSHAREDVT_ARG_REGOFFSET);
+
+ ins->opcode = OP_LOAD_MEMBASE;
+ ins->inst_basereg = var->inst_basereg;
+ ins->inst_offset = var->inst_offset;
+ } else if (cfg->gsharedvt && gsharedvt_vreg_to_idx [var->dreg]) {
+ MonoInst *load, *load2, *load3;
+ int idx = gsharedvt_vreg_to_idx [var->dreg] - 1;
+ int reg1, reg2, reg3;
+ MonoInst *info_var = cfg->gsharedvt_info_var;
+ MonoInst *locals_var = cfg->gsharedvt_locals_var;
+
+ /*
+ * gsharedvt local.
+ * Compute the address of the local as gsharedvt_locals_var + gsharedvt_info_var->locals_offsets [idx].
+ */
+
+ g_assert (var->opcode == OP_GSHAREDVT_LOCAL);
+
+ g_assert (info_var);
+ g_assert (locals_var);
+
+ /* Mark the instruction used to compute the locals var as used */
+ cfg->gsharedvt_locals_var_ins = NULL;
+
+ /* Load the offset */
+ if (info_var->opcode == OP_REGOFFSET) {
+ reg1 = alloc_ireg (cfg);
+ NEW_LOAD_MEMBASE (cfg, load, OP_LOAD_MEMBASE, reg1, info_var->inst_basereg, info_var->inst_offset);
+ } else if (info_var->opcode == OP_REGVAR) {
+ load = NULL;
+ reg1 = info_var->dreg;
+ } else {
+ g_assert_not_reached ();
+ }
+ reg2 = alloc_ireg (cfg);
+ NEW_LOAD_MEMBASE (cfg, load2, OP_LOADI4_MEMBASE, reg2, reg1, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+ /* Load the locals area address */
+ reg3 = alloc_ireg (cfg);
+ if (locals_var->opcode == OP_REGOFFSET) {
+ NEW_LOAD_MEMBASE (cfg, load3, OP_LOAD_MEMBASE, reg3, locals_var->inst_basereg, locals_var->inst_offset);
+ } else if (locals_var->opcode == OP_REGVAR) {
+ NEW_UNALU (cfg, load3, OP_MOVE, reg3, locals_var->dreg);
+ } else {
+ g_assert_not_reached ();
+ }
+ /* Compute the address */
+ ins->opcode = OP_PADD;
+ ins->sreg1 = reg3;
+ ins->sreg2 = reg2;
+
+ mono_bblock_insert_before_ins (bb, ins, load3);
+ mono_bblock_insert_before_ins (bb, load3, load2);
+ if (load)
+ mono_bblock_insert_before_ins (bb, load2, load);
} else {
g_assert (var->opcode == OP_REGOFFSET);
}
#endif
+ if (cfg->gsharedvt_locals_var_ins) {
+ /* Nullify if unused */
+ cfg->gsharedvt_locals_var_ins->opcode = OP_PCONST;
+ cfg->gsharedvt_locals_var_ins->inst_imm = 0;
+ }
+
g_free (live_range_start);
g_free (live_range_end);
g_free (live_range_start_bb);
jinfo = g_hash_table_lookup (cfg->abs_patches, data);
if (jinfo) {
if (jinfo->type == MONO_PATCH_INFO_JIT_ICALL_ADDR) {
- if ((((guint64)data) >> 32) == 0)
+ MonoJitICallInfo *mi = mono_find_jit_icall_by_name (jinfo->data.name);
+ if (mi && (((guint64)mi->func) >> 32) == 0)
near_call = TRUE;
no_patch = TRUE;
} else {
}
offset = code - cfg->native_code;
- mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+ mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call->method);
if (cfg->compile_aot)
amd64_mov_reg_membase (code, AMD64_R11, AMD64_RIP, 0, 8);
else
code = mono_amd64_emit_tls_get (code, ins->dreg, ins->inst_offset);
break;
}
+ case OP_TLS_GET_REG:
+#ifdef TARGET_OSX
+ // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
+ if (ins->dreg != ins->sreg1)
+ amd64_mov_reg_reg (code, ins->dreg, ins->sreg1, sizeof (gpointer));
+ amd64_shift_reg_imm (code, X86_SHL, ins->dreg, 3);
+ if (tls_gs_offset)
+ amd64_alu_reg_imm (code, X86_ADD, ins->dreg, tls_gs_offset);
+ x86_prefix (code, X86_GS_PREFIX);
+ amd64_mov_reg_membase (code, ins->dreg, ins->dreg, 0, sizeof (gpointer));
+#else
+ g_assert_not_reached ();
+#endif
+ break;
case OP_MEMORY_BARRIER: {
switch (ins->backend.memory_barrier_kind) {
case StoreLoadBarrier:
#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
#define MONO_ARCH_HAVE_CREATE_LLVM_NATIVE_THUNK 1
+#ifdef TARGET_OSX
+#define MONO_ARCH_HAVE_TLS_GET_REG 1
+#endif
+
gboolean
mono_amd64_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
#include "mini.h"
#include <string.h>
+#if !defined(__APPLE__) && !defined(PLATFORM_ANDROID)
+#include <sys/auxv.h>
+#endif
+
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
static CRITICAL_SECTION mini_arch_mutex;
-static int v5_supported = 0;
-static int v6_supported = 0;
-static int v7_supported = 0;
-static int v7s_supported = 0;
-static int thumb_supported = 0;
-static int thumb2_supported = 0;
+static gboolean v5_supported = FALSE;
+static gboolean v6_supported = FALSE;
+static gboolean v7_supported = FALSE;
+static gboolean v7s_supported = FALSE;
+static gboolean thumb_supported = FALSE;
+static gboolean thumb2_supported = FALSE;
/*
* Whenever to use the ARM EABI
*/
-static int eabi_supported = 0;
+static gboolean eabi_supported = FALSE;
/*
* Whenever we are on arm/darwin aka the iphone.
*/
-static int darwin = 0;
+static gboolean darwin = FALSE;
/*
* Whenever to use the iphone ABI extensions:
* http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/index.html
* This is required for debugging/profiling tools to work, but it has some overhead so it should
* only be turned on in debug builds.
*/
-static int iphone_abi = 0;
+static gboolean iphone_abi = FALSE;
/*
* The FPU we are generating code for. This is NOT runtime configurable right now,
#if defined(__ARM_EABI__)
eabi_supported = TRUE;
#endif
-#if defined(__APPLE__) && defined(MONO_CROSS_COMPILE)
+#if defined(__APPLE__)
i8_align = 4;
#else
i8_align = __alignof__ (gint64);
mono_arch_cpu_optimizations (guint32 *exclude_mask)
{
guint32 opts = 0;
+
+ /* Format: armv(5|6|7[s])[-thumb[2]] */
const char *cpu_arch = getenv ("MONO_CPU_ARCH");
if (cpu_arch != NULL) {
- thumb_supported = strstr (cpu_arch, "thumb") != NULL;
if (strncmp (cpu_arch, "armv", 4) == 0) {
v5_supported = cpu_arch [4] >= '5';
v6_supported = cpu_arch [4] >= '6';
v7_supported = cpu_arch [4] >= '7';
+ v7s_supported = strncmp (cpu_arch, "armv7s", 6) == 0;
}
+ thumb_supported = strstr (cpu_arch, "thumb") != NULL;
+ thumb2_supported = strstr (cpu_arch, "thumb2") != NULL;
} else {
#if __APPLE__
thumb_supported = TRUE;
v5_supported = TRUE;
darwin = TRUE;
iphone_abi = TRUE;
-#else
+#elif defined(PLATFORM_ANDROID)
+ /* Android is awesome and doesn't make most of /proc (including
+ * /proc/self/auxv) available to regular processes. So we use
+ * /proc/cpuinfo instead.... */
char buf [512];
char *line;
FILE *file = fopen ("/proc/cpuinfo", "r");
while ((line = fgets (buf, 512, file))) {
if (strncmp (line, "Processor", 9) == 0) {
char *ver = strstr (line, "(v");
- if (ver && (ver [2] == '5' || ver [2] == '6' || ver [2] == '7'))
- v5_supported = TRUE;
- if (ver && (ver [2] == '6' || ver [2] == '7'))
- v6_supported = TRUE;
- if (ver && (ver [2] == '7'))
- v7_supported = TRUE;
+ if (ver) {
+ if (ver [2] >= '5')
+ v5_supported = TRUE;
+ if (ver [2] >= '6')
+ v6_supported = TRUE;
+ if (ver [2] >= '7')
+ v7_supported = TRUE;
+ /* TODO: Find a way to detect v7s. */
+ }
continue;
}
if (strncmp (line, "Features", 8) == 0) {
+ /* TODO: Find a way to detect Thumb 2. */
char *th = strstr (line, "thumb");
if (th) {
thumb_supported = TRUE;
continue;
}
}
+
fclose (file);
/*printf ("features: v5: %d, thumb: %d\n", v5_supported, thumb_supported);*/
}
+#else
+ /* This solution is neat because it uses the dynamic linker
+ * instead of the kernel. Thus, it works in QEMU chroots. */
+ unsigned long int hwcap;
+ unsigned long int platform;
+
+ if ((hwcap = getauxval(AT_HWCAP))) {
+ /* We use hardcoded values to avoid depending on a
+ * specific version of the hwcap.h header. */
+
+ /* HWCAP_ARM_THUMB */
+ if ((hwcap & 4) != 0)
+ /* TODO: Find a way to detect Thumb 2. */
+ thumb_supported = TRUE;
+ }
+
+ if ((platform = getauxval(AT_PLATFORM))) {
+ /* Actually a pointer to the platform string. */
+ const char *str = (const char *) platform;
+
+ /* Possible CPU name values (from kernel sources):
+ *
+ * - v4
+ * - v5
+ * - v5t
+ * - v6
+ * - v7
+ *
+ * Value is suffixed with the endianness ('b' or 'l').
+ * We only support little endian anyway.
+ */
+
+ if (str [1] >= '5')
+ v5_supported = TRUE;
+
+ if (str [1] >= '6')
+ v6_supported = TRUE;
+
+ if (str [1] >= '7')
+ v7_supported = TRUE;
+
+ /* TODO: Find a way to detect v7s. */
+ }
+
+ /*printf ("hwcap = %i, platform = %s\n", (int) hwcap, (const char *) platform);
+ printf ("thumb = %i, thumb2 = %i, v5 = %i, v6 = %i, v7 = %i, v7s = %i\n",
+ thumb_supported, thumb2_supported, v5_supported, v6_supported, v7_supported, v7s_supported);*/
#endif
}
RegTypeBaseGen,
RegTypeFP,
RegTypeStructByVal,
- RegTypeStructByAddr
+ RegTypeStructByAddr,
+ /* gsharedvt argument passed by addr in greg */
+ RegTypeGSharedVtInReg,
+ /* gsharedvt argument passed by addr on stack */
+ RegTypeGSharedVtOnStack,
} ArgStorage;
typedef struct {
cinfo->nargs = n;
gr = ARMREG_R0;
- /* FIXME: handle returning a struct */
t = mini_type_get_underlying_type (gsctx, sig->ret);
if (MONO_TYPE_ISSTRUCT (t)) {
guint32 align;
} else {
cinfo->vtype_retaddr = TRUE;
}
+ } else if (!(t->type == MONO_TYPE_GENERICINST && !mono_type_generic_inst_is_valuetype (t)) && mini_is_gsharedvt_type_gsctx (gsctx, t)) {
+ cinfo->vtype_retaddr = TRUE;
}
pstart = 0;
DEBUG(printf("params: %d\n", sig->param_count));
for (i = pstart; i < sig->param_count; ++i) {
+ ArgInfo *ainfo = &cinfo->args [n];
+
if ((sig->call_convention == MONO_CALL_VARARG) && (i == sig->sentinelpos)) {
/* Prevent implicit arguments and sig_cookie from
being passed in registers */
DEBUG(printf("param %d: ", i));
if (sig->params [i]->byref) {
DEBUG(printf("byref\n"));
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
n++;
continue;
}
case MONO_TYPE_I1:
case MONO_TYPE_U1:
cinfo->args [n].size = 1;
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
n++;
break;
case MONO_TYPE_CHAR:
case MONO_TYPE_I2:
case MONO_TYPE_U2:
cinfo->args [n].size = 2;
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
n++;
break;
case MONO_TYPE_I4:
case MONO_TYPE_U4:
cinfo->args [n].size = 4;
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
n++;
break;
case MONO_TYPE_I:
case MONO_TYPE_ARRAY:
case MONO_TYPE_R4:
cinfo->args [n].size = sizeof (gpointer);
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
n++;
break;
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (simpletype)) {
cinfo->args [n].size = sizeof (gpointer);
- add_general (&gr, &stack_size, cinfo->args + n, TRUE);
+ add_general (&gr, &stack_size, ainfo, TRUE);
+ n++;
+ break;
+ }
+ if (mini_is_gsharedvt_type_gsctx (gsctx, simpletype)) {
+ /* gsharedvt arguments are passed by ref */
+ g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+ add_general (&gr, &stack_size, ainfo, TRUE);
+ switch (ainfo->storage) {
+ case RegTypeGeneral:
+ ainfo->storage = RegTypeGSharedVtInReg;
+ break;
+ case RegTypeBase:
+ ainfo->storage = RegTypeGSharedVtOnStack;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
n++;
break;
}
align_size += (sizeof (gpointer) - 1);
align_size &= ~(sizeof (gpointer) - 1);
nwords = (align_size + sizeof (gpointer) -1 ) / sizeof (gpointer);
- cinfo->args [n].storage = RegTypeStructByVal;
- cinfo->args [n].struct_size = size;
+ ainfo->storage = RegTypeStructByVal;
+ ainfo->struct_size = size;
/* FIXME: align stack_size if needed */
if (eabi_supported) {
if (align >= 8 && (gr & 1))
gr ++;
}
if (gr > ARMREG_R3) {
- cinfo->args [n].size = 0;
- cinfo->args [n].vtsize = nwords;
+ ainfo->size = 0;
+ ainfo->vtsize = nwords;
} else {
int rest = ARMREG_R3 - gr + 1;
int n_in_regs = rest >= nwords? nwords: rest;
- cinfo->args [n].size = n_in_regs;
- cinfo->args [n].vtsize = nwords - n_in_regs;
- cinfo->args [n].reg = gr;
+ ainfo->size = n_in_regs;
+ ainfo->vtsize = nwords - n_in_regs;
+ ainfo->reg = gr;
gr += n_in_regs;
nwords -= n_in_regs;
}
- cinfo->args [n].offset = stack_size;
+ ainfo->offset = stack_size;
/*g_print ("offset for arg %d at %d\n", n, stack_size);*/
stack_size += nwords * sizeof (gpointer);
n++;
case MONO_TYPE_U8:
case MONO_TYPE_I8:
case MONO_TYPE_R8:
- cinfo->args [n].size = 8;
- add_general (&gr, &stack_size, cinfo->args + n, FALSE);
+ ainfo->size = 8;
+ add_general (&gr, &stack_size, ainfo, FALSE);
+ n++;
+ break;
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ /* gsharedvt arguments are passed by ref */
+ g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+ add_general (&gr, &stack_size, ainfo, TRUE);
+ switch (ainfo->storage) {
+ case RegTypeGeneral:
+ ainfo->storage = RegTypeGSharedVtInReg;
+ break;
+ case RegTypeBase:
+ ainfo->storage = RegTypeGSharedVtOnStack;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
n++;
break;
default:
cinfo->ret.reg = ARMREG_R0;
break;
}
+ // FIXME: Only for variable types
+ if (mini_is_gsharedvt_type_gsctx (gsctx, simpletype)) {
+ cinfo->ret.storage = RegTypeStructByAddr;
+ g_assert (cinfo->vtype_retaddr);
+ break;
+ }
/* Fall through */
case MONO_TYPE_VALUETYPE:
case MONO_TYPE_TYPEDBYREF:
if (cinfo->ret.storage != RegTypeStructByVal)
cinfo->ret.storage = RegTypeStructByAddr;
break;
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ g_assert (mini_is_gsharedvt_type_gsctx (gsctx, simpletype));
+ cinfo->ret.storage = RegTypeStructByAddr;
+ g_assert (cinfo->vtype_retaddr);
+ break;
case MONO_TYPE_VOID:
break;
default:
t = ins->inst_vtype;
if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
- t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+ continue;
/* inst->backend.is_pinvoke indicates native sized value types, this is used by the
* pinvoke wrappers when they call functions returning structure */
#endif
break;
case RegTypeStructByVal:
+ case RegTypeGSharedVtInReg:
+ case RegTypeGSharedVtOnStack:
MONO_INST_NEW (cfg, ins, OP_OUTARG_VT);
ins->opcode = OP_OUTARG_VT;
ins->sreg1 = in->dreg;
int struct_size = ainfo->struct_size;
int i, soffset, dreg, tmpreg;
+ if (ainfo->storage == RegTypeGSharedVtInReg) {
+ /* Pass by addr */
+ mono_call_inst_add_outarg_reg (cfg, call, src->dreg, ainfo->reg, FALSE);
+ return;
+ }
+ if (ainfo->storage == RegTypeGSharedVtOnStack) {
+ /* Pass by addr on stack */
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, ARMREG_SP, ainfo->offset, src->dreg);
+ return;
+ }
+
soffset = 0;
for (i = 0; i < ainfo->size; ++i) {
dreg = mono_alloc_ireg (cfg);
break;
case OP_IREM:
g_assert (v7s_supported);
- ARM_SDIV (code, ARMREG_IP, ins->sreg1, ins->sreg2);
- ARM_MLS (code, ins->dreg, ARMREG_IP, ins->sreg2, ins->sreg1);
+ ARM_SDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
+ ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
break;
case OP_IREM_UN:
g_assert (v7s_supported);
- ARM_UDIV (code, ARMREG_IP, ins->sreg1, ins->sreg2);
- ARM_MLS (code, ins->dreg, ARMREG_IP, ins->sreg2, ins->sreg1);
+ ARM_UDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
+ ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
break;
case OP_DIV_IMM:
case OP_REM_IMM:
pos = 0;
prev_sp_offset = 0;
+ if (iphone_abi) {
+ /*
+ * The iphone uses R7 as the frame pointer, and it points at the saved
+ * r7+lr:
+ * <lr>
+ * r7 -> <r7>
+ * <rest of frame>
+ * We can't use r7 as a frame pointer since it points into the middle of
+ * the frame, so we keep using our own frame pointer.
+ * FIXME: Optimize this.
+ */
+ g_assert (darwin);
+ ARM_PUSH (code, (1 << ARMREG_R7) | (1 << ARMREG_LR));
+ ARM_MOV_REG_REG (code, ARMREG_R7, ARMREG_SP);
+ prev_sp_offset += 8; /* r7 and lr */
+ mono_emit_unwind_op_def_cfa_offset (cfg, code, prev_sp_offset);
+ mono_emit_unwind_op_offset (cfg, code, ARMREG_R7, (- prev_sp_offset) + 0);
+ }
+
if (!method->save_lmf) {
if (iphone_abi) {
- /*
- * The iphone uses R7 as the frame pointer, and it points at the saved
- * r7+lr:
- * <lr>
- * r7 -> <r7>
- * <rest of frame>
- * We can't use r7 as a frame pointer since it points into the middle of
- * the frame, so we keep using our own frame pointer.
- * FIXME: Optimize this.
- */
- g_assert (darwin);
- ARM_PUSH (code, (1 << ARMREG_R7) | (1 << ARMREG_LR));
- ARM_MOV_REG_REG (code, ARMREG_R7, ARMREG_SP);
- prev_sp_offset += 8; /* r7 and lr */
- mono_emit_unwind_op_def_cfa_offset (cfg, code, prev_sp_offset);
- mono_emit_unwind_op_offset (cfg, code, ARMREG_R7, (- prev_sp_offset) + 0);
-
/* No need to push LR again */
if (cfg->used_int_regs)
ARM_PUSH (code, cfg->used_int_regs);
reg_offset = 0;
for (i = 0; i < 16; ++i) {
if ((i > ARMREG_R3) && (i != ARMREG_SP) && (i != ARMREG_PC)) {
- mono_emit_unwind_op_offset (cfg, code, i, (- prev_sp_offset) + reg_offset);
+ /* The original r7 is saved at the start */
+ if (!(iphone_abi && i == ARMREG_R7))
+ mono_emit_unwind_op_offset (cfg, code, i, (- prev_sp_offset) + reg_offset);
reg_offset += 4;
}
}
- pos += sizeof (MonoLMF) - prev_sp_offset;
+ g_assert (reg_offset == 4 * 10);
+ pos += sizeof (MonoLMF) - (4 * 10);
lmf_offset = pos;
}
alloc_size += pos;
g_print ("Argument %d assigned to register %s\n", pos, mono_arch_regname (inst->dreg));
} else {
/* the argument should be put on the stack: FIXME handle size != word */
- if (ainfo->storage == RegTypeGeneral || ainfo->storage == RegTypeIRegPair) {
+ if (ainfo->storage == RegTypeGeneral || ainfo->storage == RegTypeIRegPair || ainfo->storage == RegTypeGSharedVtInReg) {
switch (ainfo->size) {
case 1:
if (arm_is_imm12 (inst->inst_offset))
ARM_LDR_IMM (code, ARMREG_LR, ARMREG_SP, (prev_sp_offset + ainfo->offset));
ARM_STR_IMM (code, ARMREG_LR, inst->inst_basereg, inst->inst_offset + 4);
ARM_STR_IMM (code, ARMREG_R3, inst->inst_basereg, inst->inst_offset);
- } else if (ainfo->storage == RegTypeBase) {
+ } else if (ainfo->storage == RegTypeBase || ainfo->storage == RegTypeGSharedVtOnStack) {
if (arm_is_imm12 (prev_sp_offset + ainfo->offset)) {
ARM_LDR_IMM (code, ARMREG_LR, ARMREG_SP, (prev_sp_offset + ainfo->offset));
} else {
sp_adj += 4;
reg ++;
}
+ if (iphone_abi)
+ /* Restored later */
+ regmask &= ~(1 << ARMREG_PC);
/* point sp at the registers to restore: 10 is 14 -4, because we skip r0-r3 */
code = emit_big_add (code, ARMREG_SP, cfg->frame_reg, cfg->stack_usage - lmf_offset + sp_adj);
/* restore iregs */
ARM_POP (code, regmask);
+ if (iphone_abi) {
+ /* Restore saved r7, restore LR to PC */
+ /* Skip lr from the lmf */
+ ARM_ADD_REG_IMM (code, ARMREG_SP, ARMREG_SP, sizeof (gpointer), 0);
+ ARM_POP (code, (1 << ARMREG_R7) | (1 << ARMREG_PC));
+ }
} else {
if ((i = mono_arm_is_rotated_imm8 (cfg->stack_usage, &rot_amount)) >= 0) {
ARM_ADD_REG_IMM (code, ARMREG_SP, cfg->frame_reg, i, rot_amount);
* reproduceable results for benchmarks */
#define MONO_ARCH_CODE_ALIGNMENT 32
-
/* Return value marshalling for calls between gsharedvt and normal code */
typedef enum {
GSHAREDVT_RET_NONE = 0,
- GSHAREDVT_RET_IREGS = 1,
- GSHAREDVT_RET_I1 = 5,
- GSHAREDVT_RET_U1 = 6,
- GSHAREDVT_RET_I2 = 7,
- GSHAREDVT_RET_U2 = 8
+ GSHAREDVT_RET_IREG = 1,
+ GSHAREDVT_RET_IREGS = 2,
+ GSHAREDVT_RET_I1 = 3,
+ GSHAREDVT_RET_U1 = 4,
+ GSHAREDVT_RET_I2 = 5,
+ GSHAREDVT_RET_U2 = 6
} GSharedVtRetMarshal;
typedef struct {
mono_arm_throw_exception_by_token (guint32 type_token, mgreg_t pc, mgreg_t sp, mgreg_t *int_regs, gdouble *fp_regs);
gpointer
-mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer *caller_regs, gpointer *callee_regs, gpointer mrgctx_reg) MONO_INTERNAL;
+mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer mrgctx_reg) MONO_INTERNAL;
typedef enum {
MONO_ARM_FPU_NONE = 0,
printf (" R%d", ((MonoInst*)ins->inst_p0)->dreg);
break;
case OP_REGOFFSET:
+ case OP_GSHAREDVT_ARG_REGOFFSET:
printf (" + 0x%lx", (long)ins->inst_offset);
break;
default:
mono_gdb_render_native_backtraces (pid_t crashed_pid)
{
const char *argv [5];
- char gdb_template [] = "/tmp/mono-gdb-commands.XXXXXX";
+ char template [] = "/tmp/mono-gdb-commands.XXXXXX";
+ FILE *commands;
+ gboolean using_lldb = FALSE;
argv [0] = g_find_program_in_path ("gdb");
- if (argv [0] == NULL) {
- return;
+ if (!argv [0]) {
+ argv [0] = g_find_program_in_path ("lldb");
+ using_lldb = TRUE;
}
- if (mkstemp (gdb_template) != -1) {
- FILE *gdb_commands = fopen (gdb_template, "w");
-
- fprintf (gdb_commands, "attach %ld\n", (long) crashed_pid);
- fprintf (gdb_commands, "info threads\n");
- fprintf (gdb_commands, "thread apply all bt\n");
+ if (argv [0] == NULL)
+ return;
- fflush (gdb_commands);
- fclose (gdb_commands);
+ if (mkstemp (template) == -1)
+ return;
+ commands = fopen (template, "w");
+ if (using_lldb) {
+ fprintf (commands, "process attach --pid %ld\n", (long) crashed_pid);
+ fprintf (commands, "script lldb.debugger.HandleCommand (\"thread list\")\n");
+ fprintf (commands, "script lldb.debugger.HandleCommand (\"thread backtrace all\")\n");
+ fprintf (commands, "detach\n");
+ fprintf (commands, "quit\n");
+ argv [1] = "--source";
+ argv [2] = template;
+ argv [3] = 0;
+
+ } else {
+ fprintf (commands, "attach %ld\n", (long) crashed_pid);
+ fprintf (commands, "info threads\n");
+ fprintf (commands, "thread apply all bt\n");
argv [1] = "-batch";
argv [2] = "-x";
- argv [3] = gdb_template;
+ argv [3] = template;
argv [4] = 0;
-
- execv (argv [0], (char**)argv);
-
- unlink (gdb_template);
}
+ fflush (commands);
+ fclose (commands);
+
+ execv (argv [0], (char**)argv);
+ unlink (template);
}
gboolean
gboolean err;
gpointer ip = MONO_CONTEXT_GET_IP (ctx);
MonoJitInfo *ji;
- MonoDomain *target_domain;
+ MonoDomain *target_domain = domain;
if (trace)
*trace = NULL;
static void
mono_class_unregister_image_generic_subclasses (MonoImage *image, gpointer user_data);
-static MonoType*
-mini_get_gsharedvt_alloc_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t);
-
static gboolean partial_supported;
static inline gboolean
case MONO_RGCTX_INFO_CAST_CACHE:
case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
case MONO_RGCTX_INFO_VALUE_SIZE:
- case MONO_RGCTX_INFO_CLASS_IS_REF: {
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+ case MONO_RGCTX_INFO_MEMCPY:
+ case MONO_RGCTX_INFO_BZERO:
+ case MONO_RGCTX_INFO_LOCAL_OFFSET:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
gpointer result = mono_class_inflate_generic_type_with_mempool (temporary ? NULL : class->image,
data, context, &error);
g_assert (mono_error_ok (&error)); /*FIXME proper error handling*/
g_assert (inflated_method->klass == inflated_class);
return inflated_method;
}
+ case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: {
+ MonoGSharedVtMethodInfo *info = data;
+ MonoGSharedVtMethodInfo *res;
+ int i;
+
+ // FIXME:
+ res = g_new0 (MonoGSharedVtMethodInfo, 1);
+ /*
+ res->nlocals = info->nlocals;
+ res->locals_types = g_new0 (MonoType*, info->nlocals);
+ for (i = 0; i < info->nlocals; ++i)
+ res->locals_types [i] = mono_class_inflate_generic_type (info->locals_types [i], context);
+ */
+ res->entries = g_ptr_array_new ();
+ for (i = 0; i < info->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (info->entries, i);
+ MonoRuntimeGenericContextInfoTemplate *template = g_new0 (MonoRuntimeGenericContextInfoTemplate, 1);
+
+ memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+ template->data = inflate_info (template, context, class, FALSE);
+ g_ptr_array_add (res->entries, template);
+ }
+ return res;
+ }
case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE:
case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT: {
MonoJumpInfoGSharedVtCall *info = data;
return GUINT_TO_POINTER (sizeof (gpointer));
else
return GUINT_TO_POINTER (mono_class_value_size (class, NULL));
- case MONO_RGCTX_INFO_CLASS_IS_REF:
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
if (MONO_TYPE_IS_REFERENCE (&class->byval_arg))
return GUINT_TO_POINTER (1);
+ else if (mono_class_is_nullable (class))
+ return GUINT_TO_POINTER (2);
else
return GUINT_TO_POINTER (0);
+ case MONO_RGCTX_INFO_MEMCPY:
+ case MONO_RGCTX_INFO_BZERO: {
+ static MonoMethod *memcpy_method [17];
+ static MonoMethod *bzero_method [17];
+ MonoJitDomainInfo *domain_info;
+ int size;
+ guint32 align;
+
+ domain_info = domain_jit_info (domain);
+
+ if (MONO_TYPE_IS_REFERENCE (&class->byval_arg)) {
+ size = sizeof (gpointer);
+ align = sizeof (gpointer);
+ } else {
+ size = mono_class_value_size (class, &align);
+ }
+
+ if (size != 1 && size != 2 && size != 4 && size != 8)
+ size = 0;
+ if (align < size)
+ size = 0;
+
+ if (info_type == MONO_RGCTX_INFO_MEMCPY) {
+ if (!memcpy_method [size]) {
+ MonoMethod *m;
+ char name [32];
+
+ if (size == 0)
+ sprintf (name, "memcpy");
+ else
+ sprintf (name, "memcpy_aligned_%d", size);
+ m = mono_class_get_method_from_name (mono_defaults.string_class, name, 3);
+ g_assert (m);
+ mono_memory_barrier ();
+ memcpy_method [size] = m;
+ }
+ if (!domain_info->memcpy_addr [size]) {
+ gpointer addr = mono_compile_method (memcpy_method [size]);
+ mono_memory_barrier ();
+ domain_info->memcpy_addr [size] = addr;
+ }
+ return domain_info->memcpy_addr [size];
+ } else {
+ if (!bzero_method [size]) {
+ MonoMethod *m;
+ char name [32];
+
+ if (size == 0)
+ sprintf (name, "bzero");
+ else
+ sprintf (name, "bzero_aligned_%d", size);
+ m = mono_class_get_method_from_name (mono_defaults.string_class, name, 2);
+ g_assert (m);
+ mono_memory_barrier ();
+ bzero_method [size] = m;
+ }
+ if (!domain_info->bzero_addr [size]) {
+ gpointer addr = mono_compile_method (bzero_method [size]);
+ mono_memory_barrier ();
+ domain_info->bzero_addr [size] = addr;
+ }
+ return domain_info->bzero_addr [size];
+ }
+ }
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
+ MonoMethod *method;
+ gpointer addr;
+ MonoJitInfo *ji;
+ MonoGenericContext *ctx;
+
+ if (!mono_class_is_nullable (class))
+ /* This can happen since all the entries in MonoGSharedVtMethodInfo are inflated, even those which are not used */
+ return NULL;
+
+ if (info_type == MONO_RGCTX_INFO_NULLABLE_CLASS_BOX)
+ method = mono_class_get_method_from_name (class, "Box", 1);
+ else
+ method = mono_class_get_method_from_name (class, "Unbox", 1);
+
+ addr = mono_compile_method (method);
+ // The caller uses the gsharedvt call signature
+ ji = mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (addr), NULL);
+ g_assert (ji);
+ if (mini_jit_info_is_gsharedvt (ji))
+ return mono_create_static_rgctx_trampoline (method, addr);
+ else {
+ MonoGenericSharingContext gsctx;
+ MonoMethodSignature *sig, *gsig;
+ MonoMethod *gmethod;
+
+ /* Need to add an out wrapper */
+
+ /* FIXME: We have no access to the gsharedvt signature/gsctx used by the caller, so have to construct it ourselves */
+ gmethod = mini_get_shared_method (method);
+ sig = mono_method_signature (method);
+ gsig = mono_method_signature (gmethod);
+ ctx = mono_method_get_context (gmethod);
+ mini_init_gsctx (ctx, &gsctx);
+
+ addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, &gsctx, -1, FALSE);
+ addr = mono_create_static_rgctx_trampoline (method, addr);
+ return addr;
+ }
+ }
default:
g_assert_not_reached ();
}
case MONO_RGCTX_INFO_CAST_CACHE:
case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
case MONO_RGCTX_INFO_VALUE_SIZE:
- case MONO_RGCTX_INFO_CLASS_IS_REF: {
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+ case MONO_RGCTX_INFO_MEMCPY:
+ case MONO_RGCTX_INFO_BZERO:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: {
MonoClass *arg_class = mono_class_from_mono_type (data);
free_inflated_info (oti->info_type, data);
gpointer addr;
addr = mono_compile_method (data);
- return mini_add_method_trampoline (NULL, data, addr, mono_method_needs_static_rgctx_invoke (data, FALSE));
+ return mini_add_method_trampoline (NULL, data, addr, mono_method_needs_static_rgctx_invoke (data, FALSE), FALSE);
}
#ifndef DISABLE_REMOTING
case MONO_RGCTX_INFO_REMOTING_INVOKE_WITH_CHECK:
gji = mono_jit_info_get_generic_jit_info (caller_ji);
g_assert (gji);
- addr = mini_get_gsharedvt_wrapper (FALSE, addr, sig, gsig, gji->generic_sharing_context, -1, TRUE);
+ addr = mini_get_gsharedvt_wrapper (FALSE, NULL, sig, gsig, gji->generic_sharing_context, -1, TRUE);
return addr;
}
return addr;
}
+ case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: {
+ MonoGSharedVtMethodInfo *info = data;
+ MonoGSharedVtMethodRuntimeInfo *res;
+ MonoType *t;
+ int i, offset, align, size;
+
+ // FIXME:
+ res = g_malloc0 (sizeof (MonoGSharedVtMethodRuntimeInfo) + (info->entries->len * sizeof (gpointer)));
+
+ offset = 0;
+ for (i = 0; i < info->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *template = g_ptr_array_index (info->entries, i);
+
+ switch (template->info_type) {
+ case MONO_RGCTX_INFO_LOCAL_OFFSET:
+ t = template->data;
+
+ size = mono_type_size (t, &align);
+
+ if (align < sizeof (gpointer))
+ align = sizeof (gpointer);
+ if (MONO_TYPE_ISSTRUCT (t) && align < 2 * sizeof (gpointer))
+ align = 2 * sizeof (gpointer);
+
+ // FIXME: Do the same things as alloc_stack_slots
+ offset += align - 1;
+ offset &= ~(align - 1);
+ res->entries [i] = GINT_TO_POINTER (offset);
+ offset += size;
+ break;
+ default:
+ res->entries [i] = instantiate_info (domain, template, context, class, NULL);
+ break;
+ }
+ }
+ res->locals_size = offset;
+
+ return res;
+ }
default:
g_assert_not_reached ();
}
case MONO_RGCTX_INFO_TYPE: return "TYPE";
case MONO_RGCTX_INFO_REFLECTION_TYPE: return "REFLECTION_TYPE";
case MONO_RGCTX_INFO_METHOD: return "METHOD";
+ case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO: return "GSHAREDVT_INFO";
case MONO_RGCTX_INFO_GENERIC_METHOD_CODE: return "GENERIC_METHOD_CODE";
case MONO_RGCTX_INFO_CLASS_FIELD: return "CLASS_FIELD";
case MONO_RGCTX_INFO_METHOD_RGCTX: return "METHOD_RGCTX";
case MONO_RGCTX_INFO_CAST_CACHE: return "CAST_CACHE";
case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE: return "ARRAY_ELEMENT_SIZE";
case MONO_RGCTX_INFO_VALUE_SIZE: return "VALUE_SIZE";
- case MONO_RGCTX_INFO_CLASS_IS_REF: return "CLASS_IS_REF";
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE: return "CLASS_BOX_TYPE";
case MONO_RGCTX_INFO_FIELD_OFFSET: return "FIELD_OFFSET";
case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE: return "METHOD_GSHAREDVT_OUT_TRAMPOLINE";
case MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT: return "METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT";
case MONO_RGCTX_INFO_SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI: return "SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI";
+ case MONO_RGCTX_INFO_MEMCPY: return "MEMCPY";
+ case MONO_RGCTX_INFO_BZERO: return "BZERO";
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX: return "NULLABLE_CLASS_BOX";
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX: return "NULLABLE_CLASS_UNBOX";
default:
return "<UNKNOWN RGCTX INFO TYPE>";
}
case MONO_RGCTX_INFO_CAST_CACHE:
case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
case MONO_RGCTX_INFO_VALUE_SIZE:
- case MONO_RGCTX_INFO_CLASS_IS_REF:
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+ case MONO_RGCTX_INFO_MEMCPY:
+ case MONO_RGCTX_INFO_BZERO:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX:
return mono_class_from_mono_type (data1) == mono_class_from_mono_type (data2);
case MONO_RGCTX_INFO_METHOD:
+ case MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO:
case MONO_RGCTX_INFO_GENERIC_METHOD_CODE:
case MONO_RGCTX_INFO_CLASS_FIELD:
case MONO_RGCTX_INFO_FIELD_OFFSET:
return FALSE;
}
+/*
+ * mini_rgctx_info_type_to_patch_info_type:
+ *
+ * Return the type of the runtime object referred to by INFO_TYPE.
+ */
+MonoJumpInfoType
+mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type)
+{
+ switch (info_type) {
+ case MONO_RGCTX_INFO_STATIC_DATA:
+ case MONO_RGCTX_INFO_KLASS:
+ case MONO_RGCTX_INFO_VTABLE:
+ case MONO_RGCTX_INFO_TYPE:
+ case MONO_RGCTX_INFO_REFLECTION_TYPE:
+ case MONO_RGCTX_INFO_CAST_CACHE:
+ case MONO_RGCTX_INFO_ARRAY_ELEMENT_SIZE:
+ case MONO_RGCTX_INFO_VALUE_SIZE:
+ case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
+ case MONO_RGCTX_INFO_MEMCPY:
+ case MONO_RGCTX_INFO_BZERO:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_BOX:
+ case MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX:
+ case MONO_RGCTX_INFO_LOCAL_OFFSET:
+ return MONO_PATCH_INFO_CLASS;
+ case MONO_RGCTX_INFO_FIELD_OFFSET:
+ return MONO_PATCH_INFO_FIELD;
+ default:
+ g_assert_not_reached ();
+ return -1;
+ }
+}
+
static int
lookup_or_register_info (MonoClass *class, int type_argc, gpointer data, MonoRgctxInfoType info_type,
MonoGenericContext *generic_context)
g_assert (gsctx);
*/
if (!type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) && mini_is_gsharedvt_type_gsctx (gsctx, type))
- return mini_get_gsharedvt_alloc_type_gsctx (gsctx, type);
+ return type;
else
return mono_type_get_basic_type_from_generic (type);
}
{
if (type->byref)
return &mono_defaults.int_class->byval_arg;
+ if (!type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) && mini_is_gsharedvt_type_gsctx (gsctx, type))
+ return type;
return mini_get_basic_type_from_generic (gsctx, mono_type_get_underlying_type (type));
}
g_assert (gsctx);
*/
- if (mini_is_gsharedvt_type_gsctx (gsctx, t))
- t = mini_get_gsharedvt_alloc_type_gsctx (gsctx, t);
+ //g_assert (!mini_is_gsharedvt_type_gsctx (gsctx, t));
if (pinvoke) {
size = mono_type_native_stack_size (t, align);
return FALSE;
}
-static MonoType*
-mini_get_gsharedvt_alloc_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t)
-{
- return NULL;
-}
-
-MonoType*
-mini_get_gsharedvt_alloc_type_for_type (MonoCompile *cfg, MonoType *t)
-{
- return NULL;
-}
-
gboolean
mini_is_gsharedvt_sharable_method (MonoMethod *method)
{
#include <llvm/ExecutionEngine/JITMemoryManager.h>
#include <llvm/ExecutionEngine/JITEventListener.h>
#include <llvm/Target/TargetOptions.h>
-#include <llvm/Target/TargetData.h>
#include <llvm/Target/TargetRegisterInfo.h>
#include <llvm/Analysis/Verifier.h>
#include <llvm/Analysis/Passes.h>
#include <llvm/CodeGen/MachineFunctionPass.h>
#include <llvm/CodeGen/MachineFunction.h>
#include <llvm/CodeGen/MachineFrameInfo.h>
+#include <llvm/IR/Function.h>
+#include <llvm/IR/IRBuilder.h>
+#include <llvm/IR/Module.h>
//#include <llvm/LinkAllPasses.h>
#include "llvm-c/Core.h"
return NULL;
}
- virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID) {
+ virtual uint8_t* allocateDataSection(uintptr_t, unsigned int, unsigned int, bool) {
// FIXME:
assert(0);
return NULL;
}
+ virtual bool applyPermissions(std::string*) {
+ // FIXME:
+ assert(0);
+ return false;
+ }
+
virtual void* getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure) {
void *res;
char *err;
(void) llvm::createLCSSAPass();
(void) llvm::createLICMPass();
(void) llvm::createLazyValueInfoPass();
- (void) llvm::createLoopDependenceAnalysisPass();
+ //(void) llvm::createLoopDependenceAnalysisPass();
/*
(void) llvm::createLoopExtractorPass();
*/
fpm = new FunctionPassManager (unwrap (MP));
- fpm->add(new TargetData(*EE->getTargetData()));
+ fpm->add(new DataLayout(*EE->getDataLayout()));
PassRegistry &Registry = *PassRegistry::getPassRegistry();
initializeCore(Registry);
//initializeInstrumentation(Registry);
initializeTarget(Registry);
- llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "", false);
+ llvm::cl::ParseEnvironmentOptions("mono", "MONO_LLVM", "");
if (PassList.size() > 0) {
/* Use the passes specified by the env variable */
}
} else {
/* Use the same passes used by 'opt' by default, without the ipo passes */
- const char *opts = "-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -basiccg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify";
+ const char *opts = "-simplifycfg -domtree -domfrontier -scalarrepl -instcombine -simplifycfg -domtree -domfrontier -scalarrepl -simplify-libcalls -instcombine -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -domfrontier -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-deletion -loop-simplify -lcssa -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt -sccp -instcombine -domtree -memdep -dse -adce -gvn -simplifycfg -preverify -domtree -verify";
char **args;
int i;
args = g_strsplit (opts, " ", 1000);
for (i = 0; args [i]; i++)
;
- llvm::cl::ParseCommandLineOptions (i, args, "", false);
+ llvm::cl::ParseCommandLineOptions (i, args, "");
g_strfreev (args);
for (unsigned i = 0; i < PassList.size(); ++i) {
if (PassInf->getNormalCtor())
P = PassInf->getNormalCtor()();
+ g_assert (P->getPassKind () == llvm::PT_Function || P->getPassKind () == llvm::PT_Loop);
fpm->add (P);
}
case MONO_TYPE_VAR:
case MONO_TYPE_MVAR:
/* Because of generic sharing */
- if (mini_type_var_is_vt (ctx->cfg, t))
- return type_to_llvm_type (ctx, mini_get_gsharedvt_alloc_type_for_type (ctx->cfg, t));
- else
- return IntPtrType ();
+ return IntPtrType ();
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (t))
return IntPtrType ();
module = ctx->module = ctx->lmodule->module;
+ if (cfg->gsharedvt)
+ LLVM_FAILURE (ctx, "gsharedvt");
+
#if 1
{
static int count = 0;
}
g_free (names);
+ if (cfg->compile_aot) {
+ LLVMValueRef md_args [16];
+ LLVMValueRef md_node;
+ int method_index;
+
+ method_index = mono_aot_get_method_index (cfg->orig_method);
+ md_args [0] = LLVMMDString (method_name, strlen (method_name));
+ md_args [1] = LLVMConstInt (LLVMInt32Type (), method_index, FALSE);
+ md_node = LLVMMDNode (md_args, 2);
+ LLVMAddNamedMetadataOperand (module, "mono.function_indexes", md_node);
+ //LLVMSetMetadata (method, md_kind, LLVMMDNode (&md_arg, 1));
+ }
+
max_block_num = 0;
for (bb = cfg->bb_entry; bb; bb = bb->next_bb)
max_block_num = MAX (max_block_num, bb->block_num);
LLVMValueRef personality;
personality = LLVMAddFunction (aot_module.module, "mono_aot_personality", LLVMFunctionType (LLVMVoidType (), NULL, 0, FALSE));
- LLVMSetLinkage (personality, LLVMPrivateLinkage);
+ LLVMSetLinkage (personality, LLVMInternalLinkage);
lbb = LLVMAppendBasicBlock (personality, "BB0");
lbuilder = LLVMCreateBuilder ();
LLVMPositionBuilderAtEnd (lbuilder, lbb);
MINI_OP(OP_LCOMPARE_IMM, "lcompare_imm", NONE, LREG, NONE)
MINI_OP(OP_LOCAL, "local", NONE, NONE, NONE)
MINI_OP(OP_ARG, "arg", NONE, NONE, NONE)
+/* inst_imm contains the local index */
+MINI_OP(OP_GSHAREDVT_LOCAL, "gsharedvt_local", NONE, NONE, NONE)
+MINI_OP(OP_GSHAREDVT_ARG_REGOFFSET, "gsharedvt_arg_regoffset", NONE, NONE, NONE)
/*
* Represents passing a valuetype argument which has not been decomposed yet.
* inst_p0 points to the call.
/* arch-dep tls access */
MINI_OP(OP_TLS_GET, "tls_get", IREG, NONE, NONE)
+MINI_OP(OP_TLS_GET_REG, "tls_get_reg", IREG, IREG, NONE)
MINI_OP(OP_LOAD_GOTADDR, "load_gotaddr", IREG, NONE, NONE)
MINI_OP(OP_DUMMY_USE, "dummy_use", NONE, IREG, NONE)
#ifdef ENABLE_LLVM
MINI_OP(OP_LLVM_OUTARG_VT, "llvm_outarg_vt", IREG, VREG, NONE)
#endif
+
}
ppc_mr (code, ppc_sp, ppc_r11);
- mono_add_patch_info (cfg, (guint8*) code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+ mono_add_patch_info (cfg, (guint8*) code - cfg->native_code, MONO_PATCH_INFO_METHOD_JUMP, call->method);
if (cfg->compile_aot) {
/* arch_emit_got_access () patches this */
ppc_load32 (code, ppc_r0, 0);
#define mono_trampolines_unlock() LeaveCriticalSection (&trampolines_mutex)
static CRITICAL_SECTION trampolines_mutex;
-static gpointer
-get_unbox_trampoline (MonoMethod *m, gpointer addr, gboolean need_rgctx_tramp)
-{
- if (mono_aot_only) {
- if (need_rgctx_tramp)
- /*
- * The unbox trampolines call the method directly, so need to add
- * an rgctx tramp before them.
- */
- return mono_create_static_rgctx_trampoline (m, mono_aot_get_unbox_trampoline (m));
- else
- return mono_aot_get_unbox_trampoline (m);
- } else {
- unbox_trampolines ++;
- return mono_arch_get_unbox_trampoline (m, addr);
- }
-}
-
#ifdef MONO_ARCH_GSHARED_SUPPORTED
typedef struct {
return TRUE;
return FALSE;
}
-static gboolean
-ji_is_gsharedvt (MonoJitInfo *ji)
+
+gboolean
+mini_jit_info_is_gsharedvt (MonoJitInfo *ji)
{
if (ji && ji->has_generic_jit_info && (mono_jit_info_get_generic_sharing_context (ji)->var_is_vt ||
mono_jit_info_get_generic_sharing_context (ji)->mvar_is_vt))
/*
* mini_add_method_trampoline:
*
- * Add static rgctx/gsharedvt_in trampoline to M/COMPILED_METHOD if needed. Return the trampoline address, or
+ * Add static rgctx/gsharedvt_in/unbox trampolines to M/COMPILED_METHOD if needed. Return the trampoline address, or
* COMPILED_METHOD if no trampoline is needed.
* ORIG_METHOD is the method the caller originally called i.e. an iface method, or NULL.
*/
gpointer
-mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp)
+mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp)
{
gpointer addr = compiled_method;
gboolean callee_gsharedvt, callee_array_helper;
mini_jit_info_table_find (mono_domain_get (), mono_get_addr_from_ftnptr (compiled_method), NULL);
// FIXME: This loads information from AOT
- callee_gsharedvt = ji_is_gsharedvt (ji);
+ callee_gsharedvt = mini_jit_info_is_gsharedvt (ji);
callee_array_helper = FALSE;
if (m->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED) {
addr = compiled_method;
+ if (add_unbox_tramp) {
+ /*
+ * The unbox trampolines call the method directly, so need to add
+ * an rgctx tramp before them.
+ */
+ if (mono_aot_only) {
+ addr = mono_aot_get_unbox_trampoline (m);
+ } else {
+ unbox_trampolines ++;
+ addr = mono_arch_get_unbox_trampoline (m, addr);
+ }
+ }
+
if (callee_gsharedvt && mini_is_gsharedvt_variable_signature (mono_method_signature (ji->method))) {
MonoGenericSharingContext *gsctx;
MonoMethodSignature *sig, *gsig;
sig = mono_method_signature (m);
gsig = mono_method_signature (ji->method);
- addr = mini_get_gsharedvt_wrapper (TRUE, compiled_method, sig, gsig, gsctx, -1, FALSE);
+ addr = mini_get_gsharedvt_wrapper (TRUE, addr, sig, gsig, gsctx, -1, FALSE);
//printf ("IN: %s\n", mono_method_full_name (m, TRUE));
}
{
gpointer addr, compiled_method;
gboolean generic_shared = FALSE;
+ gboolean need_unbox_tramp = FALSE;
MonoMethod *declaring = NULL;
MonoMethod *generic_virtual = NULL, *variant_iface = NULL, *orig_method = NULL;
int context_used;
mono_debugger_trampoline_compiled (code, m, addr);
- addr = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp);
+ if (generic_virtual || variant_iface) {
+ if (vt->klass->valuetype) /*FIXME is this required variant iface?*/
+ need_unbox_tramp = TRUE;
+ } else if (orig_vtable_slot) {
+ if (m->klass->valuetype)
+ need_unbox_tramp = TRUE;
+ }
+
+ addr = mini_add_method_trampoline (orig_method, m, compiled_method, need_rgctx_tramp, need_unbox_tramp);
if (generic_virtual || variant_iface) {
MonoMethod *target = generic_virtual ? generic_virtual : variant_iface;
vtable_slot = orig_vtable_slot;
g_assert (vtable_slot);
- if (vt->klass->valuetype) /*FIXME is this required variant iface?*/
- addr = get_unbox_trampoline (m, addr, need_rgctx_tramp);
-
mono_method_add_generic_virtual_invocation (mono_domain_get (),
vt, vtable_slot,
target, addr);
vtable_slot = orig_vtable_slot;
if (vtable_slot) {
- if (m->klass->valuetype)
- addr = get_unbox_trampoline (m, addr, need_rgctx_tramp);
-
if (vtable_slot_to_patch && (mono_aot_is_got_entry (code, (guint8*)vtable_slot_to_patch) || mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot_to_patch))) {
g_assert (*vtable_slot_to_patch);
*vtable_slot_to_patch = mono_get_addr_from_ftnptr (addr);
#ifndef DISABLE_REMOTING
if (delegate->target && delegate->target->vtable->klass == mono_defaults.transparent_proxy_class) {
#ifndef DISABLE_COM
- if (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class != mono_defaults.com_object_class &&
+ if (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class != mono_class_get_com_object_class () &&
!mono_class_is_com_object (((MonoTransparentProxy *)delegate->target)->remote_class->proxy_class))
#endif
method = mono_marshal_get_remoting_invoke (method);
delegate->method_ptr = *delegate->method_code;
} else {
compiled_method = addr = mono_compile_method (method);
- if (need_unbox_tramp)
- // FIXME: GSHAREDVT
- addr = get_unbox_trampoline (method, addr, need_rgctx_tramp);
- else
- addr = mini_add_method_trampoline (NULL, method, compiled_method, need_rgctx_tramp);
+ addr = mini_add_method_trampoline (NULL, method, compiled_method, need_rgctx_tramp, need_unbox_tramp);
delegate->method_ptr = addr;
if (enable_caching && delegate->method_code)
*delegate->method_code = delegate->method_ptr;
/* The general, unoptimized case */
m = mono_marshal_get_delegate_invoke (invoke, delegate);
code = mono_compile_method (m);
- code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE));
+ code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
mono_debugger_trampoline_compiled (NULL, m, delegate->invoke_impl);
ArgValuetypeInReg,
ArgOnFloatFpStack,
ArgOnDoubleFpStack,
+ /* gsharedvt argument passed by addr */
+ ArgGSharedVt,
ArgNone
} ArgStorage;
if (*gr >= PARAM_REGS) {
ainfo->storage = ArgOnStack;
+ ainfo->nslots = 1;
(*stack_size) += sizeof (gpointer);
}
else {
cinfo->ret.reg = X86_EAX;
break;
}
+ if (mini_is_gsharedvt_type_gsctx (gsctx, ret_type)) {
+ cinfo->ret.storage = ArgOnStack;
+ cinfo->vtype_retaddr = TRUE;
+ break;
+ }
/* Fall through */
case MONO_TYPE_VALUETYPE:
case MONO_TYPE_TYPEDBYREF: {
}
break;
}
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ g_assert (mini_is_gsharedvt_type_gsctx (gsctx, ret_type));
+ cinfo->ret.storage = ArgOnStack;
+ cinfo->vtype_retaddr = TRUE;
+ break;
case MONO_TYPE_VOID:
cinfo->ret.storage = ArgNone;
break;
add_general (&gr, &stack_size, ainfo);
break;
}
+ if (mini_is_gsharedvt_type_gsctx (gsctx, ptype)) {
+ /* gsharedvt arguments are passed by ref */
+ add_general (&gr, &stack_size, ainfo);
+ g_assert (ainfo->storage == ArgOnStack);
+ ainfo->storage = ArgGSharedVt;
+ break;
+ }
/* Fall through */
case MONO_TYPE_VALUETYPE:
case MONO_TYPE_TYPEDBYREF:
case MONO_TYPE_R8:
add_float (&fr, &stack_size, ainfo, TRUE);
break;
+ case MONO_TYPE_VAR:
+ case MONO_TYPE_MVAR:
+ /* gsharedvt arguments are passed by ref */
+ g_assert (mini_is_gsharedvt_type_gsctx (gsctx, ptype));
+ add_general (&gr, &stack_size, ainfo);
+ g_assert (ainfo->storage == ArgOnStack);
+ ainfo->storage = ArgGSharedVt;
+ break;
default:
g_error ("unexpected type 0x%x", ptype->type);
g_assert_not_reached ();
linfo->args [i].pair_storage [j] = arg_storage_to_llvm_arg_storage (cfg, ainfo->pair_storage [j]);
*/
break;
+ case ArgGSharedVt:
+ linfo->args [i].storage = LLVMArgGSharedVt;
+ break;
default:
cfg->exception_message = g_strdup ("ainfo->storage");
cfg->disable_llvm = TRUE;
g_assert (in->dreg != -1);
- if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
+ if (ainfo->storage == ArgGSharedVt) {
+ arg->opcode = OP_OUTARG_VT;
+ arg->sreg1 = in->dreg;
+ arg->klass = in->klass;
+ sp_offset += 4;
+ MONO_ADD_INS (cfg->cbb, arg);
+ } else if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(t))) {
guint32 align;
guint32 size;
MonoInst *arg;
int size = ins->backend.size;
- if (size <= 4) {
+ if (cfg->gsharedvt && mini_is_gsharedvt_klass (cfg, ins->klass)) {
+ /* Pass by addr */
+ MONO_INST_NEW (cfg, arg, OP_X86_PUSH);
+ arg->sreg1 = src->dreg;
+ MONO_ADD_INS (cfg->cbb, arg);
+ } else if (size <= 4) {
MONO_INST_NEW (cfg, arg, OP_X86_PUSH_MEMBASE);
arg->sreg1 = src->dreg;
/* restore ESP/EBP */
x86_leave (code);
offset = code - cfg->native_code;
- mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD_JUMP, ins->inst_p0);
+ mono_add_patch_info (cfg, offset, MONO_PATCH_INFO_METHOD_JUMP, call->method);
x86_jump32 (code, 0);
ins->flags |= MONO_INST_GC_CALLSITE;
code = mono_x86_emit_tls_get (code, ins->dreg, ins->inst_offset);
break;
}
+ case OP_TLS_GET_REG: {
+#ifdef __APPLE__
+ // FIXME: tls_gs_offset can change too, do these when calculating the tls offset
+ if (ins->dreg != ins->sreg1)
+ x86_mov_reg_reg (code, ins->dreg, ins->sreg1, sizeof (gpointer));
+ x86_shift_reg_imm (code, X86_SHL, ins->dreg, 2);
+ if (tls_gs_offset)
+ x86_alu_reg_imm (code, X86_ADD, ins->dreg, tls_gs_offset);
+ x86_prefix (code, X86_GS_PREFIX);
+ x86_mov_reg_membase (code, ins->dreg, ins->dreg, 0, sizeof (gpointer));
+#else
+ g_assert_not_reached ();
+#endif
+ break;
+ }
case OP_MEMORY_BARRIER: {
/* x86 only needs barrier for StoreLoad and FullBarrier */
switch (ins->backend.memory_barrier_kind) {
#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
#define MONO_ARCH_GSHAREDVT_SUPPORTED 1
+#ifdef TARGET_OSX
+#define MONO_ARCH_HAVE_TLS_GET_REG 1
+#endif
+
gboolean
mono_x86_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignature *callee_sig) MONO_INTERNAL;
GSHAREDVT_RET_I1 = 5,
GSHAREDVT_RET_U1 = 6,
GSHAREDVT_RET_I2 = 7,
- GSHAREDVT_RET_U2 = 8
+ GSHAREDVT_RET_U2 = 8,
+ GSHAREDVT_RET_IREG = 9
} GSharedVtRetMarshal;
typedef struct {
#include <ctype.h>
#include "trace.h"
#include "version.h"
+#include "ir-emit.h"
#include "jit-icalls.h"
* mono_tramp_info_create:
*
* Create a MonoTrampInfo structure from the arguments. This function assumes ownership
- * of NAME, JI, and UNWIND_OPS.
+ * of JI, and UNWIND_OPS.
*/
MonoTrampInfo*
mono_tramp_info_create (const char *name, guint8 *code, guint32 code_size, MonoJumpInfo *ji, GSList *unwind_ops)
{
MonoTrampInfo *info = g_new0 (MonoTrampInfo, 1);
- info->name = (char*)name;
+ info->name = g_strdup ((char*)name);
info->code = code;
info->code_size = code_size;
info->ji = ji;
t = mono_type_get_underlying_type (inst->inst_vtype);
if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
- t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+ continue;
/* inst->backend.is_pinvoke indicates native sized value types, this is used by the
* pinvoke wrappers when they call functions returning structures */
t = mono_type_get_underlying_type (inst->inst_vtype);
if (cfg->gsharedvt && mini_is_gsharedvt_variable_type (cfg, t))
- t = mini_get_gsharedvt_alloc_type_for_type (cfg, t);
+ continue;
/* inst->backend.is_pinvoke indicates native sized value types, this is used by the
* pinvoke wrappers when they call functions returning structures */
}
}
+int
+mini_get_tls_offset (MonoJitTlsKey key)
+{
+ int offset;
+
+ switch (key) {
+ case TLS_KEY_THREAD:
+ offset = mono_thread_get_tls_offset ();
+ break;
+ case TLS_KEY_JIT_TLS:
+ offset = mono_get_jit_tls_offset ();
+ break;
+ case TLS_KEY_DOMAIN:
+ offset = mono_domain_get_tls_offset ();
+ break;
+ case TLS_KEY_LMF:
+ offset = mono_get_lmf_tls_offset ();
+ break;
+ default:
+ g_assert_not_reached ();
+ offset = -1;
+ break;
+ }
+ return offset;
+}
+
static MonoInst*
-mono_create_tls_get (MonoCompile *cfg, int offset)
+mono_create_tls_get_offset (MonoCompile *cfg, int offset)
{
-#ifdef MONO_ARCH_HAVE_TLS_GET
- if (MONO_ARCH_HAVE_TLS_GET) {
- MonoInst* ins;
+ MonoInst* ins;
- if (offset == -1)
- return NULL;
+ if (!MONO_ARCH_HAVE_TLS_GET)
+ return NULL;
+
+ if (offset == -1)
+ return NULL;
- MONO_INST_NEW (cfg, ins, OP_TLS_GET);
+ MONO_INST_NEW (cfg, ins, OP_TLS_GET);
+ ins->dreg = mono_alloc_preg (cfg);
+ ins->inst_offset = offset;
+ return ins;
+}
+
+static MonoInst*
+mono_create_tls_get (MonoCompile *cfg, MonoJitTlsKey key)
+{
+ /*
+ * TLS offsets might be different at AOT time, so load them from a GOT slot and
+ * use a different opcode.
+ */
+ if (cfg->compile_aot && MONO_ARCH_HAVE_TLS_GET && ARCH_HAVE_TLS_GET_REG) {
+ MonoInst *ins, *c;
+
+ EMIT_NEW_TLS_OFFSETCONST (cfg, c, key);
+ MONO_INST_NEW (cfg, ins, OP_TLS_GET_REG);
ins->dreg = mono_alloc_preg (cfg);
- ins->inst_offset = offset;
+ ins->sreg1 = c->dreg;
return ins;
}
-#endif
- return NULL;
+
+ return mono_create_tls_get_offset (cfg, mini_get_tls_offset (key));
}
MonoInst*
mono_get_jit_tls_intrinsic (MonoCompile *cfg)
{
- return mono_create_tls_get (cfg, mono_get_jit_tls_offset ());
+ return mono_create_tls_get (cfg, TLS_KEY_JIT_TLS);
}
MonoInst*
mono_get_domain_intrinsic (MonoCompile* cfg)
{
- return mono_create_tls_get (cfg, mono_domain_get_tls_offset ());
+ return mono_create_tls_get (cfg, TLS_KEY_DOMAIN);
}
MonoInst*
mono_get_thread_intrinsic (MonoCompile* cfg)
{
- return mono_create_tls_get (cfg, mono_thread_get_tls_offset ());
+ return mono_create_tls_get (cfg, TLS_KEY_THREAD);
}
MonoInst*
mono_get_lmf_intrinsic (MonoCompile* cfg)
{
- return mono_create_tls_get (cfg, mono_get_lmf_tls_offset ());
+ return mono_create_tls_get (cfg, TLS_KEY_LMF);
}
void
res->data.gsharedvt = mono_mempool_alloc (mp, sizeof (MonoJumpInfoGSharedVtCall));
memcpy (res->data.gsharedvt, patch_info->data.gsharedvt, sizeof (MonoJumpInfoGSharedVtCall));
break;
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+ MonoGSharedVtMethodInfo *info;
+ MonoGSharedVtMethodInfo *oinfo;
+ int i;
+
+ oinfo = patch_info->data.gsharedvt_method;
+ info = mono_mempool_alloc (mp, sizeof (MonoGSharedVtMethodInfo));
+ res->data.gsharedvt_method = info;
+ memcpy (info, oinfo, sizeof (MonoGSharedVtMethodInfo));
+ info->entries = g_ptr_array_new ();
+ if (oinfo->entries) {
+ for (i = 0; i < oinfo->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (oinfo->entries, i);
+ MonoRuntimeGenericContextInfoTemplate *template = mono_mempool_alloc0 (mp, sizeof (MonoRuntimeGenericContextInfoTemplate));
+
+ memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+ g_ptr_array_add (info->entries, template);
+ }
+ }
+ //info->locals_types = mono_mempool_alloc0 (mp, info->nlocals * sizeof (MonoType*));
+ //memcpy (info->locals_types, oinfo->locals_types, info->nlocals * sizeof (MonoType*));
+ break;
+ }
default:
break;
}
case MONO_PATCH_INFO_METHOD_RGCTX:
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
case MONO_PATCH_INFO_SIGNATURE:
+ case MONO_PATCH_INFO_TLS_OFFSET:
return (ji->type << 8) | (gssize)ji->data.target;
case MONO_PATCH_INFO_GSHAREDVT_CALL:
return (ji->type << 8) | (gssize)ji->data.gsharedvt->method;
case MONO_PATCH_INFO_MONITOR_ENTER:
case MONO_PATCH_INFO_MONITOR_EXIT:
case MONO_PATCH_INFO_CASTCLASS_CACHE:
+ case MONO_PATCH_INFO_GOT_OFFSET:
return (ji->type << 8);
case MONO_PATCH_INFO_SWITCH:
return (ji->type << 8) | ji->data.table->table_size;
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD:
+ return (ji->type << 8) | (gssize)ji->data.gsharedvt_method->method;
default:
printf ("info type: %d\n", ji->type);
mono_print_ji (ji); printf ("\n");
return c1->sig == c2->sig && c1->method == c2->method;
}
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD:
+ return ji1->data.gsharedvt_method->method == ji2->data.gsharedvt_method->method;
default:
if (ji1->data.target != ji2->data.target)
return 0;
slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, entry->data->data.sig, entry->info_type, mono_method_get_context (entry->method));
break;
case MONO_PATCH_INFO_GSHAREDVT_CALL: {
- MonoJumpInfoGSharedVtCall *call_info = mono_domain_alloc0 (domain, sizeof (MonoJumpInfoGSharedVtCall));
+ MonoJumpInfoGSharedVtCall *call_info = g_malloc0 (sizeof (MonoJumpInfoGSharedVtCall)); //mono_domain_alloc0 (domain, sizeof (MonoJumpInfoGSharedVtCall));
memcpy (call_info, entry->data->data.gsharedvt, sizeof (MonoJumpInfoGSharedVtCall));
slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, call_info, entry->info_type, mono_method_get_context (entry->method));
break;
}
+ case MONO_PATCH_INFO_GSHAREDVT_METHOD: {
+ MonoGSharedVtMethodInfo *info;
+ MonoGSharedVtMethodInfo *oinfo = entry->data->data.gsharedvt_method;
+ int i;
+
+ /* Make a copy into the domain mempool */
+ info = g_malloc0 (sizeof (MonoGSharedVtMethodInfo)); //mono_domain_alloc0 (domain, sizeof (MonoGSharedVtMethodInfo));
+ info->method = oinfo->method;
+ info->entries = g_ptr_array_new ();
+ for (i = 0; i < oinfo->entries->len; ++i) {
+ MonoRuntimeGenericContextInfoTemplate *otemplate = g_ptr_array_index (oinfo->entries, i);
+ MonoRuntimeGenericContextInfoTemplate *template = g_malloc0 (sizeof (MonoRuntimeGenericContextInfoTemplate));
+
+ memcpy (template, otemplate, sizeof (MonoRuntimeGenericContextInfoTemplate));
+ g_ptr_array_add (info->entries, template);
+ }
+ slot = mono_method_lookup_or_register_info (entry->method, entry->in_mrgctx, info, entry->info_type, mono_method_get_context (entry->method));
+ break;
+ }
default:
g_assert_not_reached ();
break;
target = (gpointer) (size_t) mono_jit_tls_id;
break;
}
+ case MONO_PATCH_INFO_TLS_OFFSET:
+ target = GINT_TO_POINTER (mini_get_tls_offset (GPOINTER_TO_INT (patch_info->data.target)));
+ break;
default:
g_assert_not_reached ();
}
}
}
- info->compiled_method = mini_add_method_trampoline (NULL, method, info->compiled_method, mono_method_needs_static_rgctx_invoke (method, FALSE));
+ info->compiled_method = mini_add_method_trampoline (NULL, method, info->compiled_method, mono_method_needs_static_rgctx_invoke (method, FALSE), FALSE);
}
/*
#endif
#endif
-#ifdef MONO_ARCH_HAVE_TLS_GET
mono_runtime_set_has_tls_get (MONO_ARCH_HAVE_TLS_GET);
-#else
- mono_runtime_set_has_tls_get (FALSE);
-#endif
if (!global_codeman)
global_codeman = mono_code_manager_new ();
register_icall (mono_resume_unwind, "mono_resume_unwind", "void", TRUE);
register_icall (mono_object_tostring_gsharedvt, "mono_object_tostring_gsharedvt", "object ptr ptr ptr", TRUE);
register_icall (mono_object_gethashcode_gsharedvt, "mono_object_gethashcode_gsharedvt", "int ptr ptr ptr", TRUE);
+ register_icall (mono_object_equals_gsharedvt, "mono_object_equals_gsharedvt", "int ptr ptr ptr object", TRUE);
+ register_icall (mono_gsharedvt_value_copy, "mono_gsharedvt_value_copy", "void ptr ptr ptr", TRUE);
register_icall (mono_gc_wbarrier_value_copy_bitmap, "mono_gc_wbarrier_value_copy_bitmap", "void ptr ptr int int", FALSE);
#endif
/* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 89
+#define MONO_AOT_FILE_VERSION 90
//TODO: This is x86/amd64 specific.
#define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
GHashTable *arch_seq_points;
/* Maps a GSharedVtTrampInfo structure to a trampoline address */
GHashTable *gsharedvt_arg_tramp_hash;
+ /* memcpy/bzero methods specialized for small constant sizes */
+ gpointer *memcpy_addr [17];
+ gpointer *bzero_addr [17];
} MonoJitDomainInfo;
typedef struct {
LLVMArgInFPReg,
LLVMArgVtypeInReg,
LLVMArgVtypeByVal,
- LLVMArgVtypeRetAddr /* On on cinfo->ret */
+ LLVMArgVtypeRetAddr, /* On on cinfo->ret */
+ LLVMArgGSharedVt,
} LLVMArgStorage;
typedef struct {
gboolean orig_ex_ctx_set;
} MonoJitTlsData;
+/* TLS entries used by JITted code */
+typedef enum {
+ /* mono_thread_internal_current () */
+ TLS_KEY_THREAD = 0,
+ TLS_KEY_JIT_TLS = 1,
+ /* mono_domain_get () */
+ TLS_KEY_DOMAIN = 2,
+ TLS_KEY_LMF = 3
+} MonoJitTlsKey;
+
/*
* This structure is an extension of MonoLMF and contains extra information.
*/
MONO_RGCTX_INFO_METHOD_GSHAREDVT_OUT_TRAMPOLINE_VIRT,
/* Same for calli, associated with a signature */
MONO_RGCTX_INFO_SIG_GSHAREDVT_OUT_TRAMPOLINE_CALLI,
- MONO_RGCTX_INFO_CLASS_IS_REF
+ /*
+ * 0 - vtype
+ * 1 - ref
+ * 2 - gsharedvt type
+ */
+ MONO_RGCTX_INFO_CLASS_BOX_TYPE,
+ /* Resolves to a MonoGSharedVtMethodRuntimeInfo */
+ MONO_RGCTX_INFO_METHOD_GSHAREDVT_INFO,
+ MONO_RGCTX_INFO_LOCAL_OFFSET,
+ MONO_RGCTX_INFO_MEMCPY,
+ MONO_RGCTX_INFO_BZERO,
+ /* The address of Nullable<T>.Box () */
+ MONO_RGCTX_INFO_NULLABLE_CLASS_BOX,
+ MONO_RGCTX_INFO_NULLABLE_CLASS_UNBOX,
} MonoRgctxInfoType;
typedef struct _MonoRuntimeGenericContextInfoTemplate {
#define MONO_GSHAREDVT_DEL_INVOKE_VT_OFFSET -2
+typedef struct {
+ MonoMethod *method;
+ /* Array of MonoRuntimeGenericContextInfoTemplate* entries */
+ GPtrArray *entries;
+} MonoGSharedVtMethodInfo;
+
+/* This is used by gsharedvt methods to allocate locals and compute local offsets */
+typedef struct {
+ int locals_size;
+ /*
+ * The results of resolving the entries in MOonGSharedVtMethodInfo->entries.
+ * We use this instead of rgctx slots since these can be loaded using a load instead
+ * of a call to an rgctx fetch trampoline.
+ */
+ gpointer entries [MONO_ZERO_LEN_ARRAY];
+} MonoGSharedVtMethodRuntimeInfo;
+
typedef enum {
#define PATCH_INFO(a,b) MONO_PATCH_INFO_ ## a,
#include "patch-info.h"
MonoJumpInfoRgctxEntry *rgctx_entry;
MonoJumpInfoImtTramp *imt_tramp;
MonoJumpInfoGSharedVtCall *gsharedvt;
+ MonoGSharedVtMethodInfo *gsharedvt_method;
MonoMethodSignature *sig;
} data;
};
gboolean gsharedvt;
+ MonoGSharedVtMethodInfo *gsharedvt_info;
+
+ /* Points to the gsharedvt locals area at runtime */
+ MonoInst *gsharedvt_locals_var;
+
+ /* The localloc instruction used to initialize gsharedvt_locals_var */
+ MonoInst *gsharedvt_locals_var_ins;
+
+ /* Points to a MonoGSharedVtMethodRuntimeInfo at runtime */
+ MonoInst *gsharedvt_info_var;
+
/* For native-to-managed wrappers, the saved old domain */
MonoInst *orig_domain_var;
GSList *headers_to_free;
/* Used by AOT */
- guint32 got_offset, ex_info_offset, method_info_offset;
+ guint32 got_offset, ex_info_offset, method_info_offset, method_index;
/* Symbol used to refer to this method in generated assembly */
char *asm_symbol;
char *llvm_method_name;
gint32 mono_get_jit_tls_offset (void) MONO_INTERNAL;
gint32 mono_get_lmf_tls_offset (void) MONO_INTERNAL;
gint32 mono_get_lmf_addr_tls_offset (void) MONO_INTERNAL;
+int mini_get_tls_offset (MonoJitTlsKey key) MONO_INTERNAL;
MonoInst* mono_get_jit_tls_intrinsic (MonoCompile *cfg) MONO_INTERNAL;
MonoInst* mono_get_domain_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
MonoInst* mono_get_thread_intrinsic (MonoCompile* cfg) MONO_INTERNAL;
guint32 mono_aot_get_got_offset (MonoJumpInfo *ji) MONO_LLVM_INTERNAL;
char* mono_aot_get_method_name (MonoCompile *cfg) MONO_LLVM_INTERNAL;
char* mono_aot_get_plt_symbol (MonoJumpInfoType type, gconstpointer data) MONO_LLVM_INTERNAL;
+int mono_aot_get_method_index (MonoMethod *method) MONO_LLVM_INTERNAL;
MonoJumpInfo* mono_aot_patch_info_dup (MonoJumpInfo* ji) MONO_LLVM_INTERNAL;
void mono_aot_set_make_unreadable (gboolean unreadable) MONO_INTERNAL;
gboolean mono_aot_is_pagefault (void *ptr) MONO_INTERNAL;
gpointer mini_get_vtable_trampoline (int slot_index) MONO_INTERNAL;
char* mono_get_generic_trampoline_name (MonoTrampolineType tramp_type) MONO_INTERNAL;
char* mono_get_rgctx_fetch_trampoline_name (int slot) MONO_INTERNAL;
-gpointer mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp) MONO_INTERNAL;
+gpointer mini_add_method_trampoline (MonoMethod *orig_method, MonoMethod *m, gpointer compiled_method, gboolean add_static_rgctx_tramp, gboolean add_unbox_tramp) MONO_INTERNAL;
+gboolean mini_jit_info_is_gsharedvt (MonoJitInfo *ji) MONO_INTERNAL;
gboolean mono_running_on_valgrind (void) MONO_INTERNAL;
void* mono_global_codeman_reserve (int size) MONO_INTERNAL;
const char*
mono_rgctx_info_type_to_str (MonoRgctxInfoType type) MONO_INTERNAL;
+MonoJumpInfoType
+mini_rgctx_info_type_to_patch_info_type (MonoRgctxInfoType info_type) MONO_INTERNAL;
+
gboolean
mono_method_needs_static_rgctx_invoke (MonoMethod *method, gboolean allow_type_vars) MONO_INTERNAL;
gboolean mini_is_gsharedvt_signature (MonoCompile *cfg, MonoMethodSignature *sig) MONO_INTERNAL;
gboolean mini_is_gsharedvt_type_gsctx (MonoGenericSharingContext *gsctx, MonoType *t) MONO_INTERNAL;
gboolean mini_is_gsharedvt_variable_type (MonoCompile *cfg, MonoType *t) MONO_INTERNAL;
-MonoType* mini_get_gsharedvt_alloc_type_for_type (MonoCompile *cfg, MonoType *t); /* should be internal but it's used by llvm */
gboolean mini_is_gsharedvt_sharable_method (MonoMethod *method) MONO_INTERNAL;
gboolean mini_is_gsharedvt_variable_signature (MonoMethodSignature *sig) MONO_INTERNAL;
gboolean mini_is_gsharedvt_sharable_inst (MonoGenericInst *inst) MONO_INTERNAL;
void SIG_HANDLER_SIGNATURE (mono_sigint_signal_handler) MONO_INTERNAL;
gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) MONO_INTERNAL;
+#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
+#define ARCH_HAVE_DELEGATE_TRAMPOLINES 1
+#else
+#define ARCH_HAVE_DELEGATE_TRAMPOLINES 0
+#endif
+
+#ifdef MONO_ARCH_USE_OP_TAIL_CALL
+#define ARCH_USE_OP_TAIL_CALL 1
+#else
+#define ARCH_USE_OP_TAIL_CALL 0
+#endif
+
+#ifndef MONO_ARCH_HAVE_TLS_GET
+#define MONO_ARCH_HAVE_TLS_GET 0
+#endif
+
+#ifdef MONO_ARCH_HAVE_TLS_GET_REG
+#define ARCH_HAVE_TLS_GET_REG 1
+#else
+#define ARCH_HAVE_TLS_GET_REG 0
+#endif
+
#endif /* __MONO_MINI_H__ */
PATCH_INFO(CASTCLASS_CACHE, "castclass_cache")
PATCH_INFO(SIGNATURE, "signature")
PATCH_INFO(GSHAREDVT_CALL, "gsharedvt_call")
+PATCH_INFO(GSHAREDVT_METHOD, "gsharedvt_method")
PATCH_INFO(JIT_TLS_ID, "jit_tls_id")
+PATCH_INFO(TLS_OFFSET, "tls_offset")
PATCH_INFO(NONE, "none")
+
+
mono_arch_flush_icache (buf, code - buf);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
if (mono_jit_map_is_enabled ())
mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("monitor_enter_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("monitor_enter_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("monitor_exit_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("monitor_exit_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
mono_arch_flush_icache (buf, code - buf);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
return buf;
}
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
#else
gpointer
-mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer *caller_regs, gpointer *callee_regs, gpointer mrgctx_reg)
+mono_arm_start_gsharedvt_call (GSharedVtCallInfo *info, gpointer *caller, gpointer *callee, gpointer mrgctx_reg)
{
g_assert_not_reached ();
return NULL;
mono_arch_flush_icache (buf, code - buf);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
return buf;
}
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return buf;
#else
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
return buf;
}
mono_arch_flush_icache (code, buf - code);
if (info)
- *info = mono_tramp_info_create (mono_get_generic_trampoline_name(tramp_type),
+ *info = mono_tramp_info_create (mono_get_generic_trampoline_name(tramp_type),
buf, buf - code, ji, unwind_ops);
/* Sanity check */
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return(buf);
#else
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return(buf);
}
mono_arch_flush_icache (buf, code - buf);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("nullified_class_init_trampoline"), buf, code - buf, NULL, NULL);
+ *info = mono_tramp_info_create ("nullified_class_init_trampoline", buf, code - buf, NULL, NULL);
if (mono_jit_map_is_enabled ())
mono_emit_jit_tramp (buf, code - buf, "nullified_class_init_trampoline");
g_assert (code - buf <= tramp_size);
- if (info)
- *info = mono_tramp_info_create (mono_get_rgctx_fetch_trampoline_name (slot), buf, code - buf, ji, unwind_ops);
+ if (info) {
+ char *name = mono_get_rgctx_fetch_trampoline_name (slot);
+ *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
+ g_free (name);
+ }
return buf;
}
nacl_global_codeman_validate (&buf, tramp_size, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("generic_class_init_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
nacl_global_codeman_validate (&buf, tramp_size, &code);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("monitor_enter_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("monitor_enter_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
g_assert (code - buf <= tramp_size);
if (info)
- *info = mono_tramp_info_create (g_strdup_printf ("monitor_exit_trampoline"), buf, code - buf, ji, unwind_ops);
+ *info = mono_tramp_info_create ("monitor_exit_trampoline", buf, code - buf, ji, unwind_ops);
return buf;
}
/* GDB puts a breakpoint in this function. */
void MONO_NOINLINE __jit_debug_register_code(void);
-/* Make sure to specify the version statically, because the
- debugger may check the version before we can set it. */
-struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+#if !defined(MONO_LLVM_LOADED) && defined(ENABLE_LLVM)
+
+/* LLVM already defines these */
+
+extern struct jit_descriptor __jit_debug_descriptor;
+
+#else
/* gcc seems to inline/eliminate calls to noinline functions, thus the asm () */
void MONO_NOINLINE __jit_debug_register_code(void) {
#endif
}
+/* Make sure to specify the version statically, because the
+ debugger may check the version before we can set it. */
+struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
+
+#endif
+
static MonoImageWriter *xdebug_w;
static MonoDwarfWriter *xdebug_writer;
static FILE *xdebug_fp, *il_file;
img_writer_emit_start (w);
- xdebug_writer = mono_dwarf_writer_create (w, il_file, 0, TRUE);
+ xdebug_writer = mono_dwarf_writer_create (w, il_file, 0, TRUE, TRUE);
/* Emit something so the file has a text segment */
img_writer_emit_section_change (w, ".text", 0);
if (!il_file)
il_file = fopen ("xdb.il", "w");
- dw = mono_dwarf_writer_create (w, il_file, il_file_line_index, FALSE);
+ dw = mono_dwarf_writer_create (w, il_file, il_file_line_index, FALSE, TRUE);
mono_dwarf_writer_emit_base_info (dw, mono_unwind_get_cie_program ());
bug-6148.cs \
assembly_append_ordering.cs \
bug-10127.cs \
- allow-synchronous-major.cs
+ allow-synchronous-major.cs \
+ unload-appdomain-on-shutdown.cs
TEST_CS_SRC_DIST= \
$(BASE_TEST_CS_SRC) \
$(PLATFORM_DISABLED_TESTS_WRENCH) \
main-returns-background-resetabort.exe \
main-returns-background-abort-resetabort.exe \
- main-returns-background.exe \
thread6.exe \
assemblyresolve_event3.exe \
delegate2.exe \
- finally_guard.exe \
- finalizer-abort.exe \
- finalizer-exit.exe \
- finalizer-thread.exe \
- appdomain-async-invoke.exe
+ finally_guard.exe \
+ gc-altstack.exe
AOT_DISABLED_TESTS=constraints-load.exe
~P () {
T.finalized = true;
Thread.Sleep (1000);
- //Console.WriteLine ("finalizer done");
+ // Console.WriteLine ("finalizer done");
count++;
}
}
p = null;
}
- static void callMakeP (int i) {
- if (i <= 0)
- {
- makeP ();
- return;
- }
- callMakeP (i - 1);
- }
-
static int Main () {
- callMakeP (100);
+ var t = new Thread (makeP);
+ t.Start ();
+ t.Join ();
GC.Collect ();
while (!finalized) {
\r
.class public auto ansi beforefieldinit FieldWithMissingType\r
{\r
- .field public [T]Missing BrokenField\r
+ .field public [t]Missing BrokenField\r
.field public static int32 WorkingField\r
}\r
--- /dev/null
+using System;
+using System.Reflection;
+using System.Threading;
+
+
+class Driver {
+ public static void Bla ()
+ {
+ //DoDomainUnload is invoked as part of the unload sequence, so let's pre jit it here to increase the likehood
+ //of hanging
+ var m = typeof (AppDomain).GetMethod ("DoDomainUnload", BindingFlags.Instance | BindingFlags.NonPublic);
+ if (m != null)
+ m.MethodHandle.GetFunctionPointer ();
+ }
+
+ static AppDomain ad;
+ static ManualResetEvent evt = new ManualResetEvent (false);
+
+ static void UnloadIt ()
+ {
+ //AppDomain.Unload calls AppDomain::getDomainId () before calling into the runtime, so let's pre jit
+ //it here to increase the likehood of hanging
+ var x = ad.Id;
+ evt.Set ();
+ AppDomain.Unload (ad);
+ }
+ static int Main ()
+ {
+ AppDomain.Unload (AppDomain.CreateDomain ("Warmup unload code"));
+ Console.WriteLine (".");
+ ad = AppDomain.CreateDomain ("NewDomain");
+ ad.DoCallBack (Bla);
+ var t = new Thread (UnloadIt);
+ t.IsBackground = true;
+ t.Start ();
+ evt.WaitOne ();
+ return 0;
+ }
+}
--- /dev/null
+
+// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
+// Copyright (c) Microsoft Corporation. All rights reserved.
+
+
+
+// Metadata version: v4.0.30319
+.assembly extern mscorlib
+{
+ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
+ .ver 4:0:0:0
+}
+.assembly 'test-901'
+{
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
+ 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.module 'test-901.exe'
+// MVID: {66ECA143-8B2A-47EB-A840-23ED00E2033E}
+.imagebase 0x00400000
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003 // WINDOWS_CUI
+.corflags 0x00000001 // ILONLY
+// Image base: 0x00620000
+
+
+// =============== CLASS MEMBERS DECLARATION ===================
+
+.class public auto ansi beforefieldinit Application
+ extends [mscorlib]System.Object
+{
+ .class auto ansi sealed nested private beforefieldinit '<foo>c__async0`1'<.ctor ([mscorlib]System.Exception, [mscorlib]System.Runtime.Serialization.ISerializable, [mscorlib]System.Runtime.InteropServices._Exception) TException>
+ extends [mscorlib]System.ValueType
+ implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
+ {
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
+ .field assembly valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder $builder
+ .field assembly int32 $PC
+ .method public hidebysig newslot virtual final
+ instance void MoveNext() cil managed
+ {
+ // Code size 94 (0x5e)
+ .maxstack 3
+ .locals init (class [mscorlib]System.Exception V_0)
+ IL_0000: ldarg.0
+ IL_0001: ldfld int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
+ IL_0006: ldarg.0
+ IL_0007: ldc.i4.m1
+ IL_0008: stfld int32 valuetype Application/'<foo>c__async0`1'<!TException>::$PC
+ IL_000d: brtrue IL_005d
+
+ .try
+ {
+ IL_0012: call !!0 [mscorlib]System.Activator::CreateInstance<!TException>()
+ IL_0017: box !TException
+ IL_001c: throw
+
+ } // end .try
+ catch !!0
+ {
+ IL_001d: pop
+ IL_001e: ldstr "caught in correct block"
+ IL_0023: call void [mscorlib]System.Console::WriteLine(string)
+ IL_0028: leave IL_0052
+
+ } // end handler
+ catch [mscorlib]System.Exception
+ {
+ IL_002d: stloc.0
+ IL_002e: ldstr "caught in generic block"
+ IL_0033: call void [mscorlib]System.Console::WriteLine(string)
+ IL_0038: ldstr "type: "
+ IL_003d: ldloc.0
+ IL_003e: callvirt instance class [mscorlib]System.Type [mscorlib]System.Exception::GetType()
+ IL_0043: call string [mscorlib]System.String::Concat(object,
+ object)
+ IL_0048: call void [mscorlib]System.Console::WriteLine(string)
+ IL_004d: leave IL_0052
+
+ } // end handler
+ IL_0052: ldarg.0
+ IL_0053: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
+ IL_0058: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult()
+ IL_005d: ret
+ } // end of method '<foo>c__async0`1'::MoveNext
+
+ .method public hidebysig newslot virtual final
+ instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) cil managed
+ {
+ .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
+ // Code size 13 (0xd)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!TException>::$builder
+ IL_0006: ldarg.1
+ IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
+ IL_000c: ret
+ } // end of method '<foo>c__async0`1'::SetStateMachine
+
+ } // end of class '<foo>c__async0`1'
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method Application::.ctor
+
+ .method private hidebysig static class [mscorlib]System.Threading.Tasks.Task
+ foo<.ctor ([mscorlib]System.Exception) TException>() cil managed
+ {
+ .custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 1C 41 70 70 6C 69 63 61 74 69 6F 6E 2B 3C // ...Application+<
+ 66 6F 6F 3E 63 5F 5F 61 73 79 6E 63 30 60 31 00 // foo>c__async0`1.
+ 00 )
+ .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
+ // Code size 33 (0x21)
+ .maxstack 3
+ .locals init (valuetype Application/'<foo>c__async0`1'<!!TException> V_0)
+ IL_0000: ldloca.s V_0
+ IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create()
+ IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
+ IL_000c: ldloca.s V_0
+ IL_000e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder valuetype Application/'<foo>c__async0`1'<!!TException>::$builder
+ IL_0013: dup
+ IL_0014: ldloca.s V_0
+ IL_0016: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Start<valuetype Application/'<foo>c__async0`1'<!!0>>(!!0&)
+ IL_001b: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task()
+ IL_0020: ret
+ } // end of method Application::foo
+
+ .method private hidebysig static void Main(string[] args) cil managed
+ {
+ .entrypoint
+ // Code size 11 (0xb)
+ .maxstack 8
+ IL_0000: call class [mscorlib]System.Threading.Tasks.Task Application::foo<class [mscorlib]System.InvalidOperationException>()
+ IL_0005: callvirt instance void [mscorlib]System.Threading.Tasks.Task::Wait()
+ IL_000a: ret
+ } // end of method Application::Main
+
+} // end of class Application
+
+
+// =============================================================
+
+// *********** DISASSEMBLY COMPLETE ***********************
*
* Authors:
* Geoff Norton (gnorton@novell.com)
+ * Rodrigo Kumpera (kumpera@gmail.com)
*
* (C) 2010 Novell, Inc.
+ * (C) 2013 Xamarin, Inc.
*/
#include <config.h>
#include "utils/mono-sigcontext.h"
#include "mach-support.h"
+/* Known offsets used for TLS storage*/
+
+/* All OSX versions up to 10.8 */
+#define TLS_VECTOR_OFFSET_CATS 0x60
+#define TLS_VECTOR_OFFSET_10_9 0xe0
+
+static int tls_vector_offset;
+
void *
mono_mach_arch_get_ip (thread_state_t state)
{
mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
{
/* OSX stores TLS values in a hidden array inside the pthread_t structure
- * They are keyed off a giant array offset 0x60 into the pointer. This value
+ * They are keyed off a giant array from a known offset into the pointer. This value
* is baked into their pthread_getspecific implementation
*/
intptr_t *p = (intptr_t *)thread;
- intptr_t **tsd = (intptr_t **) ((char*)p + 0x60);
+ intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
return (void *) &tsd [key];
}
return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
}
+void
+mono_mach_init (pthread_key_t key)
+{
+ void *old_value = pthread_getspecific (key);
+ void *canary = (void*)0xDEADBEEFu;
+
+ pthread_key_create (&key, NULL);
+ g_assert (old_value != canary);
+
+ pthread_setspecific (key, canary);
+
+ /*First we probe for cats*/
+ tls_vector_offset = TLS_VECTOR_OFFSET_CATS;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ tls_vector_offset = TLS_VECTOR_OFFSET_10_9;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ g_error ("could not discover the mach TLS offset");
+ok:
+ pthread_setspecific (key, old_value);
+}
+
#endif
#include "utils/mono-sigcontext.h"
#include "mach-support.h"
+/* Known offsets used for TLS storage*/
+
+/*Found on iOS 6 */
+#define TLS_VECTOR_OFFSET_0 0x48
+#define TLS_VECTOR_OFFSET_1 0xA8
+
+static int tls_vector_offset;
+
void *
mono_mach_arch_get_ip (thread_state_t state)
{
void *
mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
{
- /* OSX stores TLS values in a hidden array inside the pthread_t structure
- * They are keyed off a giant array offset 0x48 into the pointer. This value
+ /* Mach stores TLS values in a hidden array inside the pthread_t structure
+ * They are keyed off a giant array from a known offset into the pointer. This value
* is baked into their pthread_getspecific implementation
*/
intptr_t *p = (intptr_t *) thread;
- intptr_t **tsd = (intptr_t **) ((char*)p + 0x48 + (key << 2));
+ intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
- return (void *)tsd;
+ return (void *) &tsd [key];
}
void *
return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
}
+void
+mono_mach_init (pthread_key_t key)
+{
+ void *old_value = pthread_getspecific (key);
+ void *canary = (void*)0xDEADBEEFu;
+
+ pthread_key_create (&key, NULL);
+ g_assert (old_value != canary);
+
+ pthread_setspecific (key, canary);
+
+ /*First we probe for cats*/
+ tls_vector_offset = TLS_VECTOR_OFFSET_0;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ tls_vector_offset = TLS_VECTOR_OFFSET_1;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ g_error ("could not discover the mach TLS offset");
+ok:
+ pthread_setspecific (key, old_value);
+}
+
#endif
{
g_assert_not_reached ();
}
+
+void
+mono_mach_init (pthread_key_t key)
+{
+}
+
#endif
#include "utils/mono-sigcontext.h"
#include "mach-support.h"
+/* Known offsets used for TLS storage*/
+
+/* All OSX versions up to 10.8 */
+#define TLS_VECTOR_OFFSET_CATS 0x48
+#define TLS_VECTOR_OFFSET_10_9 0xb0
+
+static int tls_vector_offset;
+
void *
mono_mach_arch_get_ip (thread_state_t state)
{
mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
{
/* OSX stores TLS values in a hidden array inside the pthread_t structure
- * They are keyed off a giant array offset 0x48 into the pointer. This value
+ * They are keyed off a giant array from a known offset into the pointer. This value
* is baked into their pthread_getspecific implementation
*/
intptr_t *p = (intptr_t *) thread;
- intptr_t **tsd = (intptr_t **) ((char*)p + 0x48);
+ intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
return (void *) &tsd [key];
}
return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
}
+void
+mono_mach_init (pthread_key_t key)
+{
+ void *old_value = pthread_getspecific (key);
+ void *canary = (void*)0xDEADBEEFu;
+
+ pthread_key_create (&key, NULL);
+ g_assert (old_value != canary);
+
+ pthread_setspecific (key, canary);
+
+ /*First we probe for cats*/
+ tls_vector_offset = TLS_VECTOR_OFFSET_CATS;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ tls_vector_offset = TLS_VECTOR_OFFSET_10_9;
+ if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+ goto ok;
+
+ g_error ("could not discover the mach TLS offset");
+ok:
+ pthread_setspecific (key, old_value);
+}
#endif
void *mono_mach_arch_get_ip (thread_state_t state) MONO_INTERNAL;
void *mono_mach_arch_get_sp (thread_state_t state) MONO_INTERNAL;
+void mono_mach_init (pthread_key_t key) MONO_INTERNAL;
int mono_mach_arch_get_mcontext_size (void) MONO_INTERNAL;
void mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context) MONO_INTERNAL;
#endif /* _MSC_VER */
-#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && HAVE_VISIBILITY_HIDDEN
+#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
#define MONO_INTERNAL __attribute__ ((visibility ("hidden")))
#if MONO_LLVM_LOADED
#define MONO_LLVM_INTERNAL
if (!use_shared_area) {
if (g_getenv ("MONO_DISABLE_SHARED_AREA"))
use_shared_area = -1;
- use_shared_area = 1;
+ else
+ use_shared_area = 1;
}
return use_shared_area == -1;
}
#include <errno.h>
#include <assert.h>
#include <sys/time.h>
+#include <mono/utils/mono-memory-model.h>
#include "mono-mutex.h"
#if defined(__APPLE__)
#define _DARWIN_C_SOURCE
#include <pthread_spis.h>
+#include <dlfcn.h>
#endif
#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#if defined(__APPLE__)
int res;
pthread_mutexattr_t attr;
+ static gboolean inited;
+ static int (*setpolicy_np) (pthread_mutexattr_t *, int);
+
+ if (!inited) {
+ setpolicy_np = dlsym (RTLD_NEXT, "pthread_mutexattr_setpolicy_np");
+ mono_atomic_store_release (&inited, TRUE);
+ }
pthread_mutexattr_init (&attr);
pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
- pthread_mutexattr_setpolicy_np (&attr, _PTHREAD_MUTEX_POLICY_FIRSTFIT);
+ if (setpolicy_np)
+ setpolicy_np (&attr, _PTHREAD_MUTEX_POLICY_FIRSTFIT);
res = pthread_mutex_init (mutex, &attr);
pthread_mutexattr_destroy (&attr);
ret = t_info.virtual_size;
else if (strcmp (item, "Threads") == 0)
ret = th_count;
+ else
+ ret = 0;
mach_port_deallocate (mach_task_self (), task);
#include <errno.h>
+#if defined(__MACH__)
+#include <mono/utils/mach-support.h>
+#endif
+
#define THREADS_DEBUG(...)
//#define THREADS_DEBUG(...) g_message(__VA_ARGS__)
mono_thread_smr_init ();
mono_threads_init_platform ();
+#if defined(__MACH__)
+ mono_mach_init (thread_info_key);
+#endif
+
mono_threads_inited = TRUE;
g_assert (sizeof (MonoNativeThreadId) <= sizeof (uintptr_t));
* Copyright (C) 2004-2006 Jonathan Pryor
*/
+#include <config.h>
+
#define _XOPEN_SOURCE 600
#ifdef PLATFORM_MACOSX
* Copyright (C) 2004-2006 Jonathan Pryor
*/
+#include <config.h>
+
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif /* ndef _GNU_SOURCE */