-Subproject commit fcfda01aa7f7d2faf975b86ee1ffd54adb52c2b3
+Subproject commit 8259de00d0ea77ecdcbf4bf62a3446f86cf4a1ac
--- /dev/null
+// help building System.Data without win32-specific p/invokes
+
+using System;
+using System.Diagnostics;
+
+internal static partial class Bid {
+ internal enum ApiGroup : uint {
+ Pooling = 0x00001000,
+ Correlation = 0x00040000,
+ }
+
+ internal static bool AdvancedOn {
+ get { return false; }
+ }
+
+ internal static bool IsOn (ApiGroup flag)
+ {
+ return false;
+ }
+
+ [Conditional ("BID")]
+ internal static void Trace (params object[] a)
+ {
+ }
+
+ [Conditional ("BID")]
+ internal static void PoolerTrace (params object[] a)
+ {
+ }
+
+ // out method can't be conditional
+ internal static void ScopeEnter (out IntPtr p, params object[] a)
+ {
+ p = IntPtr.Zero;
+ }
+
+ [Conditional ("BID")]
+ internal static void ScopeLeave (ref IntPtr a)
+ {
+ }
+
+ // out method can't be conditional
+ internal static void PoolerScopeEnter (out IntPtr p, string a, System.Int32 b)
+ {
+ p = IntPtr.Zero;
+ }
+}
+
+[ConditionalAttribute ("CODE_ANALYSIS")]
+[AttributeUsage (AttributeTargets.Method)]
+internal sealed class BidMethodAttribute : Attribute {
+}
+
+[ConditionalAttribute ("CODE_ANALYSIS")]
+[AttributeUsage (AttributeTargets.Parameter | AttributeTargets.Method, AllowMultiple=true)]
+internal sealed class BidArgumentTypeAttribute : Attribute {
+ internal BidArgumentTypeAttribute (Type bidArgumentType)
+ {
+ }
+}
+
+namespace System.Data.Common {
+
+ internal static class UnsafeNativeMethods {
+
+ // note: likely unreachable code - as this never worked on mono
+ internal static int lstrlenW (IntPtr p)
+ {
+ throw new NotImplementedException ();
+ }
+
+ static internal int CreateWellKnownSid (int sidType, byte[] domainSid, byte[] resultSid, ref uint resultSidLength )
+ {
+ return -1;
+ }
+
+ static internal bool CheckTokenMembership (IntPtr tokenHandle, byte[] sidToCheck, out bool isMember)
+ {
+ isMember = false;
+ return false;
+ }
+
+ static internal bool GetTokenInformation (IntPtr tokenHandle, uint token_class, IntPtr tokenStruct, uint tokenInformationLength, ref uint tokenString)
+ {
+ return false;
+ }
+
+ static internal bool ConvertSidToStringSidW (IntPtr sid, out IntPtr stringSid)
+ {
+ stringSid = IntPtr.Zero;
+ return false;
+ }
+ }
+}
-../../../external/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs
+MobileStubs.cs
../../../external/referencesource/System.Data/Microsoft/SqlServer/Server/SqlTriggerContext.cs
../../../external/referencesource/System.Data/System/Data/Common/SQLTypes/SqlXmlStorage.cs
../../../external/referencesource/System.Data/System/Data/Common/StringStorage.cs
../../../external/referencesource/System.Data/System/Data/Common/SupportedJoinOperators.cs
-../../../external/referencesource/System.Data/System/Data/Common/System.Data_BID.cs
../../../external/referencesource/System.Data/System/Data/Common/TimeSpanStorage.cs
../../../external/referencesource/System.Data/System/Data/Common/UInt16Storage.cs
../../../external/referencesource/System.Data/System/Data/Common/UInt32Storage.cs
../../../external/referencesource/System.Data/System/Data/Common/UInt64Storage.cs
-../../../external/referencesource/System.Data/System/Data/Common/UnsafeNativeMethods.cs
../../../external/referencesource/System.Data/System/Data/ConflictOptions.cs
../../../external/referencesource/System.Data/System/Data/ConnectionState.cs
../../../external/referencesource/System.Data/System/Data/ConstraintCollection.cs
namespace System.Drawing
{
+#if !MONOTOUCH && !MONOMAC
[TypeConverter(typeof(ColorConverter))]
[Editor ("System.Drawing.Design.ColorEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
+#endif
[Serializable]
public struct Color {
0xFF316AC5, /* 174 - MenuHighlight */
};
+#if !MONOTOUCH && !MONOMAC
static KnownColors ()
{
if (GDIPlus.RunningOnWindows ()) {
ArgbValues [(int)KnownColor.MenuBar] = GetSysColor (GetSysColorIndex.COLOR_MENUBAR);
ArgbValues [(int)KnownColor.MenuHighlight] = GetSysColor (GetSysColorIndex.COLOR_MENUHIGHLIGHT);
}
+#endif
public static Color FromKnownColor (KnownColor kc)
{
{
[Serializable]
[ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
[TypeConverter (typeof (PointConverter))]
+#endif
public struct Point
{
// Private x and y coordinate fields.
{
[Serializable]
[ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
[TypeConverter (typeof (RectangleConverter))]
+#endif
public struct Rectangle
{
private int x, y, width, height;
{
[Serializable]
[ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
[TypeConverter (typeof (SizeConverter))]
+#endif
public struct Size
{
{
[Serializable]
[ComVisible (true)]
+#if !MONOTOUCH && !MONOMAC
[TypeConverter (typeof (SizeFConverter))]
+#endif
public struct SizeF
{
// Private height and width fields.
--- /dev/null
+// help compiles sources for mobile without having unusable
+// Windows p/invoke in the assemblies
+//
+// Copyright 2015 Xamarin Inc.
+
+#if MOBILE
+
+namespace System.Runtime.Interop {
+
+ using Microsoft.Win32.SafeHandles;
+ using System.Runtime.Diagnostics;
+ using System.Runtime.InteropServices;
+ using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
+
+ sealed class SafeEventLogWriteHandle : SafeHandleZeroOrMinusOneIsInvalid {
+
+ SafeEventLogWriteHandle () : base (true)
+ {
+ }
+
+ public static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ static bool DeregisterEventSource (IntPtr hEventLog)
+ {
+ throw new NotImplementedException ();
+ }
+
+ protected override bool ReleaseHandle ()
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ static class UnsafeNativeMethods {
+
+ public const int ERROR_MORE_DATA = 234;
+ public const int ERROR_ARITHMETIC_OVERFLOW = 534;
+ public const int ERROR_NOT_ENOUGH_MEMORY = 8;
+
+ [StructLayout (LayoutKind.Explicit, Size = 16)]
+ public struct EventData {
+ [FieldOffset(0)]
+ internal UInt64 DataPointer;
+ [FieldOffset(8)]
+ internal uint Size;
+ [FieldOffset(12)]
+ internal int Reserved;
+ }
+
+ public static SafeWaitHandle CreateWaitableTimer (IntPtr mustBeZero, bool manualReset, string timerName)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static bool SetWaitableTimer (SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static int QueryPerformanceCounter (out long time)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static uint GetSystemTimeAdjustment (out int adjustment, out uint increment, out uint adjustmentDisabled)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static void GetSystemTimeAsFileTime (out long time)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static string GetComputerName (ComputerNameFormat nameType)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static bool IsDebuggerPresent ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static void DebugBreak ()
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static void OutputDebugString (string lpOutputString)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal unsafe delegate void EtwEnableCallback (ref Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, void* filterData, void* callbackContext);
+
+ internal static unsafe uint EventRegister (ref Guid providerId, EtwEnableCallback enableCallback, void* callbackContext, ref long registrationHandle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static uint EventUnregister (long registrationHandle)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static bool EventEnabled (long registrationHandle, ref EventDescriptor eventDescriptor)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static unsafe uint EventWrite (long registrationHandle, ref EventDescriptor eventDescriptor, uint userDataCount, EventData* userData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static unsafe uint EventWriteTransfer (long registrationHandle, ref EventDescriptor eventDescriptor, ref Guid activityId, ref Guid relatedActivityId, uint userDataCount, EventData* userData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static unsafe uint EventWriteString (long registrationHandle, byte level, long keywords, char* message)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static unsafe uint EventActivityIdControl (int ControlCode, ref Guid ActivityId)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static bool ReportEvent (SafeHandle hEventLog, ushort type, ushort category, uint eventID, byte[] userSID, ushort numStrings, uint dataLen, HandleRef strings, byte[] rawData)
+ {
+ throw new NotImplementedException ();
+ }
+
+ internal static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif
--- /dev/null
+../../build/common/Consts.cs
+../../build/common/SR.cs
+EventLogEntryType.cs
+InternalSR.cs
+MobileStubs.cs
+Assembly/AssemblyInfo.cs
+../../../external/referencesource/System.ServiceModel.Internals/AssemblyInfo.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ActionItem.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AssertHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AsyncCompletionResult.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AsyncEventArgsCallback.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AsyncEventArgs.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AsyncResult.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/AsyncWaitHandle.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/BackoffTimeoutHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/BufferedOutputStream.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/CallbackException.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/HopperCache.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/NullableKeyDictionary.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/ObjectCache.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/ObjectCacheItem.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/ObjectCacheSettings.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/OrderedDictionary.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Collections/ValidatingCollection.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/CompletedAsyncResult.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ComputerNameFormat.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/ActivityControl.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/DiagnosticEventProvider.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/DiagnosticTraceBase.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/DiagnosticTraceSource.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/DictionaryTraceRecord.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EtwDiagnosticTrace.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EtwProvider.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EventDescriptor.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EventLogCategory.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EventLogEventId.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EventLogger.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/EventTraceActivity.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/ITraceSourceStringProvider.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/PerformanceCounterNameAttribute.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/StringTraceRecord.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Diagnostics/TraceRecord.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/DiagnosticStrings.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/DuplicateDetector.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ExceptionTrace.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/FastAsyncCallback.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/FatalException.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/FxCop.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Fx.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/HashHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/IAsyncEventArgs.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/InputQueue.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/InternalBufferManager.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/IOThreadCancellationTokenSource.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/IOThreadScheduler.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/IOThreadTimer.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/MruCache.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/NameGenerator.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/PartialTrustHelpers.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ReadOnlyDictionaryInternal.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ReadOnlyKeyedCollection.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ScheduleActionItemAsyncResult.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/SignalGate.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/SynchronizedPool.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TaskExtensions.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/ThreadNeutralSemaphore.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/Ticks.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TimeoutHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TraceChannel.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TraceEventLevel.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TraceEventOpcode.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TraceLevelHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TracePayload.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TypedAsyncResult.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/TypeHelper.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/UrlUtility.cs
+../../../external/referencesource/System.ServiceModel.Internals/System/Runtime/WaitCallbackActionItem.cs
+../../../external/referencesource/System.ServiceModel.Internals/TraceCore.Designer.cs
--- /dev/null
+#include mobile_System.ServiceModel.Internals.dll.sources
\ No newline at end of file
--- /dev/null
+#include monotouch_System.ServiceModel.Internals.dll.sources
\ No newline at end of file
--- /dev/null
+#include monotouch_System.ServiceModel.Internals.dll.sources
\ No newline at end of file
}
}
+#if !MOBILE
class Win32GatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
{
public static readonly Win32GatewayIPAddressInformationCollection Empty = new Win32GatewayIPAddressInformationCollection (true);
get { return is_readonly; }
}
}
+#endif
class UnixGatewayIPAddressInformationCollection : GatewayIPAddressInformationCollection
{
}
}
+#if !MOBILE
class Win32IPAddressCollection : IPAddressCollection
{
public static readonly Win32IPAddressCollection Empty = new Win32IPAddressCollection (IntPtr.Zero);
get { return is_readonly; }
}
}
+#endif
}
get { return is_readonly; }
}
+#if !MOBILE
public static IPAddressInformationCollection Win32FromAnycast (IntPtr ptr)
{
IPAddressInformationImplCollection c = new IPAddressInformationImplCollection (false);
c.is_readonly = true;
return c;
}
+#endif
public static IPAddressInformationImplCollection LinuxFromAnycast (IList<IPAddress> addresses)
{
{
#if MONODROID
return new AndroidIPGlobalProperties ();
+#elif MONOTOUCH || XAMMAC
+ return new UnixIPGlobalProperties ();
#else
switch (Environment.OSVersion.Platform) {
case PlatformID.Unix:
}
}
+#if MONODROID
sealed class AndroidIPGlobalProperties : UnixIPGlobalProperties
{
public override string DomainName {
}
}
}
+#endif
// It expects /proc/net/snmp (or /usr/compat/linux/proc/net/snmp),
// formatted like:
}
}
+#if !MOBILE
class Win32IPGlobalProperties : IPGlobalProperties
{
public const int AF_INET = 2;
}
}
}
+#endif
}
}
}
+#if !MOBILE
class Win32IPGlobalStatistics : IPGlobalStatistics
{
Win32_MIB_IPSTATS info;
get { return info.InUnknownProtos; }
}
}
-
+
[StructLayout (LayoutKind.Sequential)]
struct Win32_MIB_IPSTATS
{
public int NumAddr;
public int NumRoutes;
}
+#endif
}
}
}
+#if !MOBILE
class Win32IPInterfaceProperties2 : IPInterfaceProperties
{
readonly Win32_IP_ADAPTER_ADDRESSES addr;
}
}
+#endif
}
}
}
+#if !MOBILE
sealed class Win32IPv4InterfaceProperties : IPv4InterfaceProperties
{
[DllImport ("iphlpapi.dll")]
public IntPtr CurrentDnsServer; // to Win32_IP_ADDR_STRING
public Win32_IP_ADDR_STRING DnsServerList;
}
+#endif
}
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Net.NetworkInformation {
+#if !MOBILE
class Win32IPv4InterfaceStatistics : IPv4InterfaceStatistics
{
Win32_MIB_IFROW info;
}
}
+#endif
class LinuxIPv4InterfaceStatistics : IPv4InterfaceStatistics
{
public abstract int Index { get; }
public abstract int Mtu { get; }
}
-
+#if !MOBILE
class Win32IPv6InterfaceProperties : IPv6InterfaceProperties
{
Win32_MIB_IFROW mib;
get { return mib.Mtu; }
}
}
+#endif
}
}
}
+#if !MOBILE
class Win32IcmpV4Statistics : IcmpV4Statistics
{
Win32_MIBICMPSTATS iin, iout;
public uint AddrMasks;
public uint AddrMaskReps;
}
+#endif
}
public const int RouterRenumbering = 138;
}
+#if !MOBILE
class Win32IcmpV6Statistics : IcmpV6Statistics
{
Win32_MIBICMPSTATS_EX iin, iout;
[MarshalAs (UnmanagedType.ByValArray, SizeConst = 256)]
public uint [] Counts;
}
+#endif
}
get { return is_readonly; }
}
+#if !MOBILE
public static MulticastIPAddressInformationCollection Win32FromMulticast (IntPtr ptr)
{
MulticastIPAddressInformationImplCollection c = new MulticastIPAddressInformationImplCollection (false);
c.is_readonly = true;
return c;
}
+#endif
public static MulticastIPAddressInformationImplCollection LinuxFromList (List<IPAddress> addresses)
{
}
}
+#if !MOBILE
class Win32NetworkInterfaceAPI : NetworkInterfaceFactory
{
[DllImport ("iphlpapi.dll", SetLastError = true)]
throw new NotImplementedException ();
}
}
+#endif
public abstract NetworkInterface [] GetAllNetworkInterfaces ();
public abstract int GetLoopbackInterfaceIndex ();
public static NetworkInterfaceFactory Create ()
{
-#if MONOTOUCH
+#if MONOTOUCH || XAMMAC
return new MacOsNetworkInterfaceAPI ();
#else
Version windowsVer51 = new Version (5, 1);
}
}
+#if !MOBILE
class Win32NetworkInterface2 : NetworkInterface
{
[DllImport ("iphlpapi.dll", SetLastError = true)]
get { return !addr.NoMulticast; }
}
}
+#endif
}
}
}
+#if !MOBILE
class Win32TcpStatistics : TcpStatistics
{
Win32_MIB_TCPSTATS info;
public uint OutRsts;
public uint NumConns;
}
-
+#endif
}
}
}
+#if !MOBILE
class Win32UdpStatistics : UdpStatistics
{
Win32_MIB_UDPSTATS info;
public uint OutDatagrams;
public int NumAddrs;
}
+#endif
}
using System.Net.Sockets;
namespace System.Net.NetworkInformation {
+#if !MOBILE
class Win32UnicastIPAddressInformation : UnicastIPAddressInformation
{
int if_index;
get { return info.SuffixOrigin; }
}
}
+#endif
class LinuxUnicastIPAddressInformation : UnicastIPAddressInformation
{
get { return is_readonly; }
}
+#if !MOBILE
public static UnicastIPAddressInformationCollection Win32FromUnicast (int ifIndex, IntPtr ptr)
{
UnicastIPAddressInformationImplCollection c = new UnicastIPAddressInformationImplCollection (false);
c.is_readonly = true;
return c;
}
+#endif
public static UnicastIPAddressInformationCollection LinuxFromList (List<IPAddress> addresses)
{
// static methods
- private const int MaxUriLength = 32766;
+ private const int MaxUriLength = 0xfff0;
public static int Compare (Uri uri1, Uri uri2, UriComponents partsToCompare, UriFormat compareFormat, StringComparison comparisonType)
{
if (stringToEscape == null)
throw new ArgumentNullException ("stringToEscape");
- if (stringToEscape.Length > MaxUriLength) {
+ if (stringToEscape.Length >= MaxUriLength) {
throw new UriFormatException (string.Format ("Uri is longer than the maximum {0} characters.", MaxUriLength));
}
if (stringToEscape == null)
throw new ArgumentNullException ("stringToEscape");
- if (stringToEscape.Length > MaxUriLength) {
+ if (stringToEscape.Length >= MaxUriLength) {
throw new UriFormatException (string.Format ("Uri is longer than the maximum {0} characters.", MaxUriLength));
}
System.Net.NetworkInformation/UdpStatistics.cs
System.Net.NetworkInformation/UnicastIPAddressInformation.cs
System.Net.NetworkInformation/UnicastIPAddressInformationCollection.cs
-System.Net.NetworkInformation/Win32NetworkInterfaceMarshal.cs
System.Net.Security/AuthenticatedStream.cs
System.Net.Security/AuthenticationLevel.cs
System.Net.Security/EncryptionPolicy.cs
}
}
+ [Test]
+ public void Parse_SameTimeAndDateSeparator ()
+ {
+ var fiFI = (CultureInfo) CultureInfo.GetCultureInfo("fi-FI").Clone();
+
+ fiFI.DateTimeFormat.TimeSeparator = fiFI.DateTimeFormat.DateSeparator;
+
+ var dt = DateTime.Parse("4.3.2010", fiFI);
+
+ Assert.AreEqual (2010, dt.Year, "#1");
+ Assert.AreEqual (3, dt.Month, "#2");
+ Assert.AreEqual (4, dt.Day, "#3");
+ }
+
+
[Test]
[ExpectedException (typeof (FormatException))]
public void Parse_RequireSpaceSeparator ()
else {
Console.Error.WriteLine ("mdoc: {0}", e.Message);
}
- Console.Error.WriteLine ("See `mdoc help' for more information.");
+ Console.Error.WriteLine ("See `mdoc help' for more information or use --debug to diagnose.");
Environment.ExitCode = 1;
}
}
XmlDocument doc = new XmlDocument ();
doc.Load (typefile.FullName);
XmlElement e = doc.SelectSingleNode("/Type") as XmlElement;
- string assemblyName = doc.SelectSingleNode ("/Type/AssemblyInfo/AssemblyName").InnerText;
+ var assemblyNameNode = doc.SelectSingleNode ("/Type/AssemblyInfo/AssemblyName");
+ if (assemblyNameNode == null){
+ Warning ("Did not find /Type/AssemblyInfo/AssemblyName on {0}", typefile.FullName);
+ continue;
+ }
+ string assemblyName = assemblyNameNode.InnerText;
AssemblyDefinition assembly = assemblies.FirstOrDefault (a => a.Name.Name == assemblyName);
Action saveDoc = () => {
sources.Add (args [i]);
break;
}
-
- if (static_link && style == "windows") {
- Console.Error.WriteLine ("The option `{0}' is not supported on this platform.", args [i]);
- return 1;
- }
+
}
Console.WriteLine ("Sources: {0} Auto-dependencies: {1}", sources.Count, autodeps);
}
ts.Close ();
- string assembler = GetEnv ("AS", IsUnix ? "as" : "i686-pc-mingw32-as");
-
- Console.WriteLine ("Compiling:");
- string cmd = String.Format ("{0} -o {1} {2} ", assembler, temp_o, temp_s);
- int ret = Execute (cmd);
- if (ret != 0){
- Error ("[Fail]");
- return;
- }
-
if (compress)
tc.WriteLine ("\nstatic const CompressedAssembly *compressed [] = {");
else
string maintemplate = st.ReadToEnd ();
tc.Write (maintemplate);
}
-
+
tc.Close ();
if (compile_only)
return;
+ Console.WriteLine("Compiling:");
- string zlib = (compress ? "-lz" : "");
- string debugging = "-g";
- string cc = GetEnv ("CC", IsUnix ? "cc" : "i686-pc-mingw32-gcc");
+ if (style == "windows")
+ {
+ string assembler = GetEnv("AS", "as");
+ string as_cmd = String.Format("{0} -o {1} {2} ", assembler, temp_o, temp_s);
+ Execute(as_cmd);
- if (style == "linux")
- debugging = "-ggdb";
- if (static_link) {
- string smonolib;
- if (style == "osx")
- smonolib = "`pkg-config --variable=libdir mono-2`/libmono-2.0.a ";
- else
- smonolib = "-Wl,-Bstatic -lmono-2.0 -Wl,-Bdynamic ";
- cmd = String.Format ("{4} -o {2} -Wall `pkg-config --cflags mono-2` {0} {3} " +
- "`pkg-config --libs-only-L mono-2` " + smonolib +
- "`pkg-config --libs-only-l mono-2 | sed -e \"s/\\-lmono-2.0 //\"` {1}",
- temp_c, temp_o, output, zlib, cc);
- } else {
-
- cmd = String.Format ("{4} " + debugging + " -o {2} -Wall {0} `pkg-config --cflags --libs mono-2` {3} {1}",
- temp_c, temp_o, output, zlib, cc);
+ Func<string, string> quote = (pp) => { return "\"" + pp + "\""; };
+
+ string compiler = GetEnv("CC", "cl.exe");
+ string winsdkPath = GetEnv("WINSDK", @"C:\Program Files (x86)\Windows Kits\8.1");
+ string vsPath = GetEnv("VSINCLUDE", @"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC");
+ string monoPath = GetEnv("MONOPREFIX", @"C:\Program Files (x86)\Mono");
+
+ string[] includes = new string[] {winsdkPath + @"\Include\um", winsdkPath + @"\Include\shared", vsPath + @"\include", monoPath + @"\include\mono-2.0"};
+ string[] libs = new string[] { winsdkPath + @"\Lib\winv6.3\um\x86" , vsPath + @"\lib" };
+ string monoFile;
+
+ var compilerArgs = new List<string>();
+ foreach (string include in includes)
+ compilerArgs.Add(String.Format ("/I {0}", quote (include)));
+
+ if (static_link) {
+ compilerArgs.Add("/MT");
+ monoFile = monoPath + @"\lib\mono-2.0.lib";
+ }
+ else {
+ compilerArgs.Add("/MD");
+ monoFile = monoPath + @"\lib\mono-2.0.dll";
+ }
+
+ compilerArgs.Add(temp_c);
+ compilerArgs.Add(temp_o);
+ compilerArgs.Add("/link");
+
+ foreach (string lib in libs)
+ compilerArgs.Add(String.Format ("/LIBPATH:{0}", quote(lib)));
+ compilerArgs.Add (quote(monoFile));
+
+ string cl_cmd = String.Format("{0} {1}", compiler, String.Join(" ", compilerArgs.ToArray()));
+ Execute (cl_cmd);
}
-
- ret = Execute (cmd);
- if (ret != 0){
- Error ("[Fail]");
- return;
+ else
+ {
+ string assembler = GetEnv("AS", "as");
+ string cmd = String.Format("{0} -o {1} {2} ", assembler, temp_o, temp_s);
+ Execute(cmd);
+
+ string zlib = (compress ? "-lz" : "");
+ string debugging = "-g";
+ string cc = GetEnv("CC", "cc");
+
+ if (style == "linux")
+ debugging = "-ggdb";
+ if (static_link)
+ {
+ string smonolib;
+ if (style == "osx")
+ smonolib = "`pkg-config --variable=libdir mono-2`/libmono-2.0.a ";
+ else
+ smonolib = "-Wl,-Bstatic -lmono-2.0 -Wl,-Bdynamic ";
+ cmd = String.Format("{4} -o {2} -Wall `pkg-config --cflags mono-2` {0} {3} " +
+ "`pkg-config --libs-only-L mono-2` " + smonolib +
+ "`pkg-config --libs-only-l mono-2 | sed -e \"s/\\-lmono-2.0 //\"` {1}",
+ temp_c, temp_o, output, zlib, cc);
+ }
+ else
+ {
+
+ cmd = String.Format("{4} " + debugging + " -o {2} -Wall {0} `pkg-config --cflags --libs mono-2` {3} {1}",
+ temp_c, temp_o, output, zlib, cc);
+ }
+ Execute (cmd);
}
+
Console.WriteLine ("Done");
- }
- }
+ }
+ }
} finally {
if (!keeptemp){
if (object_out == null){
}
}
- static int Execute (string cmdLine)
+ static void Execute (string cmdLine)
{
if (IsUnix) {
Console.WriteLine (cmdLine);
- return system (cmdLine);
+ int ret = system (cmdLine);
+ if (ret != 0)
+ {
+ Error(String.Format("[Fail] {0}", ret));
+ }
}
-
+
// on Windows, we have to pipe the output of a
// `cmd` interpolation to dos2unix, because the shell does not
// strip the CRLFs generated by the native pkg-config distributed
// with Mono.
//
// But if it's *not* on cygwin, just skip it.
-
+
// check if dos2unix is applicable.
- if (use_dos2unix == null) {
- use_dos2unix = false;
+ if (use_dos2unix == true)
try {
- var info = new ProcessStartInfo ("dos2unix");
- info.CreateNoWindow = true;
- info.RedirectStandardInput = true;
- info.UseShellExecute = false;
- var dos2unix = Process.Start (info);
- dos2unix.StandardInput.WriteLine ("aaa");
- dos2unix.StandardInput.WriteLine ("\u0004");
- dos2unix.StandardInput.Close ();
- dos2unix.WaitForExit ();
- if (dos2unix.ExitCode == 0)
- use_dos2unix = true;
- } catch {
- // ignore
- }
- }
- // and if there is no dos2unix, just run cmd /c.
- if (use_dos2unix == false) {
- Console.WriteLine (cmdLine);
- ProcessStartInfo dos2unix = new ProcessStartInfo ();
- dos2unix.UseShellExecute = false;
- dos2unix.FileName = "cmd";
- dos2unix.Arguments = String.Format ("/c \"{0}\"", cmdLine);
-
- using (Process p = Process.Start (dos2unix)) {
- p.WaitForExit ();
- return p.ExitCode;
- }
+ var info = new ProcessStartInfo ("dos2unix");
+ info.CreateNoWindow = true;
+ info.RedirectStandardInput = true;
+ info.UseShellExecute = false;
+ var dos2unix = Process.Start (info);
+ dos2unix.StandardInput.WriteLine ("aaa");
+ dos2unix.StandardInput.WriteLine ("\u0004");
+ dos2unix.StandardInput.Close ();
+ dos2unix.WaitForExit ();
+ if (dos2unix.ExitCode == 0)
+ use_dos2unix = true;
+ } catch {
+ Console.WriteLine("Warning: dos2unix not found");
+ use_dos2unix = false;
}
- StringBuilder b = new StringBuilder ();
- int count = 0;
- for (int i = 0; i < cmdLine.Length; i++) {
- if (cmdLine [i] == '`') {
- if (count % 2 != 0) {
- b.Append ("|dos2unix");
+ if (use_dos2unix == null)
+ use_dos2unix = false;
+
+ ProcessStartInfo psi = new ProcessStartInfo();
+ psi.UseShellExecute = false;
+
+ // if there is no dos2unix, just run cmd /c.
+ if (use_dos2unix == false)
+ {
+ psi.FileName = "cmd";
+ psi.Arguments = String.Format("/c \"{0}\"", cmdLine);
+ }
+ else
+ {
+ psi.FileName = "sh";
+ StringBuilder b = new StringBuilder();
+ int count = 0;
+ for (int i = 0; i < cmdLine.Length; i++)
+ {
+ if (cmdLine[i] == '`')
+ {
+ if (count % 2 != 0)
+ {
+ b.Append("|dos2unix");
+ }
+ count++;
}
- count++;
+ b.Append(cmdLine[i]);
}
- b.Append (cmdLine [i]);
+ cmdLine = b.ToString();
+ psi.Arguments = String.Format("-c \"{0}\"", cmdLine);
}
- cmdLine = b.ToString ();
- Console.WriteLine (cmdLine);
-
- ProcessStartInfo psi = new ProcessStartInfo ();
- psi.UseShellExecute = false;
- psi.FileName = "sh";
- psi.Arguments = String.Format ("-c \"{0}\"", cmdLine);
+ Console.WriteLine(cmdLine);
using (Process p = Process.Start (psi)) {
p.WaitForExit ();
- return p.ExitCode;
+ int ret = p.ExitCode;
+ if (ret != 0){
+ Error (String.Format("[Fail] {0}", ret));
+ }
}
}
- static string GetEnv (string name, string defaultValue)
+ static string GetEnv(string name, string defaultValue)
{
- string s = Environment.GetEnvironmentVariable (name);
- return s != null ? s : defaultValue;
+ string val = Environment.GetEnvironmentVariable(name);
+ if (val != null)
+ {
+ Console.WriteLine("{0} = {1}", name, val);
+ }
+ else
+ {
+ val = defaultValue;
+ Console.WriteLine("{0} = {1} (default)", name, val);
+ }
+ return val;
}
}
struct _MonoPPDBFile {
MonoImage *image;
- GHashTable *doc_cache;
+ GHashTable *doc_hash;
+ GHashTable *method_hash;
};
/* IMAGE_DEBUG_DIRECTORY structure */
return FALSE;
}
+static void
+doc_free (gpointer key)
+{
+ MonoDebugSourceInfo *info = key;
+
+ g_free (info->source_file);
+ g_free (info);
+}
+
MonoPPDBFile*
mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
{
}
ppdb_image = mono_image_open_metadata_only (ppdb_filename, &status);
+ if (!ppdb_image)
+ g_free (ppdb_filename);
}
if (!ppdb_image)
return NULL;
ppdb = g_new0 (MonoPPDBFile, 1);
ppdb->image = ppdb_image;
+ ppdb->doc_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) doc_free);
+ ppdb->method_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_free);
return ppdb;
}
MonoPPDBFile *ppdb = handle->ppdb;
mono_image_close (ppdb->image);
- if (ppdb->doc_cache)
- g_hash_table_destroy (ppdb->doc_cache);
+ g_hash_table_destroy (ppdb->doc_hash);
+ g_hash_table_destroy (ppdb->method_hash);
g_free (ppdb);
}
mono_ppdb_lookup_method (MonoDebugHandle *handle, MonoMethod *method)
{
MonoDebugMethodInfo *minfo;
+ MonoPPDBFile *ppdb = handle->ppdb;
if (handle->image != mono_class_get_image (mono_method_get_class (method)))
return NULL;
- // FIXME: Cache
+ mono_debugger_lock ();
- // FIXME: Methods without tokens
+ minfo = g_hash_table_lookup (ppdb->method_hash, method);
+ if (minfo) {
+ mono_debugger_unlock ();
+ return minfo;
+ }
minfo = g_new0 (MonoDebugMethodInfo, 1);
minfo->index = 0;
minfo->method = method;
minfo->handle = handle;
+ g_hash_table_insert (ppdb->method_hash, method, minfo);
+
+ mono_debugger_unlock ();
+
return minfo;
}
int size, part_size, partidx, nparts;
char sep;
GString *s;
- MonoDebugSourceInfo *res;
+ MonoDebugSourceInfo *res, *cached;
- // FIXME: Cache
+ mono_debugger_lock ();
+ cached = g_hash_table_lookup (ppdb->doc_hash, GUINT_TO_POINTER (docidx));
+ mono_debugger_unlock ();
+ if (cached)
+ return cached;
mono_metadata_decode_row (&tables [MONO_TABLE_DOCUMENT], docidx-1, cols, MONO_DOCUMENT_SIZE);
res->guid = NULL;
res->hash = (guint8*)mono_metadata_blob_heap (image, cols [MONO_DOCUMENT_HASH]);
+ mono_debugger_lock ();
+ cached = g_hash_table_lookup (ppdb->doc_hash, GUINT_TO_POINTER (docidx));
+ if (!cached) {
+ g_hash_table_insert (ppdb->doc_hash, GUINT_TO_POINTER (docidx), res);
+ } else {
+ doc_free (res);
+ res = cached;
+ }
+ mono_debugger_unlock ();
return res;
}
docidx = cols [MONO_METHODBODY_DOCUMENT];
- // FIXME:
- g_assert (cols [MONO_METHODBODY_SEQ_POINTS]);
+ if (!cols [MONO_METHODBODY_SEQ_POINTS])
+ return NULL;
ptr = mono_metadata_blob_heap (image, cols [MONO_METHODBODY_SEQ_POINTS]);
size = mono_metadata_decode_blob_size (ptr, &ptr);
end = ptr + size;
while (ptr < end) {
delta_il = mono_metadata_decode_value (ptr, &ptr);
if (!first && delta_il == 0) {
- /* Document record */
- // FIXME:
- g_assert_not_reached ();
+ /* document-record */
+ docidx = mono_metadata_decode_value (ptr, &ptr);
+ docname = get_docname (ppdb, image, docidx);
+ continue;
}
if (!first && iloffset + delta_il > offset)
break;
else
delta_cols = mono_metadata_decode_signed_value (ptr, &ptr);
if (delta_lines == 0 && delta_cols == 0)
- // FIXME:
- g_assert_not_reached ();
+ /* hidden-sequence-point-record */
+ continue;
if (first_non_hidden) {
start_line = mono_metadata_decode_value (ptr, &ptr);
start_col = mono_metadata_decode_value (ptr, &ptr);
iinfo = image->image_info;
header = &iinfo->cli_header;
- for (l = image_loaders; l; l = l->next) {
- MonoImageLoader *loader = l->data;
- if (loader->match (image)) {
- image->loader = loader;
- break;
+ if (!image->metadata_only) {
+ for (l = image_loaders; l; l = l->next) {
+ MonoImageLoader *loader = l->data;
+ if (loader->match (image)) {
+ image->loader = loader;
+ break;
+ }
+ }
+ if (!image->loader) {
+ *status = MONO_IMAGE_IMAGE_INVALID;
+ goto invalid_image;
}
- }
- if (!image->loader) {
- *status = MONO_IMAGE_IMAGE_INVALID;
- goto invalid_image;
- }
- if (status)
- *status = MONO_IMAGE_IMAGE_INVALID;
+ if (status)
+ *status = MONO_IMAGE_IMAGE_INVALID;
- if (care_about_pecoff == FALSE)
- goto done;
+ if (care_about_pecoff == FALSE)
+ goto done;
- if (!image->metadata_only) {
if (image->loader == &pe_loader && !mono_verifier_verify_pe_data (image, &errors))
goto invalid_image;
if (!mono_image_load_pe_data (image))
goto invalid_image;
+ } else {
+ image->loader = &pe_loader;
}
if (care_about_cli == FALSE) {
#include <mono/metadata/mono-gc.h>
MONO_BEGIN_DECLS
-
+/* do not change the values of this enum */
typedef enum {
- MONO_HASH_KEY_GC,
- MONO_HASH_VALUE_GC,
- MONO_HASH_KEY_VALUE_GC
+ MONO_HASH_KEY_GC = 1,
+ MONO_HASH_VALUE_GC = 2,
+ MONO_HASH_KEY_VALUE_GC = MONO_HASH_KEY_GC | MONO_HASH_VALUE_GC,
} MonoGHashGCType;
typedef struct _MonoGHashTable MonoGHashTable;
debugger-agent.h \
debugger-agent.c \
xdebug.c \
+ mini-llvm.h \
mini-llvm-cpp.h \
alias-analysis.c \
mini-cross-helpers.c \
#include "image-writer.h"
#include "dwarfwriter.h"
#include "mini-gc.h"
+#include "mini-llvm.h"
#if !defined(DISABLE_AOT) && !defined(DISABLE_JIT)
if (klass)
add_instances_of (acfg, klass, insts, ninsts, TRUE);
+ /* Add an instance of LongEnumEqualityComparer<long/ulong> which is created by EqualityComparer<T> for enums */
+ {
+ MonoClass *enum_comparer;
+ MonoGenericContext ctx;
+ MonoType *args [16];
+
+ enum_comparer = mono_class_from_name (mono_defaults.corlib, "System.Collections.Generic", "LongEnumEqualityComparer`1");
+ g_assert (enum_comparer);
+
+ memset (&ctx, 0, sizeof (ctx));
+ args [0] = &mono_defaults.int64_class->byval_arg;
+ ctx.class_inst = mono_metadata_get_generic_inst (1, args);
+ add_generic_class (acfg, mono_class_inflate_generic_class (enum_comparer, &ctx), FALSE, "EqualityComparer<T>");
+
+ memset (&ctx, 0, sizeof (ctx));
+ args [0] = &mono_defaults.uint64_class->byval_arg;
+ ctx.class_inst = mono_metadata_get_generic_inst (1, args);
+ add_generic_class (acfg, mono_class_inflate_generic_class (enum_comparer, &ctx), FALSE, "EqualityComparer<T>");
+ }
+
/* Add instances of the array generic interfaces for primitive types */
/* This will add instances of the InternalArray_ helper methods in Array too */
klass = mono_class_from_name (acfg->image, "System.Collections.Generic", "ICollection`1");
}
}
}
+
+ /* object[] accessor wrappers. */
+ {
+ MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, 1);
+ MonoMethod *m;
+
+ m = mono_class_get_method_from_name (obj_array_class, "Get", 1);
+ g_assert (m);
+
+ m = mono_marshal_get_array_accessor_wrapper (m);
+ add_extra_method (acfg, m);
+
+ m = mono_class_get_method_from_name (obj_array_class, "Address", 1);
+ g_assert (m);
+
+ m = mono_marshal_get_array_accessor_wrapper (m);
+ add_extra_method (acfg, m);
+
+ m = mono_class_get_method_from_name (obj_array_class, "Set", 2);
+ g_assert (m);
+
+ m = mono_marshal_get_array_accessor_wrapper (m);
+ add_extra_method (acfg, m);
+ }
}
}
return code;
}
+ /* For ARRAY_ACCESSOR wrappers with reference types, use the <object> instantiation saved in corlib */
+ if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_UNKNOWN) {
+ WrapperInfo *info = mono_marshal_get_wrapper_info (method);
+
+ if (info->subtype == WRAPPER_SUBTYPE_ARRAY_ACCESSOR) {
+ MonoMethod *array_method = info->d.array_accessor.method;
+ if (MONO_TYPE_IS_REFERENCE (&array_method->klass->element_class->byval_arg)) {
+ MonoClass *obj_array_class = mono_array_class_get (mono_defaults.object_class, 1);
+ MonoMethod *m = mono_class_get_method_from_name (obj_array_class, array_method->name, mono_method_signature (array_method)->param_count);
+ g_assert (m);
+
+ m = mono_marshal_get_array_accessor_wrapper (m);
+ if (m != method) {
+ code = mono_aot_get_method (domain, m);
+ if (code)
+ return code;
+ }
+ }
+ }
+ }
+
if (method_index == 0xffffff && method->is_inflated && mono_method_is_generic_sharable_full (method, FALSE, TRUE, FALSE)) {
/* Partial sharing */
MonoMethod *shared;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
/*
* Regression tests for the AOT/FULL-AOT code.
*/
-#if MOBILE
+#if __MOBILE__
class AotTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
static int Main (String[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
return 1;
return 0;
}
+
+ enum LongEnum : ulong {
+ A = 1
+ }
+
+ public static int test_0_long_enum_eq_comparer () {
+ var c = EqualityComparer<LongEnum>.Default;
+ c.GetHashCode (LongEnum.A);
+ return 0;
+ }
+
+ public static int test_0_array_accessor_runtime_invoke_ref () {
+ var t = typeof (string[]);
+ var arr = Array.CreateInstance (typeof (string), 1);
+ arr.GetType ().GetMethod ("Set").Invoke (arr, new object [] { 0, "A" });
+ var res = (string)arr.GetType ().GetMethod ("Get").Invoke (arr, new object [] { 0 });
+ if (res != "A")
+ return 1;
+ return 0;
+ }
}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class ArrayTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class CallsTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
/* A comparison made to same variable. */
#pragma warning disable 1718
-#if MOBILE
+#if __MOBILE__
class FloatTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class LongTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class MathTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class BasicTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
return 0;
}
-}
\ No newline at end of file
+}
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
class ExceptionTests
#else
class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
public static int test_0_lmf_filter () {
try {
// The invoke calls a runtime-invoke wrapper which has a filter clause
-#if MOBILE
+#if __MOBILE__
typeof (ExceptionTests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
#else
typeof (Tests).GetMethod ("lmf_filter").Invoke (null, new object [] { });
}
}
-#if !MOBILE
+#if !__MOBILE__
class ExceptionTests : Tests
{
}
-#endif
\ No newline at end of file
+#endif
return (int)lb.o1 + (int)lb.o2 + (int)lb.o3 + (int)lb.o32;
}
-}
\ No newline at end of file
+}
using System.Threading;
using System.Threading.Tasks;
-#if MOBILE
+#if __MOBILE__
class GenericsTests
#else
class Tests
}
}
-#if !MOBILE
+#if !__MOBILE__
class Enumerator <T> : MyIEnumerator <T> {
T MyIEnumerator<T>.Current {
get {
}
#endif
-#if !MOBILE
+#if !__MOBILE__
static int Main (string[] args)
{
return TestDriver.RunTests (typeof (Tests), args);
public static int test_0_constrained_vtype_box () {
GenericClass<TestStruct> t = new GenericClass<TestStruct> ();
-#if MOBILE
+#if __MOBILE__
return t.toString (new TestStruct ()) == "GenericsTests+TestStruct" ? 0 : 1;
#else
return t.toString (new TestStruct ()) == "Tests+TestStruct" ? 0 : 1;
return 0;
}
-#if !MOBILE
+#if !__MOBILE__
public static int test_0_variance_reflection () {
// covariance on IEnumerator
if (!typeof (MyIEnumerator<object>).IsAssignableFrom (typeof (MyIEnumerator<string>)))
}
}
-#if !MOBILE
+#if !__MOBILE__
class GenericsTests : Tests
{
}
// FIXME: Add mixed ref/noref tests, i.e. Dictionary<string, int>
-#if MOBILE
+#if __MOBILE__
public class GSharedTests
#else
public class Tests
#endif
{
-#if !MOBILE
+#if !__MOBILE__
public static int Main (String[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
}
}
-#if !MOBILE
+#if !__MOBILE__
public class GSharedTests : Tests {
}
#endif
#include "debugger-agent.h"
#include "seq-points.h"
#include "aot-compiler.h"
+#include "mini-llvm.h"
#define BRANCH_COST 10
#define INLINE_LENGTH_LIMIT 20
#include "debugger-agent.h"
#include "seq-points.h"
#include "llvm-runtime.h"
+#include "mini-llvm.h"
#ifdef ENABLE_LLVM
#include "mini-llvm-cpp.h"
*/
#include "mini.h"
+#include "mini-llvm.h"
#ifdef MONO_LLVM_LOADED
#include "mini-llvm-cpp.h"
#include "aot-compiler.h"
+#include "mini-llvm.h"
#ifdef __MINGW32__
--- /dev/null
+#ifndef __MONO_MINI_LLVM_H__
+#define __MONO_MINI_LLVM_H__
+
+#include "mini.h"
+
+/* LLVM backend */
+/* KEEP THIS IN SYNCH WITH mini-llvm-loaded.c */
+void mono_llvm_init (void) MONO_LLVM_INTERNAL;
+void mono_llvm_cleanup (void) MONO_LLVM_INTERNAL;
+void mono_llvm_emit_method (MonoCompile *cfg) MONO_LLVM_INTERNAL;
+void mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call) MONO_LLVM_INTERNAL;
+void mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link, gboolean llvm_only) MONO_LLVM_INTERNAL;
+void mono_llvm_emit_aot_module (const char *filename, const char *cu_name) MONO_LLVM_INTERNAL;
+void mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code) MONO_LLVM_INTERNAL;
+void mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len) MONO_LLVM_INTERNAL;
+void mono_llvm_check_method_supported (MonoCompile *cfg) MONO_LLVM_INTERNAL;
+void mono_llvm_free_domain_info (MonoDomain *domain) MONO_LLVM_INTERNAL;
+MONO_API void mono_personality (void);
+int mono_llvm_load (const char* bpath);
+void mono_llvm_rethrow_exception (MonoObject *ex);
+void mono_llvm_throw_exception (MonoObject *ex);
+void mono_llvm_throw_corlib_exception (guint32 ex_token_index);
+void mono_llvm_resume_exception (void);
+gint32 mono_llvm_match_exception (MonoJitInfo *jinfo, guint32 region_start, guint32 region_end);
+void mono_llvm_clear_exception (void);
+MonoObject *mono_llvm_load_exception (void);
+void mono_llvm_reset_exception (void);
+void mono_llvm_raise_exception (MonoException *e);
+
+gboolean mini_llvm_init (void);
+
+#endif
#include "jit-icalls.h"
#include "mini-gc.h"
+#include "mini-llvm.h"
#include "debugger-agent.h"
#ifdef MONO_ARCH_LLVM_SUPPORTED
#include "mini-gc.h"
#include "debugger-agent.h"
#include "llvm-runtime.h"
+#include "mini-llvm.h"
MonoTraceSpec *mono_jit_trace_calls;
MonoMethodDesc *mono_inject_async_exc_method;
/* This is an exported function */
void mono_xdebug_flush (void);
-/* LLVM backend */
-/* KEEP THIS IN SYNCH WITH mini-llvm-loaded.c */
-void mono_llvm_init (void) MONO_LLVM_INTERNAL;
-void mono_llvm_cleanup (void) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_method (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_call (MonoCompile *cfg, MonoCallInst *call) MONO_LLVM_INTERNAL;
-void mono_llvm_create_aot_module (MonoAssembly *assembly, const char *global_prefix, gboolean emit_dwarf, gboolean static_link, gboolean llvm_only) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_module (const char *filename, const char *cu_name) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_file_info (MonoAotFileInfo *info, gboolean has_jitted_code) MONO_LLVM_INTERNAL;
-void mono_llvm_emit_aot_data (const char *symbol, guint8 *data, int data_len) MONO_LLVM_INTERNAL;
-void mono_llvm_check_method_supported (MonoCompile *cfg) MONO_LLVM_INTERNAL;
-void mono_llvm_free_domain_info (MonoDomain *domain) MONO_LLVM_INTERNAL;
-MONO_API void mono_personality (void);
-int mono_llvm_load (const char* bpath);
-void mono_llvm_rethrow_exception (MonoObject *ex);
-void mono_llvm_throw_exception (MonoObject *ex);
-void mono_llvm_throw_corlib_exception (guint32 ex_token_index);
-void mono_llvm_resume_exception (void);
-gint32 mono_llvm_match_exception (MonoJitInfo *jinfo, guint32 region_start, guint32 region_end);
-void mono_llvm_clear_exception (void);
-MonoObject *mono_llvm_load_exception (void);
-void mono_llvm_reset_exception (void);
-void mono_llvm_raise_exception (MonoException *e);
-
-gboolean mini_llvm_init (void);
-
gboolean mono_method_blittable (MonoMethod *method);
gboolean mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee);
* the IL code looks.
*/
-#if MOBILE
+#if __MOBILE__
namespace ObjectTests
{
#endif
class Tests {
-#if !MOBILE
+#if !__MOBILE__
public static int Main (string[] args) {
return TestDriver.RunTests (typeof (Tests), args);
}
}
}
-#if MOBILE
+#if __MOBILE__
}
#endif