Merge pull request #832 from xplicit/webperf1
authorRodrigo Kumpera <kumpera@gmail.com>
Fri, 13 Dec 2013 15:24:06 +0000 (07:24 -0800)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 13 Dec 2013 15:24:06 +0000 (07:24 -0800)
Header names should be compared binary but not linguistic.

61 files changed:
LICENSE
configure.in
eglib/src/gmisc-win32.c
mcs/class/Facades/Makefile
mcs/class/Facades/System.Dynamic.Runtime/TypeForwarders.cs
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/AssemblyInfo.cs [new file with mode: 0644]
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/Makefile [new file with mode: 0644]
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/System.Runtime.InteropServices.WindowsRuntime.dll.sources [new file with mode: 0644]
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/TypeForwarders.cs [new file with mode: 0644]
mcs/class/Mono.CSharp/Test/Evaluator/ExpressionsTest.cs
mcs/class/System/System.Diagnostics/Process.cs
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/TransportContext.cs
mcs/class/corlib/System.Collections.Concurrent/ConcurrentDictionary.cs
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs [new file with mode: 0644]
mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs [new file with mode: 0644]
mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs
mcs/class/corlib/corlib.dll.sources
mcs/mcs/dynamic.cs
mcs/mcs/statement.cs
mcs/tests/dtest-059.cs [new file with mode: 0644]
mcs/tests/ver-il-net_4_5.xml
mono/arch/amd64/amd64-codegen.h
mono/metadata/gc-memfuncs.c
mono/metadata/sgen-descriptor.h
mono/metadata/sgen-gc.c
mono/metadata/sgen-marksweep.c
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/basic-float.cs
mono/mini/cpu-amd64.md
mono/mini/exceptions-amd64.c
mono/mini/liveness.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-x86.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/patch-info.h
mono/tests/finalizer-exception.cs
mono/utils/mono-tls.c
msvc/Makefile.am
msvc/create-windef.pl
msvc/libmono.vcxproj
msvc/libmonoruntime.vcxproj
msvc/libmonoutils.vcxproj
msvc/mono.def
msvc/monosgen.def
winconfig.h

diff --git a/LICENSE b/LICENSE
index 19ed03acc968af23c3286bfdfc912c29babce367..be4be30323b480b0c553d3c4b5d91adecd2411cd 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -64,13 +64,6 @@ For comments, corrections and updates, please contact mono@xamarin.com
        the terms of the MIT X11, this means that this code can be
        used for any purposes by anyone.
 
-** mono/metadata/sgen*: Mono's Copying Collector
-
-       This new garbage collector is licensed under the terms of
-       the MIT X11 license, in hopes that the GC could be reused
-       by third party projects, follows the same spirit than the
-       Boehm GC.
-
 ** mono/arch/*/XXX-codegen.h
 
        This are C macros that are useful when generating native
index 7ae0418eac935d0f5844a84c0a1777803d51ca74..d62e6a3f6beded6eb70ca239e8890952a0ecb759 100644 (file)
@@ -2144,6 +2144,7 @@ else
        AC_CHECK_FUNCS(GetProcessId)
        AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
        AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
+       AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include <windows.h>]])
        AC_CHECK_DECLS(InterlockedIncrement64, [], [], [[#include <windows.h>]])
        AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
        AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
index 07dcf39aec86c58ffbbe9cccb19b5291d30cc576..f89f37c22049a780451ff55dcb4d3369ce8d1d10 100644 (file)
@@ -87,10 +87,12 @@ g_unsetenv(const gchar *variable)
 gchar*
 g_win32_getlocale(void)
 {
-       /* FIXME: Use GetThreadLocale
-        * and convert LCID to standard 
-        * string form, "en_US" */
-       return strdup ("en_US");
+       LCID lcid = GetThreadLocale();
+       gchar buf[19];
+       gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
+       buf[ccBuf - 1] = '-';
+       ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
+       return strdup(buf);
 }
 
 gboolean
index 3543382f6f066cc4c216035ce2a49c1bda855c61..e8e8363b5ffe9fb9ffe46835aa84161666d83a09 100644 (file)
@@ -2,11 +2,18 @@ MCS_BUILD_DIR = ../../build
 
 thisdir = class/Facades
 
-monotouch_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel System.Diagnostics.Contracts System.Diagnostics.Debug System.Diagnostics.Tools System.Globalization System.IO System.Linq.Expressions System.Linq.Parallel System.Linq.Queryable System.Linq System.Net.NetworkInformation System.Net.Primitives System.Net.Requests System.ObjectModel System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions System.Runtime.InteropServices System.Runtime.Numerics System.Runtime.Serialization.Json System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http System.ServiceModel.Primitives System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel System.Threading.Tasks System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer
+monotouch_SUBDIRS = System.Collections.Concurrent System.Collections System.ComponentModel.Annotations System.ComponentModel.EventBasedAsync System.ComponentModel \
+       System.Diagnostics.Contracts System.Diagnostics.Debug System.Diagnostics.Tools System.Dynamic.Runtime System.Globalization System.IO System.Linq.Expressions \
+       System.Linq.Parallel System.Linq.Queryable System.Linq System.Net.NetworkInformation System.Net.Primitives System.Net.Requests System.ObjectModel \
+       System.Reflection.Extensions System.Reflection.Primitives System.Reflection System.Resources.ResourceManager System.Runtime.Extensions \
+       System.Runtime.InteropServices System.Runtime.InteropServices.WindowsRuntime System.Runtime.Numerics System.Runtime.Serialization.Json \
+       System.Runtime.Serialization.Primitives System.Runtime.Serialization.Xml System.Runtime System.Security.Principal System.ServiceModel.Http \
+       System.ServiceModel.Primitives System.Text.Encoding.Extensions System.Text.Encoding System.Text.RegularExpressions System.Threading.Tasks.Parallel \
+       System.Threading.Tasks System.Threading System.Xml.ReaderWriter System.Xml.XDocument System.Xml.XmlSerializer
 
 mobile_static_SUBDIRS = $(monotouch_SUBDIRS)
 
-net_4_5_SUBDIRS = $(monotouch_SUBDIRS) System.Dynamic.Runtime System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
+net_4_5_SUBDIRS = $(monotouch_SUBDIRS) System.Reflection.Emit.ILGeneration System.Reflection.Emit.Lightweight System.Reflection.Emit
 
 monodroid_SUBDIRS = $(net_4_5_SUBDIRS)
 
index b579d020c120a10cf55dc528c6bf55b36784a914..ff800e52ef470a2d682b96e8a28c53c3c1394e3c 100644 (file)
@@ -19,7 +19,7 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 // 
-
+#if !FULL_AOT_RUNTIME
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.BinaryOperationBinder))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.BindingRestrictions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Dynamic.CallInfo))]
@@ -46,4 +46,6 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSiteBinder))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.CallSiteHelpers))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.DynamicAttribute))]
+#endif
 
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConditionalWeakTable<,>))]
diff --git a/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/AssemblyInfo.cs b/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..f63a705
--- /dev/null
@@ -0,0 +1,41 @@
+// 
+// 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.Runtime.InteropServices.WindowsRuntime.dll")]
+[assembly: AssemblyDescription ("System.Runtime.InteropServices.WindowsRuntime.dll")]
+[assembly: AssemblyDefaultAlias ("System.Runtime.InteropServices.WindowsRuntime.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
+[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: ReferenceAssembly]
+
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/Makefile b/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/Makefile
new file mode 100644 (file)
index 0000000..bb8dbee
--- /dev/null
@@ -0,0 +1,22 @@
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Runtime.InteropServices.WindowsRuntime
+SUBDIRS = 
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Runtime.InteropServices.WindowsRuntime.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /r:mscorlib
+
+PLATFORM_DEBUG_FLAGS =
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
+
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/System.Runtime.InteropServices.WindowsRuntime.dll.sources b/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/System.Runtime.InteropServices.WindowsRuntime.dll.sources
new file mode 100644 (file)
index 0000000..8e33d4d
--- /dev/null
@@ -0,0 +1,3 @@
+TypeForwarders.cs
+AssemblyInfo.cs
+
diff --git a/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/TypeForwarders.cs
new file mode 100644 (file)
index 0000000..efc9d91
--- /dev/null
@@ -0,0 +1,30 @@
+// 
+// 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.Runtime.InteropServices.WindowsRuntime.DefaultInterfaceAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<>))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.IActivationFactory))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.InterfaceImplementedInVersionAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArrayAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.ReturnValueNameAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMarshal))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.WindowsRuntime.WriteOnlyArrayAttribute))]
index 9732b655d2031f5b893cdcb96da04b6cce4b85b4..feb4294647f45a19f3ee62846f471a890bd8ed16 100644 (file)
@@ -130,6 +130,22 @@ namespace MonoTests.EvaluatorTest
                        Assert.AreEqual ("1+", sres, "The result should have been the input string, since we have a partial input");
                }
 
+               [Test]
+               public void GotoWithUnreachableStatement ()
+               {
+                       Evaluator.Run ("using System;");
+
+                       string code = "var x = new Action(() => {" +
+                       "Console.WriteLine(\"beforeGoto\");" +
+                       "goto L;" +
+               "L:" +
+                       "Console.WriteLine(\"afterGoto\");" +
+                       "});";
+
+                       Assert.IsTrue (Evaluator.Run (code), "#1");
+                       Assert.IsTrue (Evaluator.Run ("x();"), "#2");
+               }
+
 #if NET_4_0
                [Test]
                public void DynamicStatement ()
index e08d79e0f10b97df5d49e13bbc1075a36df682a4..5f699855aad7fa996f4c62401e463ca2d7aa43a7 100644 (file)
@@ -1566,6 +1566,21 @@ namespace System.Diagnostics {
                                                        async_output.Close ();
                                                if (async_error != null)
                                                        async_error.Close ();
+
+                                               if (input_stream != null) {
+                                                       input_stream.Close();
+                                                       input_stream = null;
+                                               }
+
+                                               if (output_stream != null) {
+                                                       output_stream.Close();
+                                                       output_stream = null;
+                                               }
+
+                                               if (error_stream != null) {
+                                                       error_stream.Close();
+                                                       error_stream = null;
+                                               }
                                        }
                                }
                                
@@ -1576,21 +1591,6 @@ namespace System.Diagnostics {
                                                Process_free_internal(process_handle);
                                                process_handle=IntPtr.Zero;
                                        }
-
-                                       if (input_stream != null) {
-                                               input_stream.Close();
-                                               input_stream = null;
-                                       }
-
-                                       if (output_stream != null) {
-                                               output_stream.Close();
-                                               output_stream = null;
-                                       }
-
-                                       if (error_stream != null) {
-                                               error_stream.Close();
-                                               error_stream = null;
-                                       }
                                }
                        }
                        base.Dispose (disposing);
index 2d0c8853e74ba652a775cd43cf63ac4d26636034..1cdffff53304462ef786183bc0e62467ed06c10b 100644 (file)
@@ -36,6 +36,7 @@ using System.Collections;
 using System.Configuration;
 using System.Globalization;
 using System.IO;
+using System.Net;
 using System.Net.Cache;
 using System.Net.Sockets;
 using System.Runtime.Remoting.Messaging;
@@ -950,6 +951,14 @@ namespace System.Net
 
                        return result.Response;
                }
