Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Weaver used in load-time

> it safe to say that this is the same weaver used in static (i.e. 
> compile-time) weaving? 

As Ron said, basically yes.

> Does it apply all the same analises and 
> optimizations?

Some things are the responsibility of the compiler, so no weaver would
do everything ajc did.  Do you have a more specific issue/question?

We do say that you should get the same results whether you are using
build-time or load-time weaving (indeed, having two separate weavers
would introduce a number of issues for validating that assertion),
and using @AspectJ annotation style and code style.  However, there
are limitations with annotation style and some differences with LTW.
We try to work on the differences that make a difference ASAP, and
optimize for build-v-LTW with flags - e.g., Adrian is looking at 
maintaining the threadlocal stack only when doing LTW weaving.  Also,
if you're thinking of embedding the weaver in another application,
there has long been talk of packaging the weaver as a stand-alone
command-line executable, but we haven't had a compelling use-case yet.
To try that, just build the weaver module with the "all" (i.e., 
accumulate) flag - see the build docs.

Wes

> ------------Original Message------------
> From: Eduardo Santos Cordeiro <cordeiro@xxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Mon, Feb-13-2006 8:23 AM
> Subject: [aspectj-users] Weaver used in load-time
>
> Hello there,
> 
> I've been sniffing through the source code of ajc, especially inside 
> classes WeavingURLClassLoader and WeavingAdaptor, and it seems that 
> after loading the definitions, BcelWeaver is used to weave aspects. Is 
> it safe to say that this is the same weaver used in static (i.e. 
> compile-time) weaving? Does it apply all the same analises and 
> optimizations?
> 
> Thank you,
> 
> Eduardo Cordeiro
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 



Back to the top