public int i;
public string s;
public byte k;
+ public IntPtr j;
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public int foo (int val) {
public int invoke_return_int () {
return i;
}
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static int invoke_static () {
+ return 5;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public IntPtr invoke_return_intptr () {
+ return j;
+ }
}
public class GClass<T> {
public struct GStruct<T> {
public T i;
+
+ public int j;
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public int invoke_return_int () {
+ return j;
+ }
}
public class Tests : TestsBase
float field_float;
double field_double;
Thread field_class;
+ IntPtr field_intptr;
static int static_i = 55;
static string static_s = "A";
public const int literal_i = 56;
ss1 ();
ss2 ();
ss3 ();
+ ss3_2 ();
ss4 ();
ss5 (new int [] { 1, 2, 3 }, new Func<int, bool> (is_even));
+ try {
+ ss6 (true);
+ } catch {
+ }
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
return sum;
}
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss3_2 () {
+ ss3_2_2 ();
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss3_2_2 () {
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static int ss4 () {
ss1 (); ss1 ();
arr.Count (selector);
}
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss6 (bool b) {
+ if (b) {
+ ss7 ();
+ throw new Exception ();
+ }
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss7 () {
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static bool is_even (int i) {
return i % 2 == 0;
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void objects () {
- Tests t = new Tests () { field_i = 42, field_bool1 = true, field_bool2 = false, field_char = 'A', field_byte = 129, field_sbyte = -33, field_short = Int16.MaxValue - 5, field_ushort = UInt16.MaxValue - 5, field_long = Int64.MaxValue - 5, field_ulong = UInt64.MaxValue - 5, field_float = 3.14f, field_double = 3.14f, field_s = "S", base_field_i = 43, base_field_s = "T", field_enum = AnEnum.B, field_class = null };
+ Tests t = new Tests () { field_i = 42, field_bool1 = true, field_bool2 = false, field_char = 'A', field_byte = 129, field_sbyte = -33, field_short = Int16.MaxValue - 5, field_ushort = UInt16.MaxValue - 5, field_long = Int64.MaxValue - 5, field_ulong = UInt64.MaxValue - 5, field_float = 3.14f, field_double = 3.14f, field_s = "S", base_field_i = 43, base_field_s = "T", field_enum = AnEnum.B, field_class = null, field_intptr = new IntPtr (Int32.MaxValue - 5) };
t.o1 (new Tests2 () { field_j = 43 }, new GClass <int> { field = 42 }, new GClass <string> { field = "FOO" });
o2 (new string [] { "BAR", "BAZ" }, new int[] { 42, 43 }, new int [,] { { 1, 2 }, { 3, 4 }}, (int[,])Array.CreateInstance (typeof (int), new int [] { 2, 2}, new int [] { 1, 3}), new int[] { 0 });
}
unsafe {
AStruct s = new AStruct () { i = 42, s = "S", k = 43 };
- ti2 (new string [] { "BAR", "BAZ" }, new int[] { 42, 43 }, new int [,] { { 1, 2 }, { 3, 4 }}, ref val, (int*)IntPtr.Zero, 5, s, new Tests (), new Tests2 (), new GClass <int> ());
+ ti2 (new string [] { "BAR", "BAZ" }, new int[] { 42, 43 }, new int [,] { { 1, 2 }, { 3, 4 }}, ref val, (int*)IntPtr.Zero, 5, s, new Tests (), new Tests2 (), new GClass <int> (), AnEnum.B);
}
}
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
- public static unsafe string ti2 (string[] s2, int[] s3, int[,] s4, ref int ri, int* ptr, int i, AStruct s, Tests t, Tests2 t2, GClass<int> g) {
+ public static unsafe string ti2 (string[] s2, int[] s3, int[,] s4, ref int ri, int* ptr, int i, AStruct s, Tests t, Tests2 t2, GClass<int> g, AnEnum ae) {
return s2 [0] + s3 [0] + s4 [0, 0];
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void invoke () {
- new Tests ().invoke1 (new Tests2 (), new AStruct () { i = 42 });
+ new Tests ().invoke1 (new Tests2 (), new AStruct () { i = 42, j = (IntPtr)43 }, new GStruct<int> { j = 42 });
}
[MethodImplAttribute (MethodImplOptions.NoInlining)]
- public void invoke1 (Tests2 t, AStruct s) {
+ public void invoke1 (Tests2 t, AStruct s, GStruct<int> g) {
invoke2 ();
}
throw new ArgumentException ();
} catch (Exception) {
}
+ try {
+ throw new OverflowException ();
+ } catch (Exception) {
+ }
object o = null;
try {