X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fgshared.cs;h=6b5bc95f134ca449ac6306ed403d3ee321c920ef;hb=19046502886ad7697b4c6642337441a7fdafd28a;hp=e4323480388d18ed54d50e046ddc014aedb50217;hpb=26748dcdbfbdd974d82b0d7c79b575d339b4bb7d;p=mono.git diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs index e4323480388..6b5bc95f134 100644 --- a/mono/mini/gshared.cs +++ b/mono/mini/gshared.cs @@ -1677,6 +1677,8 @@ public class Tests uint i1, uint i2, uint i3, uint i4); int Structs (T t, int dummy1, int a2, int a3, int a4, int a5, int a6, int a7, int dummy8, BStruct s); + void Generic (T t, T2[] arr, int dummy1, int a2, int a3, int a4, int a5, int a6, int a7, int dummy8, + T2 i1, T2 i2, T2 i3, T2 i4); } class Foo3 : IFoo3 { @@ -1708,6 +1710,13 @@ public class Tests BStruct s) { return s.a + s.b + s.c + s.d; } + + public void Generic (T t, T2[] arr, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, T2 i1, T2 i2, T2 i3, T2 i4) { + arr [0] = i1; + arr [1] = i2; + arr [2] = i3; + arr [3] = i4; + } } // Passing small normal arguments on the stack @@ -1731,6 +1740,10 @@ public class Tests int res6 = o.UInts (new EmptyStruct (), 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4); if (res6 != 10) return 6; + int[] arr = new int [4]; + o.Generic (new EmptyStruct (), arr, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4); + if (arr [0] != 1 || arr [1] != 2 || arr [2] != 3 || arr [3] != 4) + return 7; return 0; } @@ -1959,6 +1972,32 @@ public class Tests gsharedvt_vphi (0); return 0; } + + struct AStruct3 { + T1 t1; + T2 t2; + T3 t3; + } + + interface IFaceIsRef { + bool is_ref (); + } + + class ClassIsRef : IFaceIsRef { + [MethodImplAttribute (MethodImplOptions.NoInlining)] + public bool is_ref () { + return RuntimeHelpers.IsReferenceOrContainsReferences (); + } + } + + public static int test_0_isreference_intrins () { + IFaceIsRef iface = new ClassIsRef (); + if (iface.is_ref> ()) + return 1; + if (!iface.is_ref> ()) + return 2; + return 0; + } } // #13191