PageRenderTime 26ms CodeModel.GetById 14ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/Dissertation/Evolution/03_Dataflow_Comments.cs

http://github.com/icsharpcode/ILSpy
C# | 378 lines | 186 code | 0 blank | 192 comment | 7 complexity | fa6772048c8d3b51e2809b324863b523 MD5 | raw file
  1using System;
  2abstract class QuickSortProgram
  3{
  4    public static void Main(System.String[] args)
  5    {
  6        System.Int32[] V_0;
  7        int V_1;
  8        bool V_2;
  9        // No-op 
 10        // Stack: {}
 11        System.String[] expr01 = args;
 12        // Stack: {expr01}
 13        int expr02 = expr01.Length;
 14        // Stack: {expr02}
 15        int expr03 = (Int32)expr02;
 16        // Stack: {expr03}
 17        System.Int32[] expr04 = new int[expr03];
 18        // Stack: {expr04}
 19        V_0 = expr04;
 20        // Stack: {}
 21        int expr0A = 0;
 22        // Stack: {expr0A}
 23        V_1 = expr0A;
 24        // Stack: {}
 25        goto IL_1F;
 26        // Stack: {}
 27        IL_0E: // No-op 
 28        // Stack: {}
 29        System.Int32[] expr0F = V_0;
 30        // Stack: {expr0F}
 31        int expr10 = V_1;
 32        // Stack: {expr0F, expr10}
 33        System.String[] expr11 = args;
 34        // Stack: {expr0F, expr10, expr11}
 35        int expr12 = V_1;
 36        // Stack: {expr0F, expr10, expr11, expr12}
 37        string expr13 = expr11[expr12];
 38        // Stack: {expr0F, expr10, expr13}
 39        int expr14 = System.Int32.Parse(expr13);
 40        // Stack: {expr0F, expr10, expr14}
 41        expr0F[expr10] = expr14;
 42        // Stack: {}
 43        // No-op 
 44        // Stack: {}
 45        int expr1B = V_1;
 46        // Stack: {expr1B}
 47        int expr1C = 1;
 48        // Stack: {expr1B, expr1C}
 49        int expr1D = expr1B + expr1C;
 50        // Stack: {expr1D}
 51        V_1 = expr1D;
 52        // Stack: {}
 53        IL_1F: int expr1F = V_1;
 54        // Stack: {expr1F}
 55        System.Int32[] expr20 = V_0;
 56        // Stack: {expr1F, expr20}
 57        int expr21 = expr20.Length;
 58        // Stack: {expr1F, expr21}
 59        int expr22 = (Int32)expr21;
 60        // Stack: {expr1F, expr22}
 61        bool expr23 = expr1F < expr22;
 62        // Stack: {expr23}
 63        V_2 = expr23;
 64        // Stack: {}
 65        bool expr26 = V_2;
 66        // Stack: {expr26}
 67        if (expr26) goto IL_0E; 
 68        // Stack: {}
 69        System.Int32[] expr29 = V_0;
 70        // Stack: {expr29}
 71        int expr2A = 0;
 72        // Stack: {expr29, expr2A}
 73        System.Int32[] expr2B = V_0;
 74        // Stack: {expr29, expr2A, expr2B}
 75        int expr2C = expr2B.Length;
 76        // Stack: {expr29, expr2A, expr2C}
 77        int expr2D = (Int32)expr2C;
 78        // Stack: {expr29, expr2A, expr2D}
 79        int expr2E = 1;
 80        // Stack: {expr29, expr2A, expr2D, expr2E}
 81        int expr2F = expr2D - expr2E;
 82        // Stack: {expr29, expr2A, expr2F}
 83        QuickSortProgram.QuickSort(expr29, expr2A, expr2F);
 84        // Stack: {}
 85        // No-op 
 86        // Stack: {}
 87        int expr36 = 0;
 88        // Stack: {expr36}
 89        V_1 = expr36;
 90        // Stack: {}
 91        goto IL_5C;
 92        // Stack: {}
 93        IL_3A: // No-op 
 94        // Stack: {}
 95        System.Int32[] expr3B = V_0;
 96        // Stack: {expr3B}
 97        int expr3C = V_1;
 98        // Stack: {expr3B, expr3C}
 99        object expr3D = expr3B[expr3C];
100        // Stack: {expr3D}
101        string expr42 = expr3D.ToString();
102        // Stack: {expr42}
103        string expr47 = " ";
104        // Stack: {expr42, expr47}
105        string expr4C = System.String.Concat(expr42, expr47);
106        // Stack: {expr4C}
107        System.Console.Write(expr4C);
108        // Stack: {}
109        // No-op 
110        // Stack: {}
111        // No-op 
112        // Stack: {}
113        int expr58 = V_1;
114        // Stack: {expr58}
115        int expr59 = 1;
116        // Stack: {expr58, expr59}
117        int expr5A = expr58 + expr59;
118        // Stack: {expr5A}
119        V_1 = expr5A;
120        // Stack: {}
121        IL_5C: int expr5C = V_1;
122        // Stack: {expr5C}
123        System.Int32[] expr5D = V_0;
124        // Stack: {expr5C, expr5D}
125        int expr5E = expr5D.Length;
126        // Stack: {expr5C, expr5E}
127        int expr5F = (Int32)expr5E;
128        // Stack: {expr5C, expr5F}
129        bool expr60 = expr5C < expr5F;
130        // Stack: {expr60}
131        V_2 = expr60;
132        // Stack: {}
133        bool expr63 = V_2;
134        // Stack: {expr63}
135        if (expr63) goto IL_3A; 
136        // Stack: {}
137        return;
138        // Stack: {}
139    }
140    public static void QuickSort(System.Int32[] array, int left, int right)
141    {
142        int V_0;
143        int V_1;
144        bool V_2;
145        // No-op 
146        // Stack: {}
147        int expr01 = right;
148        // Stack: {expr01}
149        int expr02 = left;
150        // Stack: {expr01, expr02}
151        bool expr03 = expr01 > expr02;
152        // Stack: {expr03}
153        int expr05 = 0;
154        // Stack: {expr03, expr05}
155        bool expr06 = expr03 == (expr05 != 0);
156        // Stack: {expr06}
157        V_2 = expr06;
158        // Stack: {}
159        bool expr09 = V_2;
160        // Stack: {expr09}
161        if (expr09) goto IL_34; 
162        // Stack: {}
163        // No-op 
164        // Stack: {}
165        int expr0D = left;
166        // Stack: {expr0D}
167        int expr0E = right;
168        // Stack: {expr0D, expr0E}
169        int expr0F = expr0D + expr0E;
170        // Stack: {expr0F}
171        int expr10 = 2;
172        // Stack: {expr0F, expr10}
173        int expr11 = expr0F / expr10;
174        // Stack: {expr11}
175        V_0 = expr11;
176        // Stack: {}
177        System.Int32[] expr13 = array;
178        // Stack: {expr13}
179        int expr14 = left;
180        // Stack: {expr13, expr14}
181        int expr15 = right;
182        // Stack: {expr13, expr14, expr15}
183        int expr16 = V_0;
184        // Stack: {expr13, expr14, expr15, expr16}
185        int expr17 = QuickSortProgram.Partition(expr13, expr14, expr15, expr16);
186        // Stack: {expr17}
187        V_1 = expr17;
188        // Stack: {}
189        System.Int32[] expr1D = array;
190        // Stack: {expr1D}
191        int expr1E = left;
192        // Stack: {expr1D, expr1E}
193        int expr1F = V_1;
194        // Stack: {expr1D, expr1E, expr1F}
195        int expr20 = 1;
196        // Stack: {expr1D, expr1E, expr1F, expr20}
197        int expr21 = expr1F - expr20;
198        // Stack: {expr1D, expr1E, expr21}
199        QuickSortProgram.QuickSort(expr1D, expr1E, expr21);
200        // Stack: {}
201        // No-op 
202        // Stack: {}
203        System.Int32[] expr28 = array;
204        // Stack: {expr28}
205        int expr29 = V_1;
206        // Stack: {expr28, expr29}
207        int expr2A = 1;
208        // Stack: {expr28, expr29, expr2A}
209        int expr2B = expr29 + expr2A;
210        // Stack: {expr28, expr2B}
211        int expr2C = right;
212        // Stack: {expr28, expr2B, expr2C}
213        QuickSortProgram.QuickSort(expr28, expr2B, expr2C);
214        // Stack: {}
215        // No-op 
216        // Stack: {}
217        // No-op 
218        // Stack: {}
219        IL_34: return;
220        // Stack: {}
221    }
222    private static int Partition(System.Int32[] array, int left, int right, int pivotIndex)
223    {
224        int V_0;
225        int V_1;
226        int V_2;
227        int V_3;
228        bool V_4;
229        // No-op 
230        // Stack: {}
231        System.Int32[] expr01 = array;
232        // Stack: {expr01}
233        int expr02 = pivotIndex;
234        // Stack: {expr01, expr02}
235        int expr03 = expr01[expr02];
236        // Stack: {expr03}
237        V_0 = expr03;
238        // Stack: {}
239        System.Int32[] expr05 = array;
240        // Stack: {expr05}
241        int expr06 = pivotIndex;
242        // Stack: {expr05, expr06}
243        int expr07 = right;
244        // Stack: {expr05, expr06, expr07}
245        QuickSortProgram.Swap(expr05, expr06, expr07);
246        // Stack: {}
247        // No-op 
248        // Stack: {}
249        int expr0E = left;
250        // Stack: {expr0E}
251        V_1 = expr0E;
252        // Stack: {}
253        int expr10 = left;
254        // Stack: {expr10}
255        V_2 = expr10;
256        // Stack: {}
257        goto IL_35;
258        // Stack: {}
259        IL_14: // No-op 
260        // Stack: {}
261        System.Int32[] expr15 = array;
262        // Stack: {expr15}
263        int expr16 = V_2;
264        // Stack: {expr15, expr16}
265        int expr17 = expr15[expr16];
266        // Stack: {expr17}
267        int expr18 = V_0;
268        // Stack: {expr17, expr18}
269        bool expr19 = expr17 > expr18;
270        // Stack: {expr19}
271        V_4 = expr19;
272        // Stack: {}
273        bool expr1D = V_4;
274        // Stack: {expr1D}
275        if (expr1D) goto IL_30; 
276        // Stack: {}
277        // No-op 
278        // Stack: {}
279        System.Int32[] expr22 = array;
280        // Stack: {expr22}
281        int expr23 = V_1;
282        // Stack: {expr22, expr23}
283        int expr24 = V_2;
284        // Stack: {expr22, expr23, expr24}
285        QuickSortProgram.Swap(expr22, expr23, expr24);
286        // Stack: {}
287        // No-op 
288        // Stack: {}
289        int expr2B = V_1;
290        // Stack: {expr2B}
291        int expr2C = 1;
292        // Stack: {expr2B, expr2C}
293        int expr2D = expr2B + expr2C;
294        // Stack: {expr2D}
295        V_1 = expr2D;
296        // Stack: {}
297        // No-op 
298        // Stack: {}
299        IL_30: // No-op 
300        // Stack: {}
301        int expr31 = V_2;
302        // Stack: {expr31}
303        int expr32 = 1;
304        // Stack: {expr31, expr32}
305        int expr33 = expr31 + expr32;
306        // Stack: {expr33}
307        V_2 = expr33;
308        // Stack: {}
309        IL_35: int expr35 = V_2;
310        // Stack: {expr35}
311        int expr36 = right;
312        // Stack: {expr35, expr36}
313        bool expr37 = expr35 < expr36;
314        // Stack: {expr37}
315        V_4 = expr37;
316        // Stack: {}
317        bool expr3B = V_4;
318        // Stack: {expr3B}
319        if (expr3B) goto IL_14; 
320        // Stack: {}
321        System.Int32[] expr3F = array;
322        // Stack: {expr3F}
323        int expr40 = right;
324        // Stack: {expr3F, expr40}
325        int expr41 = V_1;
326        // Stack: {expr3F, expr40, expr41}
327        QuickSortProgram.Swap(expr3F, expr40, expr41);
328        // Stack: {}
329        // No-op 
330        // Stack: {}
331        int expr48 = V_1;
332        // Stack: {expr48}
333        V_3 = expr48;
334        // Stack: {}
335        goto IL_4C;
336        // Stack: {}
337        IL_4C: int expr4C = V_3;
338        // Stack: {expr4C}
339        return expr4C;
340        // Stack: {}
341    }
342    private static void Swap(System.Int32[] array, int index1, int index2)
343    {
344        int V_0;
345        // No-op 
346        // Stack: {}
347        System.Int32[] expr01 = array;
348        // Stack: {expr01}
349        int expr02 = index1;
350        // Stack: {expr01, expr02}
351        int expr03 = expr01[expr02];
352        // Stack: {expr03}
353        V_0 = expr03;
354        // Stack: {}
355        System.Int32[] expr05 = array;
356        // Stack: {expr05}
357        int expr06 = index1;
358        // Stack: {expr05, expr06}
359        System.Int32[] expr07 = array;
360        // Stack: {expr05, expr06, expr07}
361        int expr08 = index2;
362        // Stack: {expr05, expr06, expr07, expr08}
363        int expr09 = expr07[expr08];
364        // Stack: {expr05, expr06, expr09}
365        expr05[expr06] = expr09;
366        // Stack: {}
367        System.Int32[] expr0B = array;
368        // Stack: {expr0B}
369        int expr0C = index2;
370        // Stack: {expr0B, expr0C}
371        int expr0D = V_0;
372        // Stack: {expr0B, expr0C, expr0D}
373        expr0B[expr0C] = expr0D;
374        // Stack: {}
375        return;
376        // Stack: {}
377    }
378}