PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/Dissertation/Evolution/03_Dataflow.cs

http://github.com/icsharpcode/ILSpy
C# | 203 lines | 186 code | 0 blank | 17 comment | 7 complexity | a78f4472849b8e44ddacb1b10d86536c 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        System.String[] expr01 = args;
 11        int expr02 = expr01.Length;
 12        int expr03 = (Int32)expr02;
 13        System.Int32[] expr04 = new int[expr03];
 14        V_0 = expr04;
 15        int expr0A = 0;
 16        V_1 = expr0A;
 17        goto IL_1F;
 18        IL_0E: // No-op 
 19        System.Int32[] expr0F = V_0;
 20        int expr10 = V_1;
 21        System.String[] expr11 = args;
 22        int expr12 = V_1;
 23        string expr13 = expr11[expr12];
 24        int expr14 = System.Int32.Parse(expr13);
 25        expr0F[expr10] = expr14;
 26        // No-op 
 27        int expr1B = V_1;
 28        int expr1C = 1;
 29        int expr1D = expr1B + expr1C;
 30        V_1 = expr1D;
 31        IL_1F: int expr1F = V_1;
 32        System.Int32[] expr20 = V_0;
 33        int expr21 = expr20.Length;
 34        int expr22 = (Int32)expr21;
 35        bool expr23 = expr1F < expr22;
 36        V_2 = expr23;
 37        bool expr26 = V_2;
 38        if (expr26) goto IL_0E; 
 39        System.Int32[] expr29 = V_0;
 40        int expr2A = 0;
 41        System.Int32[] expr2B = V_0;
 42        int expr2C = expr2B.Length;
 43        int expr2D = (Int32)expr2C;
 44        int expr2E = 1;
 45        int expr2F = expr2D - expr2E;
 46        QuickSortProgram.QuickSort(expr29, expr2A, expr2F);
 47        // No-op 
 48        int expr36 = 0;
 49        V_1 = expr36;
 50        goto IL_5C;
 51        IL_3A: // No-op 
 52        System.Int32[] expr3B = V_0;
 53        int expr3C = V_1;
 54        object expr3D = expr3B[expr3C];
 55        string expr42 = expr3D.ToString();
 56        string expr47 = " ";
 57        string expr4C = System.String.Concat(expr42, expr47);
 58        System.Console.Write(expr4C);
 59        // No-op 
 60        // No-op 
 61        int expr58 = V_1;
 62        int expr59 = 1;
 63        int expr5A = expr58 + expr59;
 64        V_1 = expr5A;
 65        IL_5C: int expr5C = V_1;
 66        System.Int32[] expr5D = V_0;
 67        int expr5E = expr5D.Length;
 68        int expr5F = (Int32)expr5E;
 69        bool expr60 = expr5C < expr5F;
 70        V_2 = expr60;
 71        bool expr63 = V_2;
 72        if (expr63) goto IL_3A; 
 73        return;
 74    }
 75    public static void QuickSort(System.Int32[] array, int left, int right)
 76    {
 77        int V_0;
 78        int V_1;
 79        bool V_2;
 80        // No-op 
 81        int expr01 = right;
 82        int expr02 = left;
 83        bool expr03 = expr01 > expr02;
 84        int expr05 = 0;
 85        bool expr06 = expr03 == (expr05 != 0);
 86        V_2 = expr06;
 87        bool expr09 = V_2;
 88        if (expr09) goto IL_34; 
 89        // No-op 
 90        int expr0D = left;
 91        int expr0E = right;
 92        int expr0F = expr0D + expr0E;
 93        int expr10 = 2;
 94        int expr11 = expr0F / expr10;
 95        V_0 = expr11;
 96        System.Int32[] expr13 = array;
 97        int expr14 = left;
 98        int expr15 = right;
 99        int expr16 = V_0;
100        int expr17 = QuickSortProgram.Partition(expr13, expr14, expr15, expr16);
101        V_1 = expr17;
102        System.Int32[] expr1D = array;
103        int expr1E = left;
104        int expr1F = V_1;
105        int expr20 = 1;
106        int expr21 = expr1F - expr20;
107        QuickSortProgram.QuickSort(expr1D, expr1E, expr21);
108        // No-op 
109        System.Int32[] expr28 = array;
110        int expr29 = V_1;
111        int expr2A = 1;
112        int expr2B = expr29 + expr2A;
113        int expr2C = right;
114        QuickSortProgram.QuickSort(expr28, expr2B, expr2C);
115        // No-op 
116        // No-op 
117        IL_34: return;
118    }
119    private static int Partition(System.Int32[] array, int left, int right, int pivotIndex)
120    {
121        int V_0;
122        int V_1;
123        int V_2;
124        int V_3;
125        bool V_4;
126        // No-op 
127        System.Int32[] expr01 = array;
128        int expr02 = pivotIndex;
129        int expr03 = expr01[expr02];
130        V_0 = expr03;
131        System.Int32[] expr05 = array;
132        int expr06 = pivotIndex;
133        int expr07 = right;
134        QuickSortProgram.Swap(expr05, expr06, expr07);
135        // No-op 
136        int expr0E = left;
137        V_1 = expr0E;
138        int expr10 = left;
139        V_2 = expr10;
140        goto IL_35;
141        IL_14: // No-op 
142        System.Int32[] expr15 = array;
143        int expr16 = V_2;
144        int expr17 = expr15[expr16];
145        int expr18 = V_0;
146        bool expr19 = expr17 > expr18;
147        V_4 = expr19;
148        bool expr1D = V_4;
149        if (expr1D) goto IL_30; 
150        // No-op 
151        System.Int32[] expr22 = array;
152        int expr23 = V_1;
153        int expr24 = V_2;
154        QuickSortProgram.Swap(expr22, expr23, expr24);
155        // No-op 
156        int expr2B = V_1;
157        int expr2C = 1;
158        int expr2D = expr2B + expr2C;
159        V_1 = expr2D;
160        // No-op 
161        IL_30: // No-op 
162        int expr31 = V_2;
163        int expr32 = 1;
164        int expr33 = expr31 + expr32;
165        V_2 = expr33;
166        IL_35: int expr35 = V_2;
167        int expr36 = right;
168        bool expr37 = expr35 < expr36;
169        V_4 = expr37;
170        bool expr3B = V_4;
171        if (expr3B) goto IL_14; 
172        System.Int32[] expr3F = array;
173        int expr40 = right;
174        int expr41 = V_1;
175        QuickSortProgram.Swap(expr3F, expr40, expr41);
176        // No-op 
177        int expr48 = V_1;
178        V_3 = expr48;
179        goto IL_4C;
180        IL_4C: int expr4C = V_3;
181        return expr4C;
182    }
183    private static void Swap(System.Int32[] array, int index1, int index2)
184    {
185        int V_0;
186        // No-op 
187        System.Int32[] expr01 = array;
188        int expr02 = index1;
189        int expr03 = expr01[expr02];
190        V_0 = expr03;
191        System.Int32[] expr05 = array;
192        int expr06 = index1;
193        System.Int32[] expr07 = array;
194        int expr08 = index2;
195        int expr09 = expr07[expr08];
196        expr05[expr06] = expr09;
197        System.Int32[] expr0B = array;
198        int expr0C = index2;
199        int expr0D = V_0;
200        expr0B[expr0C] = expr0D;
201        return;
202    }
203}