]> source.dussan.org Git - aspectj.git/commit
Implemented feature for Bugzilla Bug 48091
authorjhugunin <jhugunin>
Sat, 24 Jan 2004 02:28:54 +0000 (02:28 +0000)
committerjhugunin <jhugunin>
Sat, 24 Jan 2004 02:28:54 +0000 (02:28 +0000)
commit0c833438dadeeb26659cd901870d18d2c103658b
treecbe369e1ea2e90cdfabf09f9b343da4e9a930621
parent2b4e2512530a5d0a12e92071eb2e3198722dcd6b
Implemented feature for Bugzilla Bug 48091
   Lazy instantiation of thisJoinPoint
Speed-ups of 10-100X are measured even when running a small test case with minimal GC issues.

The actual feature implemented is that thisJoinPoint objects are only created just before calling the method for advice that requires them.  To take advantage of this feature you must use an if PCD or some other dynamic test that occurs in the PCD not the advice body to guard the expensive creation of the thisJoinPoint object.

-XlazyTjp flag must be passed to compiler to enable this feature.
If any around advice is present on the joinpoint then lazy instantiation
will be disabled.  An Xlint warning will be displayed in this case.

As a related optimization, several helper methods were added to
Factory.makeJP to reduce the code size when thisJoinPoint is used.
17 files changed:
lib/test/aspectjrt.jar
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
org.aspectj.ajdt.core/testdata/src1/LazyTjp.aj [new file with mode: 0644]
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/AjdtBatchTests.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/PerformanceTestCase.java [new file with mode: 0644]
runtime/src/org/aspectj/runtime/reflect/Factory.java
weaver/src/org/aspectj/weaver/Lint.java
weaver/src/org/aspectj/weaver/World.java
weaver/src/org/aspectj/weaver/XlintDefault.properties
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
weaver/testdata/TjpAround2HelloWorld.txt
weaver/testdata/TjpAroundHelloWorld.txt
weaver/testdata/TjpBeforeHelloWorld.txt