private static void TestRefClass1(ref object c) { ClassWithOneField c1 = (ClassWithOneField)c; c1.x = 100; c = new object(); }
public static int NewObjAndDup() { ClassWithOneField classWithOneField = new ClassWithOneField(); classWithOneField.x = 42; ReturnConstant(); return(classWithOneField.x); }
public static int TestRefClass() { var c = new ClassWithOneField() { x = 56 }; TestRefClass(ref c); return(c.x); }
public static int TestRefClass1() { var c = new ClassWithOneField() { x = 56 }; object o = c; TestRefClass1(ref o); return(c.x); }
public static void NewObj1() { object c = new ClassWithOneField(); for (int i = 0; i < 2; i++) { var x = new int[32]; } var y = new double[32]; var z = new double[32]; }
public static int LdelemaTest1() { var array = new ClassWithOneField[] { new ClassWithOneField() { x = 56 }, new ClassWithOneField() { x = 42 } }; TestRefClass(ref array[0]); return(array[0].x); }
public static ClassWithOneField NewObjWithBranching(bool f) { ClassWithOneField classWithOneField = new ClassWithOneField(); if (f) { classWithOneField.x = 42; } else { classWithOneField.x = 456; } return(classWithOneField); }
public static void NewObjInLoop1() { object c = new ClassWithOneField(); SequentialNewClassesWithOneField(); for (int i = 0; i < 5; ++i) { new object(); } if (c is string) { new object(); } }
public static void LdelemaTest2(bool f) { var array = new ClassWithOneField[] { new ClassWithOneField() { x = 56 }, new ClassWithOneField() { x = 42 } }; if (f) { object[] objectArray = array; TestRefClass2(ref objectArray[0]); } }
public static int TestCompositionWhenCallDividesBlocksAndSomeInformationIsPropagated() { object c = new ClassWithOneField(); for (int i = 0; i < 2; i++) { var x = new int[32]; } var y = new double[32]; var z = new double[32]; ReturnConstant(); return(y.Length + z.Length); }
public static int TestAllocatedType_4(bool f) { ClassWithOneField classWithOneField; int result = 0; if (f) { classWithOneField = new ClassWithOneField(); classWithOneField.x = 100; result = classWithOneField.x; } else { result = 42; } return(result); }
public static int ReadFieldOfCLass1(ClassWithOneField a, ClassWithOneField b) { var c1 = new ClassWithOneField(); c1.x = 42; var c2 = new ClassWithOneField(); c2.x = 12; var c3 = new ClassWithOneField(); c3.x = 7; a.x = b.x * 2; if (a.x > 127) { b.x = a.x * 2; } return(a.x); }
public static int NRE_TEST(ClassWithOneField c) { return(c.x); }
private static void TestRefClass2(ref object c) { ClassWithOneField c1 = (ClassWithOneField)c; c1.x = 100; }
private static void TestRefClass(ref ClassWithOneField c) { c = new ClassWithOneField(); }
private static int ReadFieldOfCLass(ClassWithOneField classWithOneField) { return(classWithOneField.x); }