[Soot-list] how to optimize with soot
Szasz Pal
space at spacesoftwarestudio.com
Thu Oct 20 12:58:57 EDT 2005
Hi!
I was searching the internet for some java bytecode optimizer program,
when I found soot. I tried it with the attached (compiled) class file
using the following command line:
$ java -classpath
jasminclasses-2.2.2.jar:sootclasses-2.2.2.jar:polyglotclasses-1.3.2.jar
soot.Main -d out -process-dir in -cp
in:/usr/java/j2sdk1.4.2/jre/lib/rt.jar -O
The compiled A.class is in the 'in' subdirectory.
The resulted file in the 'out' subdirectory is smaller (514 vs 600
bytes), but if I decompile it I get:
[...]
static public void main(String[] s1) {
A.setField(10);
out.println(A.getField());
}
[...]
I would expected it to be inlined, ie. to get something like:
[...]
static public void main(String[] s1) {
field = 10;
out.println(field);
}
[...]
What am I doing wrong? Or have I misunderstood something, and soot is
not designed for this?
Thank you in advance!
--
Best regards,
Szasz Pal
----------------
Space Software Studio
http://www.spacesoftwarestudio.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: space.vcf
Type: text/x-vcard
Size: 192 bytes
Desc: not available
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20051020/8bd4382c/space.vcf
More information about the Soot-list
mailing list