[abc] Java2Jimple and generated Soot class files

From: Prof. Laurie HENDREN <hendren@sable.mcgill.ca>
Date: Thu Apr 14 2005 - 17:32:12 BST

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:32:16 2005

This archive was generated by hypermail 2.1.8 : Thu Apr 14 2005 - 18:00:04 BST