Hi Guys,
Two points:
1) do we want to mention "other optimizations" in our PLDI paper, if so,
what are they?
2) I have been thinking about the optimization of AspectOf() ... and I
think it is worth doing for singleton aspects at least ...
Here is an example implementation of AspectOf for a singleton aspect:
public static CompilerAspect aspectOf() throws
org.aspectj.lang.NoAspectBoundException
{ CompilerAspect r0;
r0 = abc$perSingletonInstance;
if (r0 == null)
throw new
NoAspectBoundException("CompilerAspect", abc$initFailureCause);
else
return r0;
}
Knowing that this is the the implementation, then in the woven code,
if a call of the form
CompilerAspect.aspectOf()
suceeds, then this aspect has been initialized, and all subsequent
calls to Compiler.aspectOf() will return the same value
Based on this I propose a small flow analysis that keeps track
of "avaliable Singleton Aspects". A singleton aspect X is available
if on all paths a statement of the form X.aspectOf() has been
sucessfully executed (i.e. on regular control flow edges).
Then a transformer would go through, and at each call to aspectOf, where
it is already available, it would eliminate the extra call to
aspectOf and use the previously computed value. Note that this
may need to introduce some extra copies, to make sure the aspectOf
is put in the same local on all paths. (similar to CSE)
I haven't had time to think about per aspects and reducing the work there,
but it might be worth thinking about those too.
Also, if we are already doing an interprocedural analysis (i.e. we are
doing -O3 anyway), we could have an interprocedural version of this).
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 Sun Apr 10 13:43:29 2005
This archive was generated by hypermail 2.1.8 : Sun Apr 10 2005 - 14:00:05 BST