PageRenderTime 65ms CodeModel.GetById 40ms app.highlight 21ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/Dissertation/Evolution/02_Peephole_decompilation.cs

http://github.com/icsharpcode/ILSpy
C# | 190 lines | 190 code | 0 blank | 0 comment | 6 complexity | 575c25daca0636492c96cac9ac5ce2e2 MD5 | raw file
  1abstract class QuickSortProgram
  2{
  3    public static void Main(System.String[] args)
  4    {
  5        IL_00: // No-op 
  6        IL_01: System.String[] expr01 = args;
  7        IL_02: int expr02 = arg1.Length;
  8        IL_03: int expr03 = (Int32)arg1;
  9        IL_04: object expr04 = new int[arg1];
 10        IL_09: V_0 = arg1;
 11        IL_0A: short expr0A = 0;
 12        IL_0B: V_1 = arg1;
 13        IL_0C: goto IL_1F;
 14        IL_0E: // No-op 
 15        IL_0F: System.Int32[] expr0F = V_0;
 16        IL_10: int expr10 = V_1;
 17        IL_11: System.String[] expr11 = args;
 18        IL_12: int expr12 = V_1;
 19        IL_13: object expr13 = arg1[arg2];
 20        IL_14: int expr14 = System.Int32.Parse(arg0);
 21        IL_19: arg1[arg2] = arg3;
 22        IL_1A: // No-op 
 23        IL_1B: int expr1B = V_1;
 24        IL_1C: short expr1C = 1;
 25        IL_1D: int expr1D = arg1 + arg2;
 26        IL_1E: V_1 = arg1;
 27        IL_1F: int expr1F = V_1;
 28        IL_20: System.Int32[] expr20 = V_0;
 29        IL_21: int expr21 = arg1.Length;
 30        IL_22: int expr22 = (Int32)arg1;
 31        IL_23: bool expr23 = arg1 < arg2;
 32        IL_25: V_2 = arg1;
 33        IL_26: bool expr26 = V_2;
 34        IL_27: if (arg1) goto IL_0E; 
 35        IL_29: System.Int32[] expr29 = V_0;
 36        IL_2A: short expr2A = 0;
 37        IL_2B: System.Int32[] expr2B = V_0;
 38        IL_2C: int expr2C = arg1.Length;
 39        IL_2D: int expr2D = (Int32)arg1;
 40        IL_2E: short expr2E = 1;
 41        IL_2F: int expr2F = arg1 - arg2;
 42        IL_30: QuickSortProgram.QuickSort(arg0, arg1, arg2);
 43        IL_35: // No-op 
 44        IL_36: short expr36 = 0;
 45        IL_37: V_1 = arg1;
 46        IL_38: goto IL_5C;
 47        IL_3A: // No-op 
 48        IL_3B: System.Int32[] expr3B = V_0;
 49        IL_3C: int expr3C = V_1;
 50        IL_3D: object expr3D = arg1[arg2];
 51        IL_42: string expr42 = arg1.ToString();
 52        IL_47: string expr47 = " ";
 53        IL_4C: string expr4C = System.String.Concat(arg0, arg1);
 54        IL_51: System.Console.Write(arg0);
 55        IL_56: // No-op 
 56        IL_57: // No-op 
 57        IL_58: int expr58 = V_1;
 58        IL_59: short expr59 = 1;
 59        IL_5A: int expr5A = arg1 + arg2;
 60        IL_5B: V_1 = arg1;
 61        IL_5C: int expr5C = V_1;
 62        IL_5D: System.Int32[] expr5D = V_0;
 63        IL_5E: int expr5E = arg1.Length;
 64        IL_5F: int expr5F = (Int32)arg1;
 65        IL_60: bool expr60 = arg1 < arg2;
 66        IL_62: V_2 = arg1;
 67        IL_63: bool expr63 = V_2;
 68        IL_64: if (arg1) goto IL_3A; 
 69        IL_66: return;
 70    }
 71    public static void QuickSort(System.Int32[] array, int left, int right)
 72    {
 73        IL_00: // No-op 
 74        IL_01: int expr01 = right;
 75        IL_02: int expr02 = left;
 76        IL_03: bool expr03 = arg1 > arg2;
 77        IL_05: short expr05 = 0;
 78        IL_06: bool expr06 = arg1 == arg2;
 79        IL_08: V_2 = arg1;
 80        IL_09: bool expr09 = V_2;
 81        IL_0A: if (arg1) goto IL_34; 
 82        IL_0C: // No-op 
 83        IL_0D: int expr0D = left;
 84        IL_0E: int expr0E = right;
 85        IL_0F: int expr0F = arg1 + arg2;
 86        IL_10: short expr10 = 2;
 87        IL_11: int expr11 = arg1 / arg2;
 88        IL_12: V_0 = arg1;
 89        IL_13: System.Int32[] expr13 = array;
 90        IL_14: int expr14 = left;
 91        IL_15: int expr15 = right;
 92        IL_16: int expr16 = V_0;
 93        IL_17: int expr17 = QuickSortProgram.Partition(arg0, arg1, arg2, arg3);
 94        IL_1C: V_1 = arg1;
 95        IL_1D: System.Int32[] expr1D = array;
 96        IL_1E: int expr1E = left;
 97        IL_1F: int expr1F = V_1;
 98        IL_20: short expr20 = 1;
 99        IL_21: int expr21 = arg1 - arg2;
100        IL_22: QuickSortProgram.QuickSort(arg0, arg1, arg2);
101        IL_27: // No-op 
102        IL_28: System.Int32[] expr28 = array;
103        IL_29: int expr29 = V_1;
104        IL_2A: short expr2A = 1;
105        IL_2B: int expr2B = arg1 + arg2;
106        IL_2C: int expr2C = right;
107        IL_2D: QuickSortProgram.QuickSort(arg0, arg1, arg2);
108        IL_32: // No-op 
109        IL_33: // No-op 
110        IL_34: return;
111    }
112    private static int Partition(System.Int32[] array, int left, int right, int pivotIndex)
113    {
114        IL_00: // No-op 
115        IL_01: System.Int32[] expr01 = array;
116        IL_02: int expr02 = pivotIndex;
117        IL_03: int expr03 = arg1[arg2];
118        IL_04: V_0 = arg1;
119        IL_05: System.Int32[] expr05 = array;
120        IL_06: int expr06 = pivotIndex;
121        IL_07: int expr07 = right;
122        IL_08: QuickSortProgram.Swap(arg0, arg1, arg2);
123        IL_0D: // No-op 
124        IL_0E: int expr0E = left;
125        IL_0F: V_1 = arg1;
126        IL_10: int expr10 = left;
127        IL_11: V_2 = arg1;
128        IL_12: goto IL_35;
129        IL_14: // No-op 
130        IL_15: System.Int32[] expr15 = array;
131        IL_16: int expr16 = V_2;
132        IL_17: int expr17 = arg1[arg2];
133        IL_18: int expr18 = V_0;
134        IL_19: bool expr19 = arg1 > arg2;
135        IL_1B: V_4 = arg1;
136        IL_1D: bool expr1D = V_4;
137        IL_1F: if (arg1) goto IL_30; 
138        IL_21: // No-op 
139        IL_22: System.Int32[] expr22 = array;
140        IL_23: int expr23 = V_1;
141        IL_24: int expr24 = V_2;
142        IL_25: QuickSortProgram.Swap(arg0, arg1, arg2);
143        IL_2A: // No-op 
144        IL_2B: int expr2B = V_1;
145        IL_2C: short expr2C = 1;
146        IL_2D: int expr2D = arg1 + arg2;
147        IL_2E: V_1 = arg1;
148        IL_2F: // No-op 
149        IL_30: // No-op 
150        IL_31: int expr31 = V_2;
151        IL_32: short expr32 = 1;
152        IL_33: int expr33 = arg1 + arg2;
153        IL_34: V_2 = arg1;
154        IL_35: int expr35 = V_2;
155        IL_36: int expr36 = right;
156        IL_37: bool expr37 = arg1 < arg2;
157        IL_39: V_4 = arg1;
158        IL_3B: bool expr3B = V_4;
159        IL_3D: if (arg1) goto IL_14; 
160        IL_3F: System.Int32[] expr3F = array;
161        IL_40: int expr40 = right;
162        IL_41: int expr41 = V_1;
163        IL_42: QuickSortProgram.Swap(arg0, arg1, arg2);
164        IL_47: // No-op 
165        IL_48: int expr48 = V_1;
166        IL_49: V_3 = arg1;
167        IL_4A: goto IL_4C;
168        IL_4C: int expr4C = V_3;
169        IL_4D: return arg1;
170    }
171    private static void Swap(System.Int32[] array, int index1, int index2)
172    {
173        IL_00: // No-op 
174        IL_01: System.Int32[] expr01 = array;
175        IL_02: int expr02 = index1;
176        IL_03: int expr03 = arg1[arg2];
177        IL_04: V_0 = arg1;
178        IL_05: System.Int32[] expr05 = array;
179        IL_06: int expr06 = index1;
180        IL_07: System.Int32[] expr07 = array;
181        IL_08: int expr08 = index2;
182        IL_09: int expr09 = arg1[arg2];
183        IL_0A: arg1[arg2] = arg3;
184        IL_0B: System.Int32[] expr0B = array;
185        IL_0C: int expr0C = index2;
186        IL_0D: int expr0D = V_0;
187        IL_0E: arg1[arg2] = arg3;
188        IL_0F: return;
189    }
190}