+               
+#if NET_3_5
+               public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext transportContext)
+               {
+                       transportContext = null;
+                       return EndGetRequestStream (asyncResult);
+               }
+#endif
 
                public override WebResponse GetResponse()
                {
index 04d534fa139fc7c772a142f76e028aa2914adc73..e0366bb0dbab76518d403ddf13d1530329087897 100644 (file)
@@ -26,7 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_4_0
+#if NET_3_5
 
 using System.Security.Authentication.ExtendedProtection;
 
index bb8e99f704eba9cef4241772f12297f1e6069c9c..a52ced14f857b6edce920d0e410169fcc22bfcf6 100644 (file)
@@ -35,6 +35,7 @@ namespace System.Collections.Concurrent
 {
        [DebuggerDisplay ("Count={Count}")]
        [DebuggerTypeProxy (typeof (CollectionDebuggerView<,>))]
+       [Serializable]
        public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>,
          ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>,
          IDictionary, ICollection, IEnumerable
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
new file mode 100644 (file)
index 0000000..284839e
--- /dev/null
@@ -0,0 +1,46 @@
+#if NET_4_5
+//
+// DefaultInterfaceAttribute.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
+       public sealed class DefaultInterfaceAttribute : Attribute
+       {
+               public Type DefaultInterface {
+                       get;
+                       private set;
+               }
+
+               public DefaultInterfaceAttribute (Type defaultInterface)
+               {
+                       DefaultInterface = defaultInterface;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
new file mode 100644 (file)
index 0000000..33dbc83
--- /dev/null
@@ -0,0 +1,53 @@
+#if NET_4_5
+//
+// DesignerNamespaceResolveEventArgs.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.Collections.ObjectModel;
+using System.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [ComVisibleAttribute(false)]
+       public class DesignerNamespaceResolveEventArgs : EventArgs
+       {
+               public DesignerNamespaceResolveEventArgs (string namespaceName)
+               {
+                       NamespaceName = namespaceName;
+                       ResolvedAssemblyFiles = new Collection<string> ();
+               }
+
+               public string NamespaceName {
+                       get;
+                       private set;
+               }
+
+               public Collection<string> ResolvedAssemblyFiles {
+                       get;
+                       private set;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
new file mode 100644 (file)
index 0000000..35d4161
--- /dev/null
@@ -0,0 +1,59 @@
+#if NET_4_5
+//
+// EventRegistrationToken.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       public struct EventRegistrationToken
+       {
+#pragma warning disable 0649
+               long value;
+#pragma warning restore 0649
+
+               public static bool operator == (EventRegistrationToken left, EventRegistrationToken right)
+               {
+                       return left.value == right.value;
+               }
+
+               public static bool operator != (EventRegistrationToken left, EventRegistrationToken right)
+               {
+                       return left.value != right.value;
+               }
+
+               public override bool Equals (object obj)
+               {
+                       return ((EventRegistrationToken)obj).value == value;
+               }
+
+               public override int GetHashCode ()
+               {
+                       return unchecked ((int)value);
+               }
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
new file mode 100644 (file)
index 0000000..e4d7623
--- /dev/null
@@ -0,0 +1,68 @@
+#if NET_4_5
+//
+// EventRegistrationTokenTable.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [MonoTODO]
+       public sealed class EventRegistrationTokenTable<T>
+               where T : class
+       {
+               public EventRegistrationTokenTable ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public T InvocationList {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
+
+               public EventRegistrationToken AddEventHandler (T handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static EventRegistrationTokenTable<T> GetOrCreateEventRegistrationTokenTable(ref EventRegistrationTokenTable<T> refEventTable)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void RemoveEventHandler (T handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public void RemoveEventHandler (EventRegistrationToken token)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+#endif
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
new file mode 100644 (file)
index 0000000..e7d010d
--- /dev/null
@@ -0,0 +1,38 @@
+#if NET_4_5
+//
+// IActivationFactory.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [Guid("00000035-0000-0000-C000-000000000046")]
+       public interface IActivationFactory
+       {
+               object ActivateInstance ();
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
new file mode 100644 (file)
index 0000000..9950193
--- /dev/null
@@ -0,0 +1,71 @@
+#if NET_4_5
+//
+// InterfaceImplementedInVersionAttribute.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
+       public sealed class InterfaceImplementedInVersionAttribute : Attribute
+       {
+               public InterfaceImplementedInVersionAttribute (Type interfaceType, byte majorVersion, byte minorVersion,
+                       byte buildVersion, byte revisionVersion)
+               {
+                       InterfaceType = interfaceType;
+                       MajorVersion = majorVersion;
+                       MinorVersion = minorVersion;
+                       BuildVersion = buildVersion;
+                       RevisionVersion = revisionVersion;
+               }
+
+               public byte BuildVersion {
+                       get;
+                       private set;
+               }
+
+               public Type InterfaceType {
+                       get;
+                       private set;
+               }
+
+               public byte MajorVersion {
+                       get;
+                       private set;
+               }
+
+               public byte MinorVersion {
+                       get;
+                       private set;
+               }
+       
+               public byte RevisionVersion {
+                       get;
+                       private set;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
new file mode 100644 (file)
index 0000000..f57569b
--- /dev/null
@@ -0,0 +1,60 @@
+#if NET_4_5
+//
+// NamespaceResolveEventArgs.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.Collections.ObjectModel;
+using System.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [ComVisibleAttribute(false)]
+       public class NamespaceResolveEventArgs : EventArgs
+       {
+               public NamespaceResolveEventArgs (string namespaceName, Assembly requestingAssembly)
+               {
+                       NamespaceName = namespaceName;
+                       RequestingAssembly = requestingAssembly;
+                       ResolvedAssemblies = new Collection<Assembly> ();
+               }
+
+               public string NamespaceName {
+                       get;
+                       private set;
+               }
+
+               public Assembly RequestingAssembly {
+                       get;
+                       private set;
+               }
+
+               public Collection<Assembly> ResolvedAssemblies {
+                       get;
+                       private set;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
new file mode 100644 (file)
index 0000000..0c5ecc3
--- /dev/null
@@ -0,0 +1,37 @@
+#if NET_4_5
+//
+// ReadOnlyArrayAttribute.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
+       public sealed class ReadOnlyArrayAttribute : Attribute
+       {
+       }
+}
+#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs
new file mode 100644 (file)
index 0000000..8fd0173
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// ReturnValueNameAttribute.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [AttributeUsageAttribute(AttributeTargets.Delegate|AttributeTargets.ReturnValue, AllowMultiple = false, Inherited = false)]
+       public sealed class ReturnValueNameAttribute : Attribute
+       {
+               public ReturnValueNameAttribute (string name)
+               {
+                       Name = name;
+               }
+
+               public string Name {
+                       get;
+                       private set;
+               }
+       }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
new file mode 100644 (file)
index 0000000..fc24594
--- /dev/null
@@ -0,0 +1,72 @@
+#if NET_4_5
+//
+// WindowsRuntimeMarshal.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [MonoTODO]
+       public static class WindowsRuntimeMarshal
+       {
+               public static void AddEventHandler<T> ( Func<T, EventRegistrationToken> addMethod, Action<EventRegistrationToken> removeMethod, T handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static void FreeHString (IntPtr ptr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IActivationFactory GetActivationFactory (Type type)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static string PtrToStringHString (IntPtr ptr)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static void RemoveAllEventHandlers(Action<EventRegistrationToken> removeMethod)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static void RemoveEventHandler<T> (Action<EventRegistrationToken> removeMethod, T handler)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IntPtr StringToHString (string s)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+#endif
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
new file mode 100644 (file)
index 0000000..4457336
--- /dev/null
@@ -0,0 +1,53 @@
+#if NET_4_5
+//
+// WindowsRuntimeMetadata.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.Collections.Generic;
+using System.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [MonoTODO]
+       public static class WindowsRuntimeMetadata
+       {
+               public static IEnumerable<string> ResolveNamespace (string namespaceName, IEnumerable<string> packageGraphFilePaths)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public static IEnumerable<string> ResolveNamespace (string namespaceName, string windowsSdkFilePath, IEnumerable<string> packageGraphFilePaths)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+#pragma warning disable 0067
+               public static event EventHandler<DesignerNamespaceResolveEventArgs> DesignerNamespaceResolve;
+               public static event EventHandler<NamespaceResolveEventArgs> ReflectionOnlyNamespaceResolve;
+#pragma warning restore 0067
+       }
+}
+#endif
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
new file mode 100644 (file)
index 0000000..7d5e461
--- /dev/null
@@ -0,0 +1,37 @@
+#if NET_4_5
+//
+// WriteOnlyArrayAttribute.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.Runtime.CompilerServices;
+
+namespace System.Runtime.InteropServices.WindowsRuntime
+{
+       [AttributeUsageAttribute(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
+       public sealed class WriteOnlyArrayAttribute : Attribute
+       {
+       }
+}
+#endif
index f0f8fa8996ffa78ace90a3f0bb6aae00f73d4c92..18b2099b8dd5fa9e00ff893ee5c6688648192ae8 100644 (file)
@@ -180,7 +180,9 @@ namespace MonoTests.System.Runtime.CompilerServices
                        });
 
                        mres.Set ();
-                       Assert.IsTrue (mres2.WaitOne (2000), "#2");;
+                       // this will only terminate correctly if the test was not executed from the main thread
+                       // e.g. Touch.Unit defaults to run tests on the main thread and this will return false
+                       Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
                }
        }
 }
index 3a77d9aba2b70b962b00e5377254c1e45735e22d..2fa3d91a04fcd6512470d47c00c270ea9d5d0a33 100644 (file)
@@ -152,6 +152,7 @@ namespace MonoTests.System.Threading {
                }
 
                [Test]
+               [Category("MobileNotWorking")]
                public void Capture ()
                {
                        ExecutionContext ec = ExecutionContext.Capture ();
@@ -169,6 +170,7 @@ namespace MonoTests.System.Threading {
                }
 
                [Test]
+               [Category("MobileNotWorking")]
                public void Copy ()
                {
                        ExecutionContext ec = ExecutionContext.Capture ();
@@ -198,6 +200,7 @@ namespace MonoTests.System.Threading {
                }
 
                [Test]
+               [Category("MobileNotWorking")]
                public void IsFlowSuppressed ()
                {
                        Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1");
@@ -211,12 +214,14 @@ namespace MonoTests.System.Threading {
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
+               [Category("MobileNotWorking")]
                public void RestoreFlow_None ()
                {
                        ExecutionContext.RestoreFlow ();
                }
 
                [Test]
+               [Category("MobileNotWorking")]
                public void RestoreFlow_SuppressFlow ()
                {
                        Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1");
@@ -237,6 +242,7 @@ namespace MonoTests.System.Threading {
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
+               [Category("MobileNotWorking")]
                public void Run_SuppressFlow ()
                {
                        Assert.IsFalse (ExecutionContext.IsFlowSuppressed ());
@@ -251,6 +257,7 @@ namespace MonoTests.System.Threading {
                }
 
                [Test]
+               [Category("MobileNotWorking")]
                public void SuppressFlow ()
                {
                        Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1");
@@ -264,6 +271,7 @@ namespace MonoTests.System.Threading {
 
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
+               [Category("MobileNotWorking")]
                public void SuppressFlow_Two_Undo ()
                {
                        Assert.IsFalse (ExecutionContext.IsFlowSuppressed (), "IsFlowSuppressed-1");
index f581c0d5e599fc34ad44eb38c948ae69647d2664..3bab3edb7f8d9495a371fcf13a5b0ae8bb1ef975 100644 (file)
@@ -925,6 +925,18 @@ System.Runtime.InteropServices.ComTypes/VARDESC.cs
 System.Runtime.InteropServices.ComTypes/VARFLAGS.cs
 System.Runtime.InteropServices.ComTypes/VARKIND.cs
 System.Runtime.InteropServices.Expando/IExpando.cs
+System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
+System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
+System.Runtime.InteropServices.WindowsRuntime/EventRegistrationToken.cs
+System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable.cs
+System.Runtime.InteropServices.WindowsRuntime/IActivationFactory.cs
+System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
+System.Runtime.InteropServices.WindowsRuntime/NamespaceResolveEventArgs.cs
+System.Runtime.InteropServices.WindowsRuntime/ReadOnlyArrayAttribute.cs
+System.Runtime.InteropServices.WindowsRuntime/ReturnValueNameAttribute.cs
+System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.cs
+System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.cs
+System.Runtime.InteropServices.WindowsRuntime/WriteOnlyArrayAttribute.cs
 System.Runtime.Remoting/ActivatedClientTypeEntry.cs
 System.Runtime.Remoting/ActivatedServiceTypeEntry.cs
 System.Runtime.Remoting/CustomErrorsModes.cs
index e4acde34d662be6d153da9cc22291ec02350ce70..3627610a51c14cc7f27e59b99dd119992220a902 100644 (file)
@@ -450,6 +450,14 @@ namespace Mono.CSharp
                                d.PrepareEmit ();
 
                                site.AddTypeContainer (d);
+
+                               //
+                               // Add new container to inflated site container when the
+                               // member cache already exists
+                               //
+                               if (site.CurrentType is InflatedTypeSpec && index > 0)
+                                       site.CurrentType.MemberCache.AddMember (d.CurrentType);
+
                                del_type = new TypeExpression (d.CurrentType, loc);
                                if (targs_for_instance != null) {
                                        del_type_instance_access = null;
index 9f7b41e4e3cbcd03e5a28eceaa305d10e4fc007f..7090c4a7aefb05e22389c3728c0b2250e10bd39b 100644 (file)
@@ -2809,7 +2809,7 @@ namespace Mono.CSharp {
 
                public LabeledStatement LookupLabel (string name)
                {
-                       return ParametersBlock.TopBlock.GetLabel (name, this);
+                       return ParametersBlock.GetLabel (name, this);
                }
 
                public override Reachability MarkReachable (Reachability rc)
@@ -3480,6 +3480,7 @@ namespace Mono.CSharp {
                protected bool resolved;
                protected ToplevelBlock top_block;
                protected StateMachine state_machine;
+               protected Dictionary<string, object> labels;
 
                public ParametersBlock (Block parent, ParametersCompiled parameters, Location start, Flags flags = 0)
                        : base (parent, 0, start, start)
@@ -3608,6 +3609,46 @@ namespace Mono.CSharp {
                        }                                       
                }
 
+               protected override void CloneTo (CloneContext clonectx, Statement t)
+               {
+                       base.CloneTo (clonectx, t);
+
+                       var target = (ParametersBlock) t;
+
+                       //
+                       // Clone label statements as well as they contain block reference
+                       //
+                       var pb = this;
+                       while (true) {
+                               if (pb.labels != null) {
+                                       target.labels = new Dictionary<string, object> ();
+
+                                       foreach (var entry in pb.labels) {
+                                               var list = entry.Value as List<LabeledStatement>;
+
+                                               if (list != null) {
+                                                       var list_clone = new List<LabeledStatement> ();
+                                                       foreach (var lentry in list) {
+                                                               list_clone.Add (RemapLabeledStatement (lentry, lentry.Block, clonectx.RemapBlockCopy (lentry.Block)));
+                                                       }
+
+                                                       target.labels.Add (entry.Key, list_clone);
+                                               } else {
+                                                       var labeled = (LabeledStatement) entry.Value;
+                                                       target.labels.Add (entry.Key, RemapLabeledStatement (labeled, labeled.Block, clonectx.RemapBlockCopy (labeled.Block)));
+                                               }
+                                       }
+
+                                       break;
+                               }
+
+                               if (pb.Parent == null)
+                                       break;
+
+                               pb = pb.Parent.ParametersBlock;
+                       }
+               }
+
                public override Expression CreateExpressionTree (ResolveContext ec)
                {
                        if (statements.Count == 1) {
@@ -3651,6 +3692,43 @@ namespace Mono.CSharp {
                        return res;
                }
 
+               public LabeledStatement GetLabel (string name, Block block)
+               {
+                       //
+                       // Cloned parameters blocks can have their own cloned version of top-level labels
+                       //
+                       if (labels == null) {
+                               if (Parent != null)
+                                       return Parent.ParametersBlock.GetLabel (name, block);
+
+                               return null;
+                       }
+
+                       object value;
+                       if (!labels.TryGetValue (name, out value)) {
+                               return null;
+                       }
+
+                       var label = value as LabeledStatement;
+                       Block b = block;
+                       if (label != null) {
+                               do {
+                                       if (label.Block == b)
+                                               return label;
+                                       b = b.Parent;
+                               } while (b != null);
+                       } else {
+                               List<LabeledStatement> list = (List<LabeledStatement>) value;
+                               for (int i = 0; i < list.Count; ++i) {
+                                       label = list[i];
+                                       if (label.Block == b)
+                                               return label;
+                               }
+                       }
+
+                       return null;
+               }
+
                public ParameterInfo GetParameterInfo (Parameter p)
                {
                        for (int i = 0; i < parameters.Count; ++i) {
@@ -3690,6 +3768,17 @@ namespace Mono.CSharp {
                        }
                }
 
+               static LabeledStatement RemapLabeledStatement (LabeledStatement stmt, Block src, Block dst)
+               {
+                       var src_stmts = src.Statements;
+                       for (int i = 0; i < src_stmts.Count; ++i) {
+                               if (src_stmts[i] == stmt)
+                                       return (LabeledStatement) dst.Statements[i];
+                       }
+
+                       throw new InternalErrorException ("Should never be reached");
+               }
+
                public override bool Resolve (BlockContext bc)
                {
                        // TODO: if ((flags & Flags.Resolved) != 0)
@@ -3825,7 +3914,6 @@ namespace Mono.CSharp {
                LocalVariable this_variable;
                CompilerContext compiler;
                Dictionary<string, object> names;
-               Dictionary<string, object> labels;
 
                List<ExplicitBlock> this_references;
 
@@ -4116,36 +4204,6 @@ namespace Mono.CSharp {
                        return false;
                }
 
-               public LabeledStatement GetLabel (string name, Block block)
-               {
-                       if (labels == null)
-                               return null;
-
-                       object value;
-                       if (!labels.TryGetValue (name, out value)) {
-                               return null;
-                       }
-
-                       var label = value as LabeledStatement;
-                       Block b = block;
-                       if (label != null) {
-                               do {
-                                       if (label.Block == b.Original)
-                                               return label;
-                                       b = b.Parent;
-                               } while (b != null);
-                       } else {
-                               List<LabeledStatement> list = (List<LabeledStatement>) value;
-                               for (int i = 0; i < list.Count; ++i) {
-                                       label = list[i];
-                                       if (label.Block == b.Original)
-                                               return label;
-                               }
-                       }
-                               
-                       return null;
-               }
-
                // <summary>
                //   This is used by non-static `struct' constructors which do not have an
                //   initializer - in this case, the constructor must initialize all of the
diff --git a/mcs/tests/dtest-059.cs b/mcs/tests/dtest-059.cs
new file mode 100644 (file)
index 0000000..b57b8d2
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+
+class X
+{
+       public static void Main ()
+       {
+               new C<int> ().Test ();
+       }
+}
+
+class C<T>
+{
+       public void Test ()
+       {
+               dynamic d = null;
+
+               int v;
+               int.TryParse (d, out v);
+
+               int.TryParse (d, out v);
+       }
+}
\ No newline at end of file
index 68f1ac740c6c376bc8916539ac4931e0b9bd0f7d..d33697cfe09353956ae448b037cdc0eb66a35e5c 100644 (file)
       </method>\r
     </type>\r
   </test>\r
+  <test name="dtest-059.cs">\r
+    <type name="X">\r
+      <method name="Void Main()" attrs="150">\r
+        <size>12</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C`1[T]">\r
+      <method name="Void Test()" attrs="134">\r
+        <size>238</size>\r
+      </method>\r
+      <method name="Void .ctor()" attrs="6278">\r
+        <size>7</size>\r
+      </method>\r
+    </type>\r
+    <type name="C`1+&lt;Test&gt;c__DynamicSite0+Container0[T]">\r
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Type, System.Object, Int32 ByRef)" 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="C`1+&lt;Test&gt;c__DynamicSite0+Container1[T]">\r
+      <method name="Void Invoke(System.Runtime.CompilerServices.CallSite, System.Type, System.Object, Int32 ByRef)" 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
+  </test>\r
   <test name="dtest-anontype-01.cs">\r
     <type name="C">\r
       <method name="Void Main()" attrs="150">\r
index 9dd3269774b3e0cfd146cf15b315f46560605b7f..3c40d9de522f7bfd8c14e185debfc2e54ecb23f3 100644 (file)
@@ -1054,6 +1054,10 @@ typedef union {
 
 #define amd64_sse_cvtsi2sd_reg_reg(inst,dreg,reg) amd64_sse_cvtsi2sd_reg_reg_size ((inst), (dreg), (reg), 8)
 
+#define amd64_sse_cvtsi2ss_reg_reg_size(inst,dreg,reg,size) emit_sse_reg_reg_size ((inst), (dreg), (reg), 0xf3, 0x0f, 0x2a, (size))
+
+#define amd64_sse_cvtsi2ss_reg_reg(inst,dreg,reg) amd64_sse_cvtsi2ss_reg_reg_size ((inst), (dreg), (reg), 8)
+
 #define amd64_sse_cvtsd2ss_reg_reg(inst,dreg,reg) emit_sse_reg_reg ((inst), (dreg), (reg), 0xf2, 0x0f, 0x5a)
 
 #define amd64_sse_cvtss2sd_reg_reg(inst,dreg,reg) emit_sse_reg_reg ((inst), (dreg), (reg), 0xf3, 0x0f, 0x5a)
index 2c958342173b9f0155431827061d1e8b654a5346..532635db7576cbe11787d2c3cff41f7148cebd03 100644 (file)
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+/*
+ * SGen cannot deal with invalid pointers on the heap or in registered roots.  Sometimes we
+ * need to copy or zero out memory in code that might be interrupted by collections.  To
+ * guarantee that those operations will not result in invalid pointers, we must do it
+ * word-atomically.
+ *
+ * libc's bzero() and memcpy()/memmove() functions do not guarantee word-atomicity, even in
+ * cases where one would assume so.  For instance, some implementations (like Darwin's on
+ * x86) have variants of memcpy() using vector instructions.  Those may copy bytewise for
+ * the region preceding the first vector-aligned address.  That region could be
+ * word-aligned, but it would still be copied byte-wise.
+ *
+ * All our memory writes here are to "volatile" locations.  This is so that C compilers
+ * don't "optimize" our code back to calls to bzero()/memmove().  LLVM, specifically, will
+ * do that.
+ */
+
 #include <config.h>
 
 #include "metadata/gc-internal.h"
@@ -35,7 +52,7 @@
 #endif
 
 #define BZERO_WORDS(dest,words) do {                   \
-               void **__d = (void**)(dest);            \
+               void * volatile *__d = (void* volatile*)(dest);         \
                int __n = (words);                      \
                int __i;                                \
                for (__i = 0; __i < __n; ++__i)         \
@@ -56,7 +73,7 @@
 void
 mono_gc_bzero (void *dest, size_t size)
 {
-       char *d = (char*)dest;
+       volatile char *d = (char*)dest;
        size_t tail_bytes, word_bytes;
 
        /*
@@ -105,7 +122,7 @@ mono_gc_bzero (void *dest, size_t size)
 }
 
 #define MEMMOVE_WORDS_UPWARD(dest,src,words) do {      \
-               void **__d = (void**)(dest);            \
+               void * volatile *__d = (void* volatile*)(dest);         \
                void **__s = (void**)(src);             \
                int __n = (int)(words);                 \
                int __i;                                \
@@ -114,7 +131,7 @@ mono_gc_bzero (void *dest, size_t size)
        } while (0)
 
 #define MEMMOVE_WORDS_DOWNWARD(dest,src,words) do {    \
-               void **__d = (void**)(dest);            \
+               void * volatile *__d = (void* volatile*)(dest);         \
                void **__s = (void**)(src);             \
                int __n = (int)(words);                 \
                int __i;                                \
@@ -153,7 +170,7 @@ mono_gc_memmove (void *dest, const void *src, size_t size)
         * using memmove, which must handle it.
         */
        if (dest > src && ((size_t)((char*)dest - (char*)src) < size)) { /*backward copy*/
-               char *p = (char*)dest + size;
+               volatile char *p = (char*)dest + size;
                        char *s = (char*)src + size;
                        char *start = (char*)dest;
                        char *align_end = MAX((char*)dest, (char*)align_down (p));
@@ -172,7 +189,7 @@ mono_gc_memmove (void *dest, const void *src, size_t size)
                        while (p > start)
                                *--p = *--s;
        } else {
-               char *d = (char*)dest;
+               volatile char *d = (char*)dest;
                const char *s = (const char*)src;
                size_t tail_bytes;
 
index 573f3c6486e02cd3c3d3c180577156dc104d11a7..f07ad4a6ba00b214189b2b51e470daea9ad21ac7 100644 (file)
@@ -137,6 +137,7 @@ sgen_gc_descr_has_references (mword desc)
 
 #define SGEN_VTABLE_HAS_REFERENCES(vt) (sgen_gc_descr_has_references ((mword)((MonoVTable*)(vt))->gc_descr))
 #define SGEN_CLASS_HAS_REFERENCES(c)   (sgen_gc_descr_has_references ((mword)(c)->gc_descr))
+#define SGEN_OBJECT_HAS_REFERENCES(o)  (SGEN_VTABLE_HAS_REFERENCES (SGEN_LOAD_VTABLE ((o))))
 
 /* helper macros to scan and traverse objects, macros because we resue them in many functions */
 #define OBJ_RUN_LEN_SIZE(size,desc,obj) do { \
index 95f263c1c59c6313d50f4ac8aa3a47c4b8b2f1ab..45edc7be4ab6081197b55b0e88c2e7907e0ea9bb 100644 (file)
@@ -2920,8 +2920,8 @@ major_copy_or_mark_from_roots (int *old_next_pin_slot, gboolean finish_up_concur
                                continue;
                        }
                        sgen_los_pin_object (bigobj->data);
-                       /* FIXME: only enqueue if object has references */
-                       GRAY_OBJECT_ENQUEUE (WORKERS_DISTRIBUTE_GRAY_QUEUE, bigobj->data);
+                       if (SGEN_OBJECT_HAS_REFERENCES (bigobj->data))
+                               GRAY_OBJECT_ENQUEUE (WORKERS_DISTRIBUTE_GRAY_QUEUE, bigobj->data);
                        if (G_UNLIKELY (do_pin_stats))
                                sgen_pin_stats_register_object ((char*) bigobj->data, safe_object_get_size ((MonoObject*) bigobj->data));
                        SGEN_LOG (6, "Marked large object %p (%s) size: %lu from roots", bigobj->data, safe_name (bigobj->data), (unsigned long)sgen_los_object_size (bigobj));
index 7f7a1cfbf743b3c169c1d6bda15c46cea817f83b..1ef999b862cf6f08d16304d71516541da2f7d3db 100755 (executable)
@@ -564,7 +564,13 @@ ms_alloc_block (int size_index, gboolean pinned, gboolean has_references)
        info->pinned = pinned;
        info->has_references = has_references;
        info->has_pinned = pinned;
-       info->is_to_space = (sgen_get_current_collection_generation () == GENERATION_OLD); /*FIXME WHY??? */
+       /*
+        * Blocks that are to-space are not evacuated from.  During an major collection
+        * blocks are allocated for two reasons: evacuating objects from the nursery and
+        * evacuating them from major blocks marked for evacuation.  In both cases we don't
+        * want further evacuation.
+        */
+       info->is_to_space = (sgen_get_current_collection_generation () == GENERATION_OLD);
        info->swept = 1;
 #ifndef FIXED_HEAP
        info->block = ms_get_empty_block ();
@@ -1298,8 +1304,8 @@ major_copy_or_mark_object_concurrent (void **ptr, void *obj, SgenGrayQueue *queu
 #endif
 
                        sgen_los_pin_object (obj);
-                       /* FIXME: only enqueue if object has references */
-                       GRAY_OBJECT_ENQUEUE (queue, obj);
+                       if (SGEN_OBJECT_HAS_REFERENCES (obj))
+                               GRAY_OBJECT_ENQUEUE (queue, obj);
                        INC_NUM_MAJOR_OBJECTS_MARKED ();
                }
        }
@@ -1437,8 +1443,8 @@ major_copy_or_mark_object (void **ptr, void *obj, SgenGrayQueue *queue)
 #endif
 
                        sgen_los_pin_object (obj);
-                       /* FIXME: only enqueue if object has references */
-                       GRAY_OBJECT_ENQUEUE (queue, obj);
+                       if (SGEN_OBJECT_HAS_REFERENCES (obj))
+                               GRAY_OBJECT_ENQUEUE (queue, obj);
                }
        }
 }
@@ -1539,6 +1545,7 @@ static void
 sweep_block (MSBlockInfo *block, gboolean during_major_collection)
 {
        int count;
+       void *reversed = NULL;
 
        if (!during_major_collection)
                g_assert (!sgen_concurrent_collection_in_progress ());
@@ -1564,10 +1571,15 @@ sweep_block (MSBlockInfo *block, gboolean during_major_collection)
        /* reset mark bits */
        memset (block->mark_words, 0, sizeof (mword) * MS_NUM_MARK_WORDS);
 
-       /*
-        * FIXME: reverse free list so that it's in address
-        * order
-        */
+       /* Reverse free list so that it's in address order */
+       reversed = NULL;
+       while (block->free_list) {
+               void *next = *(void**)block->free_list;
+               *(void**)block->free_list = reversed;
+               reversed = block->free_list;
+               block->free_list = next;
+       }
+       block->free_list = reversed;
 
        block->swept = 1;
 }
index f8de62212bc1d93f9d577ce69fb1da64c9f83a77..7f0ec1ccea17fb85c8094dad8e3bf77ff66f79f2 100755 (executable)
@@ -4863,6 +4863,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
        case MONO_PATCH_INFO_METHOD_JUMP:
        case MONO_PATCH_INFO_ICALL_ADDR:
        case MONO_PATCH_INFO_METHOD_RGCTX:
+       case MONO_PATCH_INFO_METHOD_CODE_SLOT:
                encode_method_ref (acfg, patch_info->data.method, p, &p);
                break;
        case MONO_PATCH_INFO_INTERNAL_METHOD:
@@ -6357,7 +6358,8 @@ can_encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info)
 {
        switch (patch_info->type) {
        case MONO_PATCH_INFO_METHOD:
-       case MONO_PATCH_INFO_METHODCONST: {
+       case MONO_PATCH_INFO_METHODCONST:
+       case MONO_PATCH_INFO_METHOD_CODE_SLOT: {
                MonoMethod *method = patch_info->data.method;
 
                return can_encode_method (acfg, method);
index c868a796a03d0f463b28a740ea05cdd2c322a537..8843b4c6119576941e9f4502c775895b91bf84be 100644 (file)
@@ -2948,7 +2948,8 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
        case MONO_PATCH_INFO_METHOD:
        case MONO_PATCH_INFO_METHOD_JUMP:
        case MONO_PATCH_INFO_ICALL_ADDR:
-       case MONO_PATCH_INFO_METHOD_RGCTX: {
+       case MONO_PATCH_INFO_METHOD_RGCTX:
+       case MONO_PATCH_INFO_METHOD_CODE_SLOT: {
                MethodRef ref;
                gboolean res;
 
index 11e3e2725b181f350d220009244a4f37b72986ec..e85918292c723e4effa596481b6c07485d105c8d 100644 (file)
@@ -630,9 +630,6 @@ class Tests
                return f == PositiveInfinity ? 0 : 1;
        }
 
-       /* 
-          Disabled until they can be fixed to run on amd64
-
        static double VALUE = 0.19975845134874831D;
 
        public static int test_0_float_conversion_reduces_double_precision () {
@@ -664,6 +661,14 @@ class Tests
                        return 1;
                return 0;
        }
-       */
+
+       public static int test_0_int8_to_float_convertion ()
+    {
+               double d = (double)(float)(long)INT_VAL;
+
+               if (d != 323315616)
+                       return 1;
+               return 0;
+       }
 }
 
index daaacc5ddff656f109d0ff158e5a5871285c6a52..329f70a52a9a1faa3e74690334cf5dbfcfaacbcf 100644 (file)
@@ -86,7 +86,7 @@ long_conv_to_i1: dest:i src1:i len:4
 long_conv_to_i2: dest:i src1:i len:4
 long_conv_to_i4: dest:i src1:i len:3
 long_conv_to_i8: dest:i src1:i len:3
-long_conv_to_r4: dest:f src1:i len:9
+long_conv_to_r4: dest:f src1:i len:15
 long_conv_to_r8: dest:f src1:i len:9
 long_conv_to_u4: dest:i src1:i len:3
 long_conv_to_u8: dest:i src1:i len:3
@@ -368,7 +368,7 @@ int_max_un: dest:i src1:i src2:i len:16 clob:1
 
 int_neg: dest:i src1:i clob:1 len:4
 int_not: dest:i src1:i clob:1 len:4
-int_conv_to_r4: dest:f src1:i len:9
+int_conv_to_r4: dest:f src1:i len:15
 int_conv_to_r8: dest:f src1:i len:9
 int_ceq: dest:c len:8
 int_cgt: dest:c len:8
@@ -504,7 +504,7 @@ amd64_or_membase_reg: src1:b src2:i len:13
 amd64_xor_membase_reg: src1:b src2:i len:13
 amd64_mul_membase_reg: src1:b src2:i len:15
 
-float_conv_to_r4: dest:f src1:f
+float_conv_to_r4: dest:f src1:f len:17
 
 vcall2: len:64 clob:c
 vcall2_reg: src1:i len:64 clob:c
index bcd065d2a5e447d29bacf8ab2a9c78187deedbaa..342920f1afe1a95942687b26ecedf6bdfbcaae6d 100644 (file)
@@ -46,13 +46,13 @@ static MonoW32ExceptionHandler ill_handler;
 static MonoW32ExceptionHandler segv_handler;
 
 LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
-guint64 mono_win_vectored_exception_handle;
+void *mono_win_vectored_exception_handle;
 extern gboolean mono_win_chained_exception_needs_run;
 
 #define W32_SEH_HANDLE_EX(_ex) \
        if (_ex##_handler) _ex##_handler(0, ep, sctx)
 
-LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
+static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
 {
 #ifndef MONO_CROSS_COMPILE
        if (mono_old_win_toplevel_exception_filter) {
@@ -69,7 +69,7 @@ LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
  * Unhandled Exception Filter
  * Top-level per-process exception handler.
  */
-LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
+static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
 {
        EXCEPTION_RECORD* er;
        CONTEXT* ctx;
@@ -160,10 +160,10 @@ void win32_seh_init()
 
 void win32_seh_cleanup()
 {
-       if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
-
        guint32 ret = 0;
 
+       if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);
+
        ret = RemoveVectoredExceptionHandler (mono_win_vectored_exception_handle);
        g_assert (ret);
 }
@@ -1344,7 +1344,7 @@ mono_arch_unwindinfo_get_size (gpointer monoui)
                (sizeof (UNWIND_CODE) * (MONO_MAX_UNWIND_CODES - unwindinfo->unwindInfo.CountOfCodes));
 }
 
-PRUNTIME_FUNCTION
+static PRUNTIME_FUNCTION
 MONO_GET_RUNTIME_FUNCTION_CALLBACK ( DWORD64 ControlPc, IN PVOID Context )
 {
        MonoJitInfo *ji;
index 02e3c0857f49698c9b8bfb351c1032bebc9fff9c..a5cbabb53a53333dd2ecf2a2cfd1012bb780d507 100644 (file)
@@ -219,7 +219,8 @@ analyze_liveness_bb (MonoCompile *cfg, MonoBasicBlock *bb)
        MonoMethodVar *vars = cfg->vars;
        guint32 abs_pos = (bb->dfn << 16);
        
-       for (inst_num = 0, ins = bb->code; ins; ins = ins->next, inst_num += 2) {
+       /* Start inst_num from > 0, so last_use.abs_pos is only 0 for dead variables */
+       for (inst_num = 2, ins = bb->code; ins; ins = ins->next, inst_num += 2) {
                const char *spec = INS_INFO (ins->opcode);
                int num_sregs, i;
                int sregs [MONO_MAX_SRC_REGS];
index 4c6017db8cc39f3f91324e9e9c7e224d270c1c9d..3d3d73e5f6335d2e97df23099c680c0175f50510 100644 (file)
@@ -264,6 +264,7 @@ mono_type_to_regmove (MonoCompile *cfg, MonoType *type)
        if (type->byref)
                return OP_MOVE;
 
+       type = mini_replace_type (type);
 handle_enum:
        switch (type->type) {
        case MONO_TYPE_I1:
@@ -646,6 +647,7 @@ type_to_eval_stack_type (MonoCompile *cfg, MonoType *type, MonoInst *inst)
 {
        MonoClass *klass;
 
+       type = mini_replace_type (type);
        inst->klass = klass = mono_class_from_mono_type (type);
        if (type->byref) {
                inst->type = STACK_MP;
@@ -1908,7 +1910,7 @@ emit_push_lmf (MonoCompile *cfg)
        if (!cfg->lmf_ir)
                return;
 
-       if (cfg->lmf_ir_mono_lmf) {
+       if (cfg->lmf_ir_mono_lmf && mini_tls_get_supported (cfg, TLS_KEY_LMF)) {
                /* Load current lmf */
                lmf_ins = mono_get_lmf_intrinsic (cfg);
                g_assert (lmf_ins);
@@ -1962,7 +1964,7 @@ emit_pop_lmf (MonoCompile *cfg)
        EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
        lmf_reg = ins->dreg;
 
-       if (cfg->lmf_ir_mono_lmf) {
+       if (cfg->lmf_ir_mono_lmf && mini_tls_get_supported (cfg, TLS_KEY_LMF)) {
                /* Load previous_lmf */
                prev_lmf_reg = alloc_preg (cfg);
                EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
@@ -2059,6 +2061,7 @@ target_type_is_incompatible (MonoCompile *cfg, MonoType *target, MonoInst *arg)
        MonoType *simple_type;
        MonoClass *klass;
 
+       target = mini_replace_type (target);
        if (target->byref) {
                /* FIXME: check that the pointed to types match */
                if (arg->type == STACK_MP)
@@ -2445,7 +2448,7 @@ mono_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig,
        call->args = args;
        call->signature = sig;
        call->rgctx_reg = rgctx;
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
 
        type_to_eval_stack_type ((cfg), sig_ret, &call->inst);
 
@@ -4411,7 +4414,7 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
         * in mono_delegate_trampoline (), we allocate a per-domain memory slot to
         * store it, and we fill it after the method has been compiled.
         */
-       if (!cfg->compile_aot && !method->dynamic && !(cfg->opt & MONO_OPT_SHARED)) {
+       if (!method->dynamic && !(cfg->opt & MONO_OPT_SHARED)) {
                MonoInst *code_slot_ins;
 
                if (context_used) {
@@ -4428,7 +4431,10 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
                        }
                        mono_domain_unlock (domain);
 
-                       EMIT_NEW_PCONST (cfg, code_slot_ins, code_slot);
+                       if (cfg->compile_aot)
+                               EMIT_NEW_AOTCONST (cfg, code_slot_ins, MONO_PATCH_INFO_METHOD_CODE_SLOT, method);
+                       else
+                               EMIT_NEW_PCONST (cfg, code_slot_ins, code_slot);
                }
                MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method_code), code_slot_ins->dreg);           
        }
@@ -5676,11 +5682,11 @@ emit_init_rvar (MonoCompile *cfg, int dreg, MonoType *rtype)
 {
        static double r8_0 = 0.0;
        MonoInst *ins;
+       int t;
 
-       int t = rtype->type;
+       rtype = mini_replace_type (rtype);
+       t = rtype->type;
 
-       if (t == MONO_TYPE_VALUETYPE && rtype->data.klass->enumtype)
-               t = mono_class_enum_basetype (rtype->data.klass)->type;
        if (rtype->byref) {
                MONO_EMIT_NEW_PCONST (cfg, dreg, NULL);
        } else if (t >= MONO_TYPE_BOOLEAN && t <= MONO_TYPE_U4) {
@@ -6358,7 +6364,7 @@ emit_optimized_ldloca_ir (MonoCompile *cfg, unsigned char *ip, unsigned char *en
                token = read32 (ip + 2);
                klass = mini_get_class (cfg->current_method, token, cfg->generic_context);
                CHECK_TYPELOAD (klass);
-               type = &klass->byval_arg;
+               type = mini_replace_type (&klass->byval_arg);
                emit_init_local (cfg, local, type);
                return ip + 6;
        }
@@ -8149,7 +8155,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        /*
                         * Making generic calls out of gsharedvt methods.
                         */
-                       if (cmethod && cfg->gsharedvt && mini_is_gsharedvt_variable_signature (fsig)) {
+                       if (cmethod && cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig)) {
                                MonoRgctxInfoType info_type;
 
                                if (virtual) {
@@ -8465,7 +8471,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                        emit_pop_lmf (cfg);
 
                                if (cfg->ret) {
-                                       MonoType *ret_type = mono_method_signature (method)->ret;
+                                       MonoType *ret_type = mini_replace_type (mono_method_signature (method)->ret);
 
                                        if (seq_points && !sym_seq_points) {
                                                /* 
index 8658500c91c488a373359885ead7147bde005862..53f39011d9812414944ef46c33b1261e60482fbc 100644 (file)
@@ -603,12 +603,12 @@ typedef enum ArgumentClass {
 } ArgumentClass;
 
 static ArgumentClass
-merge_argument_class_from_type (MonoType *type, ArgumentClass class1)
+merge_argument_class_from_type (MonoGenericSharingContext *gsctx, MonoType *type, ArgumentClass class1)
 {
        ArgumentClass class2 = ARG_CLASS_NO_CLASS;
        MonoType *ptype;
 
-       ptype = mini_type_get_underlying_type (NULL, type);
+       ptype = mini_type_get_underlying_type (gsctx, type);
        switch (ptype->type) {
        case MONO_TYPE_BOOLEAN:
        case MONO_TYPE_CHAR:
@@ -655,7 +655,7 @@ merge_argument_class_from_type (MonoType *type, ArgumentClass class1)
 
                for (i = 0; i < info->num_fields; ++i) {
                        class2 = class1;
-                       class2 = merge_argument_class_from_type (info->fields [i].field->type, class2);
+                       class2 = merge_argument_class_from_type (gsctx, info->fields [i].field->type, class2);
                }
                break;
        }
@@ -861,7 +861,7 @@ add_valuetype (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, ArgIn
                                /* (8 is size of quad) */
                                quadsize [quad] = info->fields [i].offset + size - (quad * 8);
 
-                               class1 = merge_argument_class_from_type (info->fields [i].field->type, class1);
+                               class1 = merge_argument_class_from_type (gsctx, info->fields [i].field->type, class1);
                        }
                        g_assert (class1 != ARG_CLASS_NO_CLASS);
                        args [quad] = class1;
@@ -1213,7 +1213,7 @@ mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignat
        c1 = get_call_info (NULL, NULL, caller_sig);
        c2 = get_call_info (NULL, NULL, callee_sig);
        res = c1->stack_usage >= c2->stack_usage;
-       callee_ret = callee_sig->ret;
+       callee_ret = mini_replace_type (callee_sig->ret);
        if (callee_ret && MONO_TYPE_ISSTRUCT (callee_ret) && c2->ret.storage != ArgValuetypeInReg)
                /* An address on the callee's stack is passed as the first argument */
                res = FALSE;
@@ -1622,7 +1622,8 @@ mono_arch_fill_argument_info (MonoCompile *cfg)
        sig = mono_method_signature (cfg->method);
 
        cinfo = cfg->arch.cinfo;
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
+
        /*
         * Contrary to mono_arch_allocate_vars (), the information should describe
         * where the arguments are at the beginning of the method, not where they can be 
@@ -1703,7 +1704,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
        sig = mono_method_signature (cfg->method);
 
        cinfo = cfg->arch.cinfo;
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
 
        mono_arch_compute_omit_fp (cfg);
 
@@ -1972,6 +1973,7 @@ mono_arch_create_vars (MonoCompile *cfg)
 {
        MonoMethodSignature *sig;
        CallInfo *cinfo;
+       MonoType *sig_ret;
 
        sig = mono_method_signature (cfg->method);
 
@@ -1982,7 +1984,8 @@ mono_arch_create_vars (MonoCompile *cfg)
        if (cinfo->ret.storage == ArgValuetypeInReg)
                cfg->ret_var_is_local = TRUE;
 
-       if ((cinfo->ret.storage != ArgValuetypeInReg) && MONO_TYPE_ISSTRUCT (sig->ret)) {
+       sig_ret = mini_replace_type (sig->ret);
+       if ((cinfo->ret.storage != ArgValuetypeInReg) && MONO_TYPE_ISSTRUCT (sig_ret)) {
                cfg->vret_addr = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_ARG);
                if (G_UNLIKELY (cfg->verbose_level > 1)) {
                        printf ("vret_addr = ");
@@ -2150,7 +2153,8 @@ mono_arch_get_llvm_call_info (MonoCompile *cfg, MonoMethodSignature *sig)
        MonoType *t, *sig_ret;
 
        n = sig->param_count + sig->hasthis;
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
+
        cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
 
        linfo = mono_mempool_alloc0 (cfg->mempool, sizeof (LLVMCallInfo) + (sizeof (LLVMArgInfo) * n));
@@ -2408,6 +2412,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
        if (!sig->pinvoke && (sig->call_convention == MONO_CALL_VARARG) && (n == sig->sentinelpos))
                emit_sig_cookie (cfg, call, cinfo);
 
+       sig_ret = mini_replace_type (sig->ret);
        if (sig_ret && MONO_TYPE_ISSTRUCT (sig_ret)) {
                MonoInst *vtarg;
 
@@ -2573,7 +2578,7 @@ mono_arch_emit_outarg_vt (MonoCompile *cfg, MonoInst *ins, MonoInst *src)
 void
 mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val)
 {
-       MonoType *ret = mini_type_get_underlying_type (NULL, mono_method_signature (method)->ret);
+       MonoType *ret = mini_replace_type (mono_method_signature (method)->ret);
 
        if (ret->type == MONO_TYPE_R4) {
                if (COMPILE_LLVM (cfg))
@@ -5260,16 +5265,23 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        amd64_sse_movss_reg_membase (code, ins->dreg, ins->inst_basereg, ins->inst_offset);
                        amd64_sse_cvtss2sd_reg_reg (code, ins->dreg, ins->dreg);
                        break;
-               case OP_ICONV_TO_R4: /* FIXME: change precision */
+               case OP_ICONV_TO_R4:
+                       amd64_sse_cvtsi2ss_reg_reg_size (code, ins->dreg, ins->sreg1, 4);
+                       amd64_sse_cvtss2sd_reg_reg (code, ins->dreg, ins->dreg);
+                       break;
                case OP_ICONV_TO_R8:
                        amd64_sse_cvtsi2sd_reg_reg_size (code, ins->dreg, ins->sreg1, 4);
                        break;
-               case OP_LCONV_TO_R4: /* FIXME: change precision */
+               case OP_LCONV_TO_R4:
+                       amd64_sse_cvtsi2ss_reg_reg (code, ins->dreg, ins->sreg1);
+                       amd64_sse_cvtss2sd_reg_reg (code, ins->dreg, ins->dreg);
+                       break;
                case OP_LCONV_TO_R8:
                        amd64_sse_cvtsi2sd_reg_reg (code, ins->dreg, ins->sreg1);
                        break;
                case OP_FCONV_TO_R4:
-                       /* FIXME: nothing to do ?? */
+                       amd64_sse_cvtsd2ss_reg_reg (code, ins->dreg, ins->sreg1);
+                       amd64_sse_cvtss2sd_reg_reg (code, ins->dreg, ins->dreg);
                        break;
                case OP_FCONV_TO_I1:
                        code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, TRUE);
@@ -7617,7 +7629,7 @@ mono_arch_instrument_epilog_full (MonoCompile *cfg, void *func, void *p, gboolea
        guchar *code = p;
        int save_mode = SAVE_NONE;
        MonoMethod *method = cfg->method;
-       MonoType *ret_type = mini_type_get_underlying_type (NULL, mono_method_signature (method)->ret);
+       MonoType *ret_type = mini_replace_type (mono_method_signature (method)->ret);
        int i;
        
        switch (ret_type->type) {
@@ -8018,7 +8030,7 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
                return NULL;
 
        /* FIXME: Support more cases */
-       if (MONO_TYPE_ISSTRUCT (sig->ret))
+       if (MONO_TYPE_ISSTRUCT (mini_replace_type (sig->ret)))
                return NULL;
 
        if (has_target) {
index e147b4be646614fac03e9230c5efffc2363ec906..b523d9981cd5df64e67e02d64ef9bac4b83c81a6 100644 (file)
@@ -47,7 +47,7 @@ struct sigcontext {
        guint64 eip;
 };
 
-typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_RECORD *info, void *context);
+typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_POINTERS *info, void *context);
 void win32_seh_init(void);
 void win32_seh_cleanup(void);
 void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler);
index 1843b7c8427d6099edf99a5f02046986ce06b895..50774045a0c9a6d360f62dccbb226206ad0c8385 100755 (executable)
@@ -326,7 +326,7 @@ add_valuetype (MonoGenericSharingContext *gsctx, MonoMethodSignature *sig, ArgIn
 
                /* Special case structs with only a float member */
                if (info->num_fields == 1) {
-                       int ftype = info->fields [0].field->type->type;
+                       int ftype = mini_replace_type (info->fields [0].field->type)->type;
                        if ((info->native_size == 8) && (ftype == MONO_TYPE_R8)) {
                                ainfo->storage = ArgValuetypeInReg;
                                ainfo->pair_storage [0] = ArgOnDoubleFpStack;
@@ -714,7 +714,7 @@ mono_arch_tail_call_supported (MonoMethodSignature *caller_sig, MonoMethodSignat
         * the extra stack space would be left on the stack after the tail call.
         */
        res = c1->stack_usage >= c2->stack_usage;
-       callee_ret = callee_sig->ret;
+       callee_ret = mini_replace_type (callee_sig->ret);
        if (callee_ret && MONO_TYPE_ISSTRUCT (callee_ret) && c2->ret.storage != ArgValuetypeInReg)
                /* An address on the callee's stack is passed as the first argument */
                res = FALSE;
@@ -1197,7 +1197,7 @@ mono_arch_create_vars (MonoCompile *cfg)
        sig = mono_method_signature (cfg->method);
 
        cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
 
        if (cinfo->ret.storage == ArgValuetypeInReg)
                cfg->ret_var_is_local = TRUE;
@@ -1234,7 +1234,7 @@ collect_fp_stack_space (MonoMethodSignature *sig, int start_arg, int *fp_arg_set
        MonoType *t;
 
        for (; start_arg < sig->param_count; ++start_arg) {
-               t = mini_type_get_underlying_type (NULL, sig->params [start_arg]);
+               t = mini_replace_type (sig->params [start_arg]);
                if (!t->byref && t->type == MONO_TYPE_R8) {
                        fp_space += sizeof (double);
                        *fp_arg_setup = start_arg;
@@ -1411,7 +1411,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
 
        sig = call->signature;
        n = sig->param_count + sig->hasthis;
-       sig_ret = sig->ret;
+       sig_ret = mini_replace_type (sig->ret);
 
        cinfo = get_call_info (cfg->generic_sharing_context, cfg->mempool, sig);
 
index 5cb3248c41d2ab145b15b605d2ee66c8818cbec7..7a431b78b5f7b44e2bfd284be761b1e9759eecde 100644 (file)
@@ -897,6 +897,8 @@ mono_type_to_store_membase (MonoCompile *cfg, MonoType *type)
        if (type->byref)
                return OP_STORE_MEMBASE_REG;
 
+       type = mini_replace_type (type);
+
 handle_enum:
        switch (type->type) {
        case MONO_TYPE_I1:
@@ -959,7 +961,7 @@ mono_type_to_load_membase (MonoCompile *cfg, MonoType *type)
        if (type->byref)
                return OP_LOAD_MEMBASE;
 
-       type = mono_type_get_underlying_type (type);
+       type = mini_replace_type (type);
 
        switch (type->type) {
        case MONO_TYPE_I1:
@@ -1037,6 +1039,8 @@ mini_type_to_ldind (MonoCompile* cfg, MonoType *type)
 guint
 mini_type_to_stind (MonoCompile* cfg, MonoType *type)
 {
+       type = mini_replace_type (type);
+
        if (cfg->generic_sharing_context && !type->byref) {
                if (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) {
                        if (mini_type_var_is_vt (cfg, type))
@@ -1216,6 +1220,8 @@ mono_compile_create_var_for_vreg (MonoCompile *cfg, MonoType *type, int opcode,
        int num = cfg->num_varinfo;
        gboolean regpair;
 
+       type = mini_replace_type (type);
+
        if ((num + 1) >= cfg->varinfo_count) {
                int orig_count = cfg->varinfo_count;
                cfg->varinfo_count = cfg->varinfo_count ? (cfg->varinfo_count * 2) : 64;
@@ -1242,7 +1248,7 @@ mono_compile_create_var_for_vreg (MonoCompile *cfg, MonoType *type, int opcode,
                if (type->byref) {
                        mono_mark_vreg_as_mp (cfg, vreg);
                } else {
-                       MonoType *t = mini_type_get_underlying_type (NULL, type);
+                       MonoType *t = mini_replace_type (type);
                        if ((MONO_TYPE_ISSTRUCT (t) && inst->klass->has_references) || mini_type_is_reference (cfg, t)) {
                                inst->flags |= MONO_INST_GC_TRACK;
                                mono_mark_vreg_as_ref (cfg, vreg);
@@ -1324,6 +1330,7 @@ MonoInst*
 mono_compile_create_var (MonoCompile *cfg, MonoType *type, int opcode)
 {
        int dreg;
+       type = mini_replace_type (type);
 
        if (mono_type_is_long (type))
                dreg = mono_alloc_dreg (cfg, STACK_I8);
@@ -2945,6 +2952,18 @@ mono_create_tls_get_offset (MonoCompile *cfg, int offset)
        return ins;
 }
 
+gboolean
+mini_tls_get_supported (MonoCompile *cfg, MonoTlsKey key)
+{
+       if (!MONO_ARCH_HAVE_TLS_GET)
+               return FALSE;
+
+       if (cfg->compile_aot)
+               return ARCH_HAVE_TLS_GET_REG;
+       else
+               return mini_get_tls_offset (key) != -1;
+}
+
 MonoInst*
 mono_create_tls_get (MonoCompile *cfg, MonoTlsKey key)
 {
@@ -3153,6 +3172,7 @@ mono_patch_info_hash (gconstpointer data)
        case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
        case MONO_PATCH_INFO_SIGNATURE:
        case MONO_PATCH_INFO_TLS_OFFSET:
+       case MONO_PATCH_INFO_METHOD_CODE_SLOT:
                return (ji->type << 8) | (gssize)ji->data.target;
        case MONO_PATCH_INFO_GSHAREDVT_CALL:
                return (ji->type << 8) | (gssize)ji->data.gsharedvt->method;
@@ -3317,6 +3337,21 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
                }
 #endif
                break;
+       case MONO_PATCH_INFO_METHOD_CODE_SLOT: {
+               gpointer code_slot;
+
+               mono_domain_lock (domain);
+               if (!domain_jit_info (domain)->method_code_hash)
+                       domain_jit_info (domain)->method_code_hash = g_hash_table_new (NULL, NULL);
+               code_slot = g_hash_table_lookup (domain_jit_info (domain)->method_code_hash, patch_info->data.method);
+               if (!code_slot) {
+                       code_slot = mono_domain_alloc0 (domain, sizeof (gpointer));
+                       g_hash_table_insert (domain_jit_info (domain)->method_code_hash, patch_info->data.method, code_slot);
+               }
+               mono_domain_unlock (domain);
+               target = code_slot;
+               break;
+       }
        case MONO_PATCH_INFO_SWITCH: {
                gpointer *jump_table;
                int i;
@@ -6467,7 +6502,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                        if (supported)
                                info->dyn_call_info = mono_arch_dyn_call_prepare (sig);
 
-                       ret_type = sig->ret;
+                       ret_type = mini_replace_type (sig->ret);
                        if (info->dyn_call_info) {
                                switch (ret_type->type) {
                                case MONO_TYPE_VOID:
@@ -6564,7 +6599,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                if (sig->hasthis)
                        args [pindex ++] = &obj;
                for (i = 0; i < sig->param_count; ++i) {
-                       MonoType *t = sig->params [i];
+                       MonoType *t = mini_replace_type (sig->params [i]);
 
                        if (t->byref) {
                                args [pindex ++] = &params [i];
@@ -7891,3 +7926,14 @@ mono_jumptable_get_entry (guint8 *code_ptr)
        return mono_arch_jumptable_entry_from_code (code_ptr);
 }
 #endif
+
+/*
+ * mini_replace_type:
+ *
+ * Replace the type used in the metadata stream with what the JIT will actually use during compilation.
+*/
+MonoType*
+mini_replace_type (MonoType *type)
+{
+       return mono_type_get_underlying_type (type);
+}
index d9b074c3325f6c90063e47cc5e4f9eac8d2e0ef3..aaff747103b604ffe2b2b197d7b35afa73a02a36 100644 (file)
@@ -1990,6 +1990,7 @@ 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               (MonoTlsKey key) MONO_INTERNAL;
+gboolean  mini_tls_get_supported            (MonoCompile *cfg, MonoTlsKey key) MONO_INTERNAL;
 MonoInst* mono_create_tls_get               (MonoCompile *cfg, MonoTlsKey key) MONO_INTERNAL;
 MonoInst* mono_get_jit_tls_intrinsic        (MonoCompile *cfg) MONO_INTERNAL;
 MonoInst* mono_get_domain_intrinsic         (MonoCompile* cfg) MONO_INTERNAL;
@@ -2616,6 +2617,7 @@ void mono_generic_sharing_cleanup (void) MONO_INTERNAL;
 MonoClass* mini_class_get_container_class (MonoClass *class) MONO_INTERNAL;
 MonoGenericContext* mini_class_get_context (MonoClass *class) MONO_INTERNAL;
 
+MonoType* mini_replace_type (MonoType *type) MONO_INTERNAL;
 MonoType* mini_get_basic_type_from_generic (MonoGenericSharingContext *gsctx, MonoType *type) MONO_INTERNAL;
 MonoType* mini_type_get_underlying_type (MonoGenericSharingContext *gsctx, MonoType *type) MONO_INTERNAL;
 MonoMethod* mini_get_shared_method (MonoMethod *method) MONO_INTERNAL;
index a966be512bb0a9243384b868dcfc733fa9c0fec2..12c55254231904484cd34b4a7f9625e677830486 100644 (file)
@@ -50,7 +50,5 @@ PATCH_INFO(GSHAREDVT_METHOD, "gsharedvt_method")
 PATCH_INFO(JIT_TLS_ID, "jit_tls_id")
 PATCH_INFO(TLS_OFFSET, "tls_offset")
 PATCH_INFO(OBJC_SELECTOR_REF, "objc_selector_ref")
+PATCH_INFO(METHOD_CODE_SLOT, "method_code_slot")
 PATCH_INFO(NONE, "none")
-
-
-
index f11a1dcdeffd2ce3eb23d16d088a431977b999aa..29489ad49467e599b7a27a9431597fa484d858e3 100644 (file)
@@ -2,10 +2,13 @@ using System;
 using System.Threading;
 
 public class FinalizerException {
+
        ~FinalizerException () {
                throw new Exception ();
        }
 
+       static IntPtr aptr;
+
        /*
         * We allocate the exception object deep down the stack so
         * that it doesn't get pinned.
@@ -13,6 +16,7 @@ public class FinalizerException {
        public static unsafe void MakeException (int depth) {
                // Avoid tail calls
                int* values = stackalloc int [20];
+               aptr = new IntPtr (values);
                if (depth <= 0) {
                        new FinalizerException ();
                        return;
index 890f0782d57b45ab33385e1f64204c39b3bc7577..007dc4e6d225bd81336071a0fcda25750b5b8091 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
  */
 
+#include <config.h>
+
 #include "mono-tls.h"
 
 static int tls_offsets [TLS_KEY_NUM];
index 4a3f3b44fdfd39dd6351d1d4bb37ef56eee37a42..726cf8e00f1b55b2a6bfe30697bf324f93d571cb 100644 (file)
@@ -12,4 +12,5 @@ EXTRA_DIST = \
             winsetup.bat
 
 update-def:
-       perl create-windef.pl mono.def
+       perl create-windef.pl mono.def ../mono/mini/.libs/libmonoboehm-2.0.so mono-2.0.dll
+       perl create-windef.pl monosgen.def ../mono/mini/.libs/libmonosgen-2.0.so monosgen-2.0.dll
index 785abad338d9151c2c3868f287b909b45f035a00..129314ca64a7c0b5f894069502d3cd2ff1cc78af 100755 (executable)
@@ -3,14 +3,19 @@
 use strict;
 
 my $outfile = shift || usage ();
+my $soname = shift || usage ();
+my $dllname = shift || usage ();
 my @symbols = ();
 my %excludes = ();
-my $cmd = "nm -D ../mono/mini/.libs/libmono-2.0.so";
+my $cmd = "nm -D $soname";
 
 @excludes {qw(
        mono_class_setup_vtable_general_new mono_debugger_init mono_debugger_main
        mono_once mono_pthread_key_for_tls
        mono_gc_pthread_create mono_gc_pthread_detach mono_gc_pthread_join
+       mono_gc_pthread_exit
+       mono_file_map_fileio mono_file_unmap_fileio
+       mono_file_map_set_allocator 
 )} = ();
 
 open (SYMS, "$cmd |") || die "Cannot run \$cmd': $!\n";
@@ -25,14 +30,14 @@ push @symbols, "MonoFixupCorEE";
 
 open (OUT, ">$outfile") || die "Cannot open '$outfile': $!\n";
 print OUT "; file generated by create-windef.pl\n";
-print OUT "LIBRARY mono-2.0.dll\nEXPORTS\n";
+print OUT "LIBRARY $dllname\nEXPORTS\n";
 print OUT join ("\n", @symbols);
 print OUT "\n";
 
 close (OUT);
 
 sub usage {
-       print "Usage: create-windef.pl output_file\n";
+       print "Usage: create-windef.pl output_file soname dllname\n";
        exit (1);
 }
 
index ceb0619d28c0c57f4444ea45b25c7e6720a77346..b647427902e8b1d0746df6689fd54e63401f1300 100644 (file)
@@ -36,6 +36,7 @@
   </ItemGroup>\r
   <Import Project="mono.props" />\r
   <ItemGroup>\r
+    <ClCompile Include="..\mono\mini\alias-analysis.c" />\r
     <ClCompile Include="..\mono\mini\exceptions-amd64.c">\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_SGen|Win32'">true</ExcludedFromBuild>\r
     <ClCompile Include="..\mono\mini\local-propagation.c" />\r
     <ClCompile Include="..\mono\mini\driver.c" />\r
     <ClCompile Include="..\mono\mini\debug-mini.c" />\r
-    <ClInclude Include="..\mono\mini\debug-mini.h" />\r
     <ClCompile Include="..\mono\mini\linear-scan.c" />\r
     <ClCompile Include="..\mono\mini\aot-compiler.c" />\r
     <ClCompile Include="..\mono\mini\aot-runtime.c" />\r
     <ClCompile Include="..\mono\mini\mini-gc.c" />\r
     <ClInclude Include="..\mono\mini\debugger-agent.h " />\r
     <ClCompile Include="..\mono\mini\debugger-agent.c" />\r
-    <ClCompile Include="..\mono\mini\debug-debugger.c" />\r
-    <ClInclude Include="..\mono\mini\debug-debugger.h" />\r
     <ClCompile Include="..\mono\mini\xdebug.c" />\r
     <ClInclude Include="..\mono\mini\mini-llvm.h" />\r
     <ClInclude Include="..\mono\mini\mini-llvm-cpp.h" />\r
index 3ad4ff659156c03dce78025f41c2b2fec53d48b0..8f2e480d9516d45a9ca0fec8e0048d14699de638 100644 (file)
@@ -52,6 +52,7 @@
     <ClCompile Include="..\mono\metadata\exception.c" />\r
     <ClCompile Include="..\mono\metadata\file-io.c" />\r
     <ClCompile Include="..\mono\metadata\filewatcher.c" />\r
+    <ClCompile Include="..\mono\metadata\gc-memfuncs.c" />\r
     <ClCompile Include="..\mono\metadata\gc.c" />\r
     <ClCompile Include="..\mono\metadata\icall.c" />\r
     <ClCompile Include="..\mono\metadata\image.c" />\r
index 8c3ef282414391c568927e6c54bb370b7b0c2130..e2c5ea539050dbcc71051567f4ac989b5f720e75 100644 (file)
@@ -57,6 +57,7 @@
     <ClCompile Include="..\mono\utils\mono-threads-windows.c" />\r
     <ClCompile Include="..\mono\utils\mono-threads.c" />\r
     <ClCompile Include="..\mono\utils\mono-time.c" />\r
+    <ClCompile Include="..\mono\utils\mono-tls.c" />\r
     <ClCompile Include="..\mono\utils\mono-uri.c" />\r
     <ClCompile Include="..\mono\utils\mono-value-hash.c" />\r
     <ClCompile Include="..\mono\utils\monobitset.c" />\r
index 7a264b225fb53512fe9c135939e897111567cf50..402f42482e268faaf5df383089ae113e8ff2946e 100644 (file)
@@ -1,6 +1,7 @@
 ; file generated by create-windef.pl
 LIBRARY mono-2.0.dll
 EXPORTS
+MonoFixupCorEE
 mono_add_internal_call
 mono_aot_register_globals
 mono_aot_register_module
@@ -45,6 +46,7 @@ mono_assembly_open
 mono_assembly_open_full
 mono_assembly_set_main
 mono_assembly_setrootdir
+mono_binary_search
 mono_bitset_alloc_size
 mono_bitset_clear
 mono_bitset_clear_all
@@ -84,6 +86,7 @@ mono_class_from_name_case
 mono_class_from_typeref
 mono_class_get
 mono_class_get_byref_type
+mono_class_get_com_object_class
 mono_class_get_element_class
 mono_class_get_event_token
 mono_class_get_events
@@ -93,8 +96,11 @@ mono_class_get_field_token
 mono_class_get_fields
 mono_class_get_flags
 mono_class_get_full
+mono_class_get_idispatch_class
 mono_class_get_image
 mono_class_get_interfaces
+mono_class_get_interop_proxy_class
+mono_class_get_iunknown_class
 mono_class_get_method_from_name
 mono_class_get_method_from_name_flags
 mono_class_get_methods
@@ -109,12 +115,15 @@ mono_class_get_property_token
 mono_class_get_rank
 mono_class_get_type
 mono_class_get_type_token
+mono_class_get_variant_class
+mono_class_implements_interface
 mono_class_inflate_generic_method
 mono_class_inflate_generic_type
 mono_class_init
 mono_class_instance_size
 mono_class_interface_offset
 mono_class_is_assignable_from
+mono_class_is_delegate
 mono_class_is_enum
 mono_class_is_subclass_of
 mono_class_is_valid_enum
@@ -128,9 +137,11 @@ mono_class_num_properties
 mono_class_value_size
 mono_class_vtable
 mono_cli_rva_image_map
+mono_code_manager_cleanup
 mono_code_manager_commit
 mono_code_manager_destroy
 mono_code_manager_foreach
+mono_code_manager_init
 mono_code_manager_invalidate
 mono_code_manager_new
 mono_code_manager_new_dynamic
@@ -141,8 +152,10 @@ mono_code_manager_size
 mono_compile_method
 mono_config_cleanup
 mono_config_for_assembly
+mono_config_is_server_mode
 mono_config_parse
 mono_config_parse_memory
+mono_config_set_server_mode
 mono_config_string_for_assembly_file
 mono_context_get
 mono_context_get_desc
@@ -171,6 +184,7 @@ mono_debug_close_image
 mono_debug_close_mono_symbol_file
 mono_debug_domain_create
 mono_debug_domain_unload
+mono_debug_enabled
 mono_debug_find_method
 mono_debug_free_method_jit_info
 mono_debug_free_source_location
@@ -186,41 +200,19 @@ mono_debug_open_image_from_memory
 mono_debug_open_mono_symbols
 mono_debug_print_stack_frame
 mono_debug_print_vars
+mono_debug_remove_method
 mono_debug_symfile_free_locals
 mono_debug_symfile_free_location
 mono_debug_symfile_get_line_numbers
+mono_debug_symfile_get_line_numbers_full
 mono_debug_symfile_is_loaded
 mono_debug_symfile_lookup_locals
 mono_debug_symfile_lookup_location
 mono_debug_symfile_lookup_method
-mono_debug_using_mono_debugger
-mono_debugger_breakpoint_callback
-mono_debugger_call_exception_handler
-mono_debugger_check_breakpoints
-mono_debugger_check_interruption
-mono_debugger_check_runtime_version
-mono_debugger_class_initialized
-mono_debugger_cleanup
-mono_debugger_event
-mono_debugger_event_create_appdomain
-mono_debugger_event_unload_appdomain
-mono_debugger_extended_notification
-mono_debugger_handle_exception
-mono_debugger_initialize
+mono_debugger_agent_register_transport
 mono_debugger_insert_breakpoint
-mono_debugger_insert_breakpoint_full
-mono_debugger_insert_method_breakpoint
-mono_debugger_lock
 mono_debugger_method_has_breakpoint
-mono_debugger_register_class_init_callback
-mono_debugger_remove_breakpoint
-mono_debugger_remove_class_init_callback
-mono_debugger_remove_method_breakpoint
 mono_debugger_run_finally
-mono_debugger_thread_cleanup
-mono_debugger_thread_created
-mono_debugger_trampoline_compiled
-mono_debugger_unlock
 mono_declsec_flags_from_assembly
 mono_declsec_flags_from_class
 mono_declsec_flags_from_method
@@ -256,6 +248,7 @@ mono_domain_set_internal
 mono_domain_try_type_resolve
 mono_domain_try_unload
 mono_domain_unload
+mono_dwarf_escape_path
 mono_emit_native_call
 mono_environment_exitcode_get
 mono_environment_exitcode_set
@@ -279,6 +272,7 @@ mono_exception_from_name_msg
 mono_exception_from_name_two_strings
 mono_exception_from_token
 mono_exception_from_token_two_strings
+mono_exception_walk_trace
 mono_field_from_token
 mono_field_full_name
 mono_field_get_data
@@ -325,8 +319,12 @@ mono_gc_get_heap_size
 mono_gc_get_used_size
 mono_gc_invoke_finalizers
 mono_gc_is_finalizer_thread
+mono_gc_make_root_descr_user
 mono_gc_max_generation
 mono_gc_out_of_memory
+mono_gc_reference_queue_add
+mono_gc_reference_queue_free
+mono_gc_reference_queue_new
 mono_gc_walk_heap
 mono_gc_wbarrier_arrayref_copy
 mono_gc_wbarrier_generic_nostore
@@ -347,6 +345,8 @@ mono_get_char_class
 mono_get_config_dir
 mono_get_corlib
 mono_get_dbnull_object
+mono_get_delegate_begin_invoke
+mono_get_delegate_end_invoke
 mono_get_delegate_invoke
 mono_get_double_class
 mono_get_enum_class
@@ -399,6 +399,7 @@ mono_get_method_constrained
 mono_get_method_full
 mono_get_object_class
 mono_get_root_domain
+mono_get_runtime_build_info
 mono_get_sbyte_class
 mono_get_single_class
 mono_get_string_class
@@ -461,6 +462,8 @@ mono_install_assembly_search_hook
 mono_install_runtime_cleanup
 mono_install_threadpool_item_hooks
 mono_install_threadpool_thread_hooks
+mono_install_unhandled_exception_hook
+mono_invoke_unhandled_exception_hook
 mono_is_debugger_attached
 mono_jit_cleanup
 mono_jit_exec
@@ -472,14 +475,17 @@ mono_jit_init
 mono_jit_init_version
 mono_jit_parse_options
 mono_jit_set_aot_only
+mono_jit_set_domain
 mono_jit_set_trace_options
 mono_jit_thread_attach
 mono_ldstr
 mono_ldtoken
+mono_lls_init
 mono_load_remote_field
 mono_load_remote_field_new
 mono_local_deadce
 mono_locks_dump
+mono_lookup_icall_symbol
 mono_lookup_internal_call
 mono_lookup_pinvoke_call
 mono_main
@@ -614,6 +620,7 @@ mono_monitor_enter
 mono_monitor_exit
 mono_monitor_try_enter
 mono_mprotect
+mono_mutex_init_suspend_safe
 mono_object_castclass_mbyref
 mono_object_castclass_with_cache
 mono_object_clone
@@ -708,6 +715,7 @@ mono_reflection_get_token
 mono_reflection_get_type
 mono_reflection_parse_type
 mono_reflection_type_from_name
+mono_reflection_type_get_type
 mono_register_bundled_assemblies
 mono_register_config_for_assembly
 mono_register_machine_config
@@ -725,9 +733,14 @@ mono_runtime_invoke_array
 mono_runtime_is_shutting_down
 mono_runtime_object_init
 mono_runtime_quit
+mono_runtime_resource_check_limit
+mono_runtime_resource_limit
+mono_runtime_resource_set_callback
 mono_runtime_run_main
 mono_runtime_set_shutting_down
+mono_security_core_clr_get_options
 mono_security_core_clr_require_elevated_permissions
+mono_security_core_clr_set_options
 mono_security_enable_core_clr
 mono_security_set_core_clr_platform_callback
 mono_sem_post
@@ -759,6 +772,7 @@ mono_signature_get_params
 mono_signature_get_return_type
 mono_signature_hash
 mono_signature_is_instance
+mono_signature_param_is_out
 mono_signature_vararg_start
 mono_signbit_double
 mono_signbit_float
@@ -793,6 +807,7 @@ mono_thread_exit
 mono_thread_get_main
 mono_thread_get_undeniable_exception
 mono_thread_init
+mono_thread_is_foreign
 mono_thread_manage
 mono_thread_new_init
 mono_thread_set_main
@@ -801,6 +816,8 @@ mono_thread_stop
 mono_threads_get_default_stacksize
 mono_threads_request_thread_dump
 mono_threads_set_default_stacksize
+mono_tls_key_get_offset
+mono_tls_key_set_offset
 mono_trace_set_level_string
 mono_trace_set_mask_string
 mono_type_create_from_typespec
@@ -833,6 +850,7 @@ mono_utf8_from_external
 mono_utf8_validate_and_len
 mono_utf8_validate_and_len_with_bounds
 mono_valloc
+mono_valloc_aligned
 mono_value_box
 mono_value_copy
 mono_value_copy_array
index d176f9520a79a1d42c7f92c15841470d589a4457..0cbc870c9a4cba7116c78ecd693635a26aec488e 100644 (file)
@@ -1,6 +1,7 @@
 ; file generated by create-windef.pl
 LIBRARY monosgen-2.0.dll
 EXPORTS
+MonoFixupCorEE
 mono_add_internal_call
 mono_aot_register_globals
 mono_aot_register_module
@@ -45,6 +46,7 @@ mono_assembly_open
 mono_assembly_open_full
 mono_assembly_set_main
 mono_assembly_setrootdir
+mono_binary_search
 mono_bitset_alloc_size
 mono_bitset_clear
 mono_bitset_clear_all
@@ -84,6 +86,7 @@ mono_class_from_name_case
 mono_class_from_typeref
 mono_class_get
 mono_class_get_byref_type
+mono_class_get_com_object_class
 mono_class_get_element_class
 mono_class_get_event_token
 mono_class_get_events
@@ -93,8 +96,11 @@ mono_class_get_field_token
 mono_class_get_fields
 mono_class_get_flags
 mono_class_get_full
+mono_class_get_idispatch_class
 mono_class_get_image
 mono_class_get_interfaces
+mono_class_get_interop_proxy_class
+mono_class_get_iunknown_class
 mono_class_get_method_from_name
 mono_class_get_method_from_name_flags
 mono_class_get_methods
@@ -109,12 +115,15 @@ mono_class_get_property_token
 mono_class_get_rank
 mono_class_get_type
 mono_class_get_type_token
+mono_class_get_variant_class
+mono_class_implements_interface
 mono_class_inflate_generic_method
 mono_class_inflate_generic_type
 mono_class_init
 mono_class_instance_size
 mono_class_interface_offset
 mono_class_is_assignable_from
+mono_class_is_delegate
 mono_class_is_enum
 mono_class_is_subclass_of
 mono_class_is_valid_enum
@@ -128,9 +137,11 @@ mono_class_num_properties
 mono_class_value_size
 mono_class_vtable
 mono_cli_rva_image_map
+mono_code_manager_cleanup
 mono_code_manager_commit
 mono_code_manager_destroy
 mono_code_manager_foreach
+mono_code_manager_init
 mono_code_manager_invalidate
 mono_code_manager_new
 mono_code_manager_new_dynamic
@@ -141,8 +152,10 @@ mono_code_manager_size
 mono_compile_method
 mono_config_cleanup
 mono_config_for_assembly
+mono_config_is_server_mode
 mono_config_parse
 mono_config_parse_memory
+mono_config_set_server_mode
 mono_config_string_for_assembly_file
 mono_context_get
 mono_context_get_desc
@@ -171,6 +184,7 @@ mono_debug_close_image
 mono_debug_close_mono_symbol_file
 mono_debug_domain_create
 mono_debug_domain_unload
+mono_debug_enabled
 mono_debug_find_method
 mono_debug_free_method_jit_info
 mono_debug_free_source_location
@@ -186,41 +200,19 @@ mono_debug_open_image_from_memory
 mono_debug_open_mono_symbols
 mono_debug_print_stack_frame
 mono_debug_print_vars
+mono_debug_remove_method
 mono_debug_symfile_free_locals
 mono_debug_symfile_free_location
 mono_debug_symfile_get_line_numbers
+mono_debug_symfile_get_line_numbers_full
 mono_debug_symfile_is_loaded
 mono_debug_symfile_lookup_locals
 mono_debug_symfile_lookup_location
 mono_debug_symfile_lookup_method
-mono_debug_using_mono_debugger
-mono_debugger_breakpoint_callback
-mono_debugger_call_exception_handler
-mono_debugger_check_breakpoints
-mono_debugger_check_interruption
-mono_debugger_check_runtime_version
-mono_debugger_class_initialized
-mono_debugger_cleanup
-mono_debugger_event
-mono_debugger_event_create_appdomain
-mono_debugger_event_unload_appdomain
-mono_debugger_extended_notification
-mono_debugger_handle_exception
-mono_debugger_initialize
+mono_debugger_agent_register_transport
 mono_debugger_insert_breakpoint
-mono_debugger_insert_breakpoint_full
-mono_debugger_insert_method_breakpoint
-mono_debugger_lock
 mono_debugger_method_has_breakpoint
-mono_debugger_register_class_init_callback
-mono_debugger_remove_breakpoint
-mono_debugger_remove_class_init_callback
-mono_debugger_remove_method_breakpoint
 mono_debugger_run_finally
-mono_debugger_thread_cleanup
-mono_debugger_thread_created
-mono_debugger_trampoline_compiled
-mono_debugger_unlock
 mono_declsec_flags_from_assembly
 mono_declsec_flags_from_class
 mono_declsec_flags_from_method
@@ -256,6 +248,7 @@ mono_domain_set_internal
 mono_domain_try_type_resolve
 mono_domain_try_unload
 mono_domain_unload
+mono_dwarf_escape_path
 mono_emit_native_call
 mono_environment_exitcode_get
 mono_environment_exitcode_set
@@ -279,6 +272,7 @@ mono_exception_from_name_msg
 mono_exception_from_name_two_strings
 mono_exception_from_token
 mono_exception_from_token_two_strings
+mono_exception_walk_trace
 mono_field_from_token
 mono_field_full_name
 mono_field_get_data
@@ -325,8 +319,17 @@ mono_gc_get_heap_size
 mono_gc_get_used_size
 mono_gc_invoke_finalizers
 mono_gc_is_finalizer_thread
+mono_gc_make_root_descr_user
 mono_gc_max_generation
 mono_gc_out_of_memory
+mono_gc_reference_queue_add
+mono_gc_reference_queue_free
+mono_gc_reference_queue_new
+mono_gc_register_bridge_callbacks
+mono_gc_scan_for_specific_ref
+mono_gc_toggleref_add
+mono_gc_toggleref_register_callback
+mono_gc_wait_for_bridge_processing
 mono_gc_walk_heap
 mono_gc_wbarrier_arrayref_copy
 mono_gc_wbarrier_generic_nostore
@@ -347,6 +350,8 @@ mono_get_char_class
 mono_get_config_dir
 mono_get_corlib
 mono_get_dbnull_object
+mono_get_delegate_begin_invoke
+mono_get_delegate_end_invoke
 mono_get_delegate_invoke
 mono_get_double_class
 mono_get_enum_class
@@ -399,6 +404,7 @@ mono_get_method_constrained
 mono_get_method_full
 mono_get_object_class
 mono_get_root_domain
+mono_get_runtime_build_info
 mono_get_sbyte_class
 mono_get_single_class
 mono_get_string_class
@@ -461,6 +467,8 @@ mono_install_assembly_search_hook
 mono_install_runtime_cleanup
 mono_install_threadpool_item_hooks
 mono_install_threadpool_thread_hooks
+mono_install_unhandled_exception_hook
+mono_invoke_unhandled_exception_hook
 mono_is_debugger_attached
 mono_jit_cleanup
 mono_jit_exec
@@ -472,14 +480,17 @@ mono_jit_init
 mono_jit_init_version
 mono_jit_parse_options
 mono_jit_set_aot_only
+mono_jit_set_domain
 mono_jit_set_trace_options
 mono_jit_thread_attach
 mono_ldstr
 mono_ldtoken
+mono_lls_init
 mono_load_remote_field
 mono_load_remote_field_new
 mono_local_deadce
 mono_locks_dump
+mono_lookup_icall_symbol
 mono_lookup_internal_call
 mono_lookup_pinvoke_call
 mono_main
@@ -614,6 +625,7 @@ mono_monitor_enter
 mono_monitor_exit
 mono_monitor_try_enter
 mono_mprotect
+mono_mutex_init_suspend_safe
 mono_object_castclass_mbyref
 mono_object_castclass_with_cache
 mono_object_clone
@@ -708,6 +720,7 @@ mono_reflection_get_token
 mono_reflection_get_type
 mono_reflection_parse_type
 mono_reflection_type_from_name
+mono_reflection_type_get_type
 mono_register_bundled_assemblies
 mono_register_config_for_assembly
 mono_register_machine_config
@@ -725,9 +738,14 @@ mono_runtime_invoke_array
 mono_runtime_is_shutting_down
 mono_runtime_object_init
 mono_runtime_quit
+mono_runtime_resource_check_limit
+mono_runtime_resource_limit
+mono_runtime_resource_set_callback
 mono_runtime_run_main
 mono_runtime_set_shutting_down
+mono_security_core_clr_get_options
 mono_security_core_clr_require_elevated_permissions
+mono_security_core_clr_set_options
 mono_security_enable_core_clr
 mono_security_set_core_clr_platform_callback
 mono_sem_post
@@ -759,6 +777,7 @@ mono_signature_get_params
 mono_signature_get_return_type
 mono_signature_hash
 mono_signature_is_instance
+mono_signature_param_is_out
 mono_signature_vararg_start
 mono_signbit_double
 mono_signbit_float
@@ -793,6 +812,7 @@ mono_thread_exit
 mono_thread_get_main
 mono_thread_get_undeniable_exception
 mono_thread_init
+mono_thread_is_foreign
 mono_thread_manage
 mono_thread_new_init
 mono_thread_set_main
@@ -801,6 +821,8 @@ mono_thread_stop
 mono_threads_get_default_stacksize
 mono_threads_request_thread_dump
 mono_threads_set_default_stacksize
+mono_tls_key_get_offset
+mono_tls_key_set_offset
 mono_trace_set_level_string
 mono_trace_set_mask_string
 mono_type_create_from_typespec
@@ -833,6 +855,7 @@ mono_utf8_from_external
 mono_utf8_validate_and_len
 mono_utf8_validate_and_len_with_bounds
 mono_valloc
+mono_valloc_aligned
 mono_value_box
 mono_value_copy
 mono_value_copy_array
index 72be9d4721ba7a6ba80a8002a2538b737ab066ba..811ba97516c3149988598aade0f3ae8130878ded 100644 (file)
 /* Define to 1 if you have the <curses.h> header file. */
 /* #undef HAVE_CURSES_H */
 
+/* Define to 1 if you have the declaration of `InterlockedAdd',
+   and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDADD 1
+
+/* Define to 1 if you have the declaration of `InterlockedAdd64',
+   and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDADD64 1
+
 /* Define to 1 if you have the declaration of `InterlockedCompareExchange64',
    and to 0 if you don't. */
 #define HAVE_DECL_INTERLOCKEDCOMPAREEXCHANGE64 1
 
+/* Define to 1 if you have the declaration of `InterlockedDecrement64',
+   and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDDECREMENT64 1
+
+/* Define to 1 if you have the declaration of `InterlockedExchange64',
+   and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDEXCHANGE64 1
+
+/* Define to 1 if you have the declaration of `InterlockedIncrement64',
+   and to 0 if you don't. */
+#define HAVE_DECL_INTERLOCKEDINCREMENT64 1
+
 /* Define to 1 if you have the declaration of `__readfsdword',
    and to 0 if you don't. */
 #define HAVE_DECL___READFSDWORD 1