Re: [abc] Java2Jimple and generated Soot class files

From: Jennifer LHOTAK <jlhotak@sable.mcgill.ca>
Date: Thu Apr 14 2005 - 17:51:15 BST

Hi,

Yes J2J creates terrible Jimple for this example.

I have know idea why javap lists 0 as the major version number. BCEL lists
it as 46 (for 1.4 javac compilers) and 49 (for 1.5 javac compilers). Soot,
or rather Jasmin puts 45 for the major version and 3 for the minor
version. This is because it hasn't been updated in years. It will be
updated to change between probably 45 and 49 for handling 1.5 features.

I
don't think the minor version makes any difference but the major version
is read by the VM to determine stuff likes what is allowed in the constant
pool. Java 1.5 VM's reject code with 1.5 class constants in the constant
pool if the major version number is < 49. Java 1.4 VM's reject any classes
with a major version number that is too high (such as 49).

Jennifer

On Thu, 14 Apr 2005, Prof. Laurie HENDREN wrote:

> Hi Jennifer,
>
> I have been on the trail of peformance mysteries today, and I
> have noticed two things (which apparently didn't matter for my
> mystery) but are probably worth looking into in general.
>
> 1) J2J generates extra stores and loads for complicated conditionals using
> && and ||.
>
> Here is an example of code from the simulator which showed the
> problem:
>
> int compare (TQ_Node that)
> {
> // System.out.println ("TQ_Node compare");
> if (time > that.time || time == that.time && priority > that.priority) {
> return 1; // this > that
>
> } else if (time == that.time && priority == that.priority) {
> return 0; // this == that
>
> } else {
> return -1; // this < that
> } // if
>
> }; // compare
>
>
>
> 2) I was looking at the class files generated by javac, ajc, abc and
> soot. I used javap -verbose which gives lots of info, including
> the major and minor version numbers. It seems that both javac
> and ajc where putting 0's there, while abc and soot put major number 3
> and minor number 3. What's up with these numbers? Why do the
> other guys put 0? Why do we put 3?
>
>
> Cheers, Laurie
>
>
> +-------------------------------------------------------------+
> | Laurie Hendren, Professor, School of Computer Science |
> | McGill University |
> | 318 McConnell Engineering Building tel: (514) 398-7391 |
> | 3480 University Street fax: (514) 398-3883 |
> | Montreal, Quebec H3A 2A7 hendren@cs.mcgill.ca |
> | CANADA http://www.sable.mcgill.ca/~hendren |
> | http://wwww.sable.mcgill.ca http://aspectbench.org |
> +-------------------------------------------------------------+
>
>
>
Received on Thu Apr 14 17:51:18 2005

This archive was generated by hypermail 2.1.8 : Thu Apr 14 2005 - 20:10:05 BST