|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
package jode.test; |
|
|
|
|
|
|
|
|
|
|
|
public class OptimizeTest { |
|
|
|
public class OptimizeTest { |
|
|
|
|
|
|
|
|
|
|
|
public final int getInlined(String str, int i) { |
|
|
|
public final int getInlined(String str, int i) { |
|
|
@ -9,7 +11,7 @@ public class OptimizeTest { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int complexInline(String str, int i) { |
|
|
|
public final int complexInline(String str, int i) { |
|
|
|
System.err.println(""); |
|
|
|
System.err.println(""); |
|
|
|
return str.charAt(i)+str.charAt(-i); |
|
|
|
return str.charAt(i)+str.charAt(-i); |
|
|
|
} |
|
|
|
} |
|
|
@ -18,11 +20,36 @@ public class OptimizeTest { |
|
|
|
return str.charAt(i) + t.getInlined(str, i); |
|
|
|
return str.charAt(i) + t.getInlined(str, i); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public final void longInline(String str, int i) { |
|
|
|
|
|
|
|
str.replace('a','b'); |
|
|
|
|
|
|
|
System.err.println(str.concat(String.valueOf(str.charAt(i)))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int g; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public final int sideInline(int a) { |
|
|
|
|
|
|
|
return g++ + a; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void main(String[] param) { |
|
|
|
public void main(String[] param) { |
|
|
|
OptimizeTest ot = new OptimizeTest(); |
|
|
|
OptimizeTest ot = new OptimizeTest(); |
|
|
|
|
|
|
|
|
|
|
|
System.err.println(ot.getInlined("Hallo", ot.notInlined(param[1], 10 - ot.getInlined(param[0], 0, new OptimizeTest()), ot))); |
|
|
|
System.err.println(ot.getInlined("Hallo", ot.notInlined(param[1], 10 - ot.getInlined(param[0], 0, new OptimizeTest()), ot))); |
|
|
|
System.err.println(ot.complexInline("ollah", param.length)); |
|
|
|
System.err.println(ot.complexInline("ollah", param.length)); |
|
|
|
|
|
|
|
System.err.println("result: "+(g++ + sideInline(g) + g++) + "g: "+g); |
|
|
|
|
|
|
|
longInline("Hallo", 3); |
|
|
|
|
|
|
|
System.err.println("result:"+ |
|
|
|
|
|
|
|
(g++ + jode.test.inline.InlineTest |
|
|
|
|
|
|
|
.difficultSideInline(this, g) |
|
|
|
|
|
|
|
+ g++) + "g: "+g); |
|
|
|
|
|
|
|
System.err.println("result:"+ |
|
|
|
|
|
|
|
(g++ + jode.inline.InlineTest |
|
|
|
|
|
|
|
.difficultSideInline(this, g) |
|
|
|
|
|
|
|
+ g++) + "g: "+g); |
|
|
|
|
|
|
|
System.err.println("result:"+ |
|
|
|
|
|
|
|
(g++ + jode.InlineTest |
|
|
|
|
|
|
|
.difficultSideInline(this, g) |
|
|
|
|
|
|
|
+ g++) + "g: "+g); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|