Browse Source

Test on the compiler optimized version of quicksort

pull/1/head^2
David Srbecký 19 years ago
parent
commit
9eb2441490
  1. 2
      src/Program.cs
  2. 1
      src/StackExpressionCollection.cs

2
src/Program.cs

@ -21,7 +21,7 @@ namespace Decompiler
[STAThread] [STAThread]
private static void Main(string[] args) private static void Main(string[] args)
{ {
string sourceCode = Decompile(@"..\..\tests\QuickSort\bin\Debug\QuickSort.exe"); string sourceCode = Decompile(@"..\..\tests\QuickSort\bin\Release\QuickSort.exe");
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);

1
src/StackExpressionCollection.cs

@ -19,6 +19,7 @@ namespace Decompiler
public void Optimize() public void Optimize()
{ {
for(int i = 1; i < this.Count; i++) { for(int i = 1; i < this.Count; i++) {
if (i == 0) continue;
StackExpression prevExpr = this[i - 1]; StackExpression prevExpr = this[i - 1];
StackExpression expr = this[i]; StackExpression expr = this[i];

Loading…
Cancel
Save