You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@@ -80,12 +80,28 @@ public class Tests2 {
|
||||
}
|
||||
}
|
||||
|
||||
public struct AStruct {
|
||||
public struct AStruct : ITest2 {
|
||||
public int i;
|
||||
public string s;
|
||||
public byte k;
|
||||
public IntPtr j;
|
||||
public int l;
|
||||
/*
|
||||
public AStruct () {
|
||||
i = 0;
|
||||
s = null;
|
||||
k = 0;
|
||||
j = IntPtr.Zero;
|
||||
l = 0;
|
||||
}
|
||||
*/
|
||||
public AStruct (int arg) {
|
||||
i = arg;
|
||||
s = null;
|
||||
k = 0;
|
||||
j = IntPtr.Zero;
|
||||
l = 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public int foo (int val) {
|
||||
@@ -116,6 +132,14 @@ public struct AStruct {
|
||||
public void invoke_mutate () {
|
||||
l = 5;
|
||||
}
|
||||
|
||||
public int invoke_iface () {
|
||||
return i;
|
||||
}
|
||||
|
||||
public override string ToString () {
|
||||
return i.ToString ();
|
||||
}
|
||||
}
|
||||
|
||||
public class GClass<T> {
|
||||
@@ -308,6 +332,7 @@ public class Tests : TestsBase, ITest2
|
||||
gc_suspend ();
|
||||
set_ip ();
|
||||
step_filters ();
|
||||
local_reflect ();
|
||||
if (args.Length > 0 && args [0] == "domain-test")
|
||||
/* This takes a lot of time, so execute it conditionally */
|
||||
domains ();
|
||||
@@ -321,6 +346,11 @@ public class Tests : TestsBase, ITest2
|
||||
return 3;
|
||||
}
|
||||
|
||||
public static void local_reflect () {
|
||||
//Breakpoint line below, and reflect someField via ObjectMirror;
|
||||
LocalReflectClass.RunMe ();
|
||||
}
|
||||
|
||||
public static void breakpoints () {
|
||||
/* Call these early so it is JITted by the time a breakpoint is placed on it */
|
||||
bp3 ();
|
||||
@@ -637,14 +667,15 @@ public class Tests : TestsBase, ITest2
|
||||
AStruct[] arr = new AStruct[] {
|
||||
new AStruct () { i = 1, s = "S1" },
|
||||
new AStruct () { i = 2, s = "S2" } };
|
||||
t.vtypes1 (s, arr);
|
||||
TypedReference typedref = __makeref (s);
|
||||
t.vtypes1 (s, arr, typedref);
|
||||
vtypes2 (s);
|
||||
vtypes3 (s);
|
||||
vtypes4 ();
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public object vtypes1 (AStruct s, AStruct[] arr) {
|
||||
public object vtypes1 (AStruct s, AStruct[] arr, TypedReference typedref) {
|
||||
if (arr != null)
|
||||
return this;
|
||||
else
|
||||
@@ -715,6 +746,7 @@ public class Tests : TestsBase, ITest2
|
||||
astruct = new AStruct ();
|
||||
}
|
||||
rs = "A";
|
||||
List<int> alist = new List<int> () { 12 };
|
||||
}
|
||||
|
||||
|
||||
@@ -820,6 +852,10 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
}
|
||||
|
||||
struct TypedRefTest {
|
||||
public int MaxValue;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void type_info () {
|
||||
Tests t = new Tests () { field_i = 42, field_s = "S", base_field_i = 43, base_field_s = "T", field_enum = AnEnum.B };
|
||||
@@ -827,8 +863,9 @@ public class Tests : TestsBase, ITest2
|
||||
int val = 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> (), AnEnum.B);
|
||||
TypedRefTest reftest = new TypedRefTest () { MaxValue = 12 };
|
||||
TypedReference typedref = __makeref (reftest);
|
||||
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, typedref);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,7 +878,7 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
|
||||
[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, AnEnum ae) {
|
||||
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, TypedReference typedref) {
|
||||
return s2 [0] + s3 [0] + s4 [0, 0];
|
||||
}
|
||||
|
||||
@@ -1448,3 +1485,23 @@ public class LineNumbers
|
||||
#line 55 "FOO"
|
||||
}
|
||||
}
|
||||
|
||||
class LocalReflectClass
|
||||
{
|
||||
public static void RunMe ()
|
||||
{
|
||||
var reflectMe = new someClass ();
|
||||
reflectMe.someMethod ();
|
||||
}
|
||||
|
||||
class someClass : ContextBoundObject
|
||||
{
|
||||
public object someField;
|
||||
|
||||
public void someMethod ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
641fefd2afe9c647385e3ad22f0e18a355ee6f2e
|
||||
Reference in New Issue
Block a user