diff options
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/Advice.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java | 4 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedTypeX.java | 5 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/World.java | 10 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java | 18 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java | 1 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 28 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelWorld.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java | 38 | ||||
-rw-r--r-- | weaver/testdata/AfterFancyHelloWorld.txt | 19 | ||||
-rw-r--r-- | weaver/testdata/AfterThrowingFancyHelloWorld.txt | 19 | ||||
-rw-r--r-- | weaver/testdata/AfterThrowingParamFancyHelloWorld.txt | 19 | ||||
-rw-r--r-- | weaver/testdata/TraceJarHello.txt | 160 |
15 files changed, 184 insertions, 145 deletions
diff --git a/weaver/src/org/aspectj/weaver/Advice.java b/weaver/src/org/aspectj/weaver/Advice.java index b6714333f..cb6a4d5bc 100644 --- a/weaver/src/org/aspectj/weaver/Advice.java +++ b/weaver/src/org/aspectj/weaver/Advice.java @@ -21,7 +21,7 @@ import org.aspectj.weaver.patterns.*; public abstract class Advice extends ShadowMunger { - AjAttribute.AdviceAttribute attribute; // the pointcut field is ignored + protected AjAttribute.AdviceAttribute attribute; // the pointcut field is ignored protected AdviceKind kind; // alias of attribute.getKind() protected Member signature; diff --git a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java index 9f55b28e9..3102bd24f 100644 --- a/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ConcreteTypeMunger.java @@ -27,6 +27,10 @@ public abstract class ConcreteTypeMunger implements PartialOrder.PartialComparab //public abstract boolean munge(LazyClassGen gen); + + /** returns null for mungers that are used internally, but were not part of a declared + * thing in source code. + */ public ResolvedTypeMunger getMunger() { return munger; } diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java index e04c923cb..2b943ede1 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeMunger.java @@ -45,7 +45,9 @@ public abstract class ResolvedTypeMunger { public boolean matches(ResolvedTypeX matchType) { ResolvedTypeX onType = matchType.getWorld().resolve(signature.getDeclaringType()); + //System.err.println("matching: " + this + " to " + matchType + " onType = " + onType); if (matchType.equals(onType)) return true; + //System.err.println("NO MATCH DIRECT"); if (onType.isInterface()) { return matchType.isTopmostImplementor(onType); diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeX.java b/weaver/src/org/aspectj/weaver/ResolvedTypeX.java index a2c14f27a..e8a76d99a 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeX.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeX.java @@ -33,7 +33,6 @@ public abstract class ResolvedTypeX extends TypeX { // ---- things that don't require a world - /** returns Iterator<ResolvedTypeX> */ public final Iterator getDirectSupertypes() { @@ -808,7 +807,9 @@ public abstract class ResolvedTypeX extends TypeX { public void addInterTypeMunger(ConcreteTypeMunger munger) { ResolvedMember sig = munger.getSignature(); - if (sig == null) { + if (sig == null || munger.getMunger() == null || + munger.getMunger().getKind() == ResolvedTypeMunger.PrivilegedAccess) + { interTypeMungers.add(munger); return; } diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index 4ed8abb49..b1d150c68 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -31,6 +31,8 @@ public abstract class World { protected StructureModel model = null; protected Lint lint = new Lint(this); + + protected boolean XnoInline; protected World() { super(); @@ -337,4 +339,12 @@ public abstract class World { this.lint = lint; } + public boolean isXnoInline() { + return XnoInline; + } + + public void setXnoInline(boolean xnoInline) { + XnoInline = xnoInline; + } + } diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index e27102cfa..77842f3cd 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -85,6 +85,17 @@ public class BcelAdvice extends Advice { } } + private boolean canInline(Shadow s) { + if (attribute.isProceedInInners()) return false; + //XXX this guard seems to only be needed for bad test cases + if (concreteAspect == null || concreteAspect == ResolvedTypeX.MISSING) return false; + + if (concreteAspect.getWorld().isXnoInline()) return false; + //System.err.println("isWoven? " + ((BcelObjectType)concreteAspect).getLazyClassGen().getWeaverState()); + return ((BcelObjectType)concreteAspect).getLazyClassGen().getWeaverState() + == WeaverStateKind.Woven; + } + public void implementOn(Shadow s) { BcelShadow shadow = (BcelShadow) s; if (getKind() == AdviceKind.Before) { @@ -100,8 +111,11 @@ public class BcelAdvice extends Advice { } else if (getKind() == AdviceKind.After) { shadow.weaveAfter(this); } else if (getKind() == AdviceKind.Around) { - shadow.weaveAroundClosure(this, hasDynamicTests()); - //shadow.weaveAroundInline(this, hasDynamicTests()); + if (!canInline(s)) { + shadow.weaveAroundClosure(this, hasDynamicTests()); + } else { + shadow.weaveAroundInline(this, hasDynamicTests()); + } } else if (getKind() == AdviceKind.InterInitializer) { shadow.weaveAfterReturning(this); } else if (getKind().isCflow()) { diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java index 8ceda85e3..415098ba0 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java @@ -33,6 +33,7 @@ class BcelClassWeaver implements IClassWeaver { List typeMungers) { boolean b = new BcelClassWeaver(world, clazz, shadowMungers, typeMungers).weave(); + //System.err.println(clazz.getClassName() + ", " + clazz.getWeaverState()); //clazz.print(); return b; } diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 9f4d8d28a..6937d9bac 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -1134,6 +1134,20 @@ public class BcelShadow extends Shadow { * If only one call to proceed is made, we can re-inline the original shadow. * We are not doing that presently. */ + + // !!! THIS BLOCK OF CODE SHOULD BE IN A METHOD CALLED weaveAround(...); + Member mungerSig = munger.getSignature(); + ResolvedTypeX declaringType = world.resolve(mungerSig.getDeclaringType()); + //??? might want some checks here to give better errors + BcelObjectType ot = (BcelObjectType)declaringType; + + LazyMethodGen adviceMethod = ot.getLazyClassGen().getLazyMethodGen(mungerSig); + if (!adviceMethod.getCanInline()) { + weaveAroundClosure(munger, hasDynamicTest); + return; + } + + // start by exposing various useful things into the frame final InstructionFactory fact = getFactory(); @@ -1174,22 +1188,22 @@ public class BcelShadow extends Shadow { if (! hasDynamicTest) { range.append(advice); } else { + InstructionList afterThingie = new InstructionList(fact.NOP); InstructionList callback = makeCallToCallback(extractedMethod); if (terminatesWithReturn()) { callback.append(fact.createReturn(extractedMethod.getReturnType())); } else { - advice.append(fact.createBranchInstruction(Constants.GOTO, range.getEnd())); + //InstructionHandle endNop = range.insert(fact.NOP, Range.InsideAfter); + advice.append(fact.createBranchInstruction(Constants.GOTO, afterThingie.getStart())); } range.append(munger.getTestInstructions(this, advice.getStart(), callback.getStart(), advice.getStart())); range.append(advice); - range.append(callback); + range.append(callback); + range.append(afterThingie); } // now the range contains everything we need. We now inline the advice method. - LazyMethodGen adviceMethod = - ((BcelObjectType) munger.getConcreteAspect()) - .getLazyClassGen() - .getLazyMethodGen(munger.getSignature()); + BcelClassWeaver.inlineMethod(adviceMethod, enclosingMethod, adviceMethodInvocation); @@ -1296,6 +1310,8 @@ public class BcelShadow extends Shadow { { InstructionFactory fact = getFactory(); + enclosingMethod.setCanInline(false); + // MOVE OUT ALL THE INSTRUCTIONS IN MY SHADOW INTO ANOTHER METHOD! LazyMethodGen callbackMethod = extractMethod( diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 6b6987e16..97d8a09a4 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -156,7 +156,7 @@ public class BcelWorld extends World { } // ---- fluf - public ResolvedTypeX resolveObjectType(TypeX ty) { + protected ResolvedTypeX resolveObjectType(TypeX ty) { String name = ty.getName(); JavaClass jc = null; //UnwovenClassFile classFile = (UnwovenClassFile)sourceJavaClasses.get(name); diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 110ec064d..e4135cbcb 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -295,6 +295,7 @@ public final class LazyClassGen { myGen.addAttribute(BcelAttributes.bcelAttribute( new AjAttribute.WeaverState(s), getConstantPoolGen())); + myType.setWeaverState(s); } public InstructionFactory getFactory() { @@ -484,6 +485,7 @@ public final class LazyClassGen { if (gen.getName().equals(name) && gen.getSignature().equals(signature)) return gen; } + throw new BCException("Class " + this.getName() + " does not have a method " + name + " with signature " + signature); } diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index 326f5426b..5a6afccae 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -51,6 +51,8 @@ public final class LazyMethodGen { private int maxLocals; + private boolean canInline = true; + /** * only used by {@link BcelClassWeaver} */ @@ -434,7 +436,9 @@ public final class LazyMethodGen { String getRangeString(Range r, Map labelMap) { if (r instanceof ExceptionRange) { ExceptionRange er = (ExceptionRange) r; - return er.toString() + " -> " + labelMap.get(er.getHandler()); + return er.toString() + " -> " + labelMap.get(er.getHandler()); +// +// + " PRI " + er.getPriority(); } else { return r.toString(); } @@ -813,7 +817,11 @@ public final class LazyMethodGen { } } - // exception ordering + // exception ordering. + // What we should be doing is dealing with priority inversions way earlier than we are + // and counting on the tree structure. In which case, the below code is in fact right. + + // XXX THIS COMMENT BELOW IS CURRENTLY WRONG. // An exception A preceeds an exception B in the exception table iff: // * A and B were in the original method, and A preceeded B in the original exception table @@ -824,15 +832,15 @@ public final class LazyMethodGen { // but I don't trust the only implementation, TreeSet, to do the right thing. private static void insertHandler(ExceptionRange fresh, LinkedList l) { - for (ListIterator iter = l.listIterator(); iter.hasNext();) { - ExceptionRange r = (ExceptionRange) iter.next(); - if (fresh.getPriority() >= r.getPriority()) { - iter.previous(); - iter.add(fresh); - return; - } - } - l.add(fresh); +// for (ListIterator iter = l.listIterator(); iter.hasNext();) { +// ExceptionRange r = (ExceptionRange) iter.next(); +// if (fresh.getPriority() >= r.getPriority()) { +// iter.previous(); +// iter.add(fresh); +// return; +// } +// } + l.add(0, fresh); } @@ -1064,4 +1072,12 @@ public final class LazyMethodGen { accessFlags = Utility.makePublic(accessFlags); } + public boolean getCanInline() { + return canInline; + } + + public void setCanInline(boolean canInline) { + this.canInline = canInline; + } + } diff --git a/weaver/testdata/AfterFancyHelloWorld.txt b/weaver/testdata/AfterFancyHelloWorld.txt index 16b04e4b1..b693040af 100644 --- a/weaver/testdata/AfterFancyHelloWorld.txt +++ b/weaver/testdata/AfterFancyHelloWorld.txt @@ -19,11 +19,11 @@ public abstract class FancyHelloWorld extends java.lang.Object: method-execution(void FancyHelloWorld.main(java.lang.String[])) | catch java.lang.Throwable -> E6 | | field-get(java.io.PrintStream java.lang.System.out) - | | | catch java.lang.Throwable -> E3 + | | | catch java.lang.Throwable -> E5 | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) - | | | catch java.lang.Throwable -> E3 + | | | catch java.lang.Throwable -> E5 | | | GOTO L0 - | | | E3: ASTORE 5 + | | | E5: ASTORE 5 | | | INVOKESTATIC Aspect.ajc_after_field_get ()V | | | ALOAD 5 | | | ATHROW @@ -32,8 +32,8 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | | NOP | | field-get(java.io.PrintStream java.lang.System.out) | | ASTORE_1 - | | finally -> E5 - | | | catch java.lang.Exception -> E4 + | | finally -> E4 + | | | catch java.lang.Exception -> E3 | | | | ALOAD_1 // java.io.PrintStream out (line 11) | | | | LDC "bye" | | | | method-call(void java.io.PrintStream.println(java.lang.String)) @@ -50,8 +50,8 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | | | | NOP | | | | method-call(void java.io.PrintStream.println(java.lang.String)) | | | | GOTO L3 - | | | catch java.lang.Exception -> E4 - | | | E4: ASTORE_2 (line 12) + | | | catch java.lang.Exception -> E3 + | | | E3: ASTORE_2 (line 12) | | | ALOAD_1 // java.io.PrintStream out (line 13) | | | ALOAD_2 // java.lang.Exception e | | | method-call(void java.io.PrintStream.println(java.lang.Object)) @@ -67,9 +67,9 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | | | INVOKESTATIC Aspect.ajc_after_method_call ()V | | | | NOP | | | method-call(void java.io.PrintStream.println(java.lang.Object)) - | | finally -> E5 + | | finally -> E4 | | GOTO L3 - | | E5: ASTORE 4 (line 14) + | | E4: ASTORE 4 (line 14) | | JSR L4 | | ALOAD 4 | | ATHROW @@ -180,4 +180,5 @@ public abstract class FancyHelloWorld extends java.lang.Object: | ARETURN method-execution(java.lang.String FancyHelloWorld.getName()) end public static String getName() + end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterThrowingFancyHelloWorld.txt b/weaver/testdata/AfterThrowingFancyHelloWorld.txt index ed9e89bfd..3323beea6 100644 --- a/weaver/testdata/AfterThrowingFancyHelloWorld.txt +++ b/weaver/testdata/AfterThrowingFancyHelloWorld.txt @@ -17,19 +17,19 @@ public abstract class FancyHelloWorld extends java.lang.Object: method-execution(void FancyHelloWorld.main(java.lang.String[])) | catch java.lang.Throwable -> E6 | | field-get(java.io.PrintStream java.lang.System.out) - | | | catch java.lang.Throwable -> E3 + | | | catch java.lang.Throwable -> E5 | | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) - | | | catch java.lang.Throwable -> E3 + | | | catch java.lang.Throwable -> E5 | | | GOTO L0 - | | | E3: ASTORE 5 + | | | E5: ASTORE 5 | | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get ()V | | | ALOAD 5 | | | ATHROW | | | L0: NOP | | field-get(java.io.PrintStream java.lang.System.out) | | ASTORE_1 - | | finally -> E5 - | | | catch java.lang.Exception -> E4 + | | finally -> E4 + | | | catch java.lang.Exception -> E3 | | | | ALOAD_1 // java.io.PrintStream out (line 11) | | | | LDC "bye" | | | | method-call(void java.io.PrintStream.println(java.lang.String)) @@ -44,8 +44,8 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | | | | L1: NOP | | | | method-call(void java.io.PrintStream.println(java.lang.String)) | | | | GOTO L3 - | | | catch java.lang.Exception -> E4 - | | | E4: ASTORE_2 (line 12) + | | | catch java.lang.Exception -> E3 + | | | E3: ASTORE_2 (line 12) | | | ALOAD_1 // java.io.PrintStream out (line 13) | | | ALOAD_2 // java.lang.Exception e | | | method-call(void java.io.PrintStream.println(java.lang.Object)) @@ -59,9 +59,9 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | | | ATHROW | | | | L2: NOP | | | method-call(void java.io.PrintStream.println(java.lang.Object)) - | | finally -> E5 + | | finally -> E4 | | GOTO L3 - | | E5: ASTORE 4 (line 14) + | | E4: ASTORE 4 (line 14) | | JSR L4 | | ALOAD 4 | | ATHROW @@ -158,4 +158,5 @@ public abstract class FancyHelloWorld extends java.lang.Object: | ATHROW method-execution(java.lang.String FancyHelloWorld.getName()) end public static String getName() + end public abstract class FancyHelloWorld diff --git a/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt b/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt index 351d35649..0e995aaff 100644 --- a/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt +++ b/weaver/testdata/AfterThrowingParamFancyHelloWorld.txt @@ -10,11 +10,11 @@ public abstract class FancyHelloWorld extends java.lang.Object: public static void main(String[]): method-execution(void FancyHelloWorld.main(java.lang.String[])) | field-get(java.io.PrintStream java.lang.System.out) - | | catch java.lang.Throwable -> E0 + | | catch java.lang.Throwable -> E2 | | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 9) - | | catch java.lang.Throwable -> E0 + | | catch java.lang.Throwable -> E2 | | GOTO L0 - | | E0: ASTORE 5 + | | E2: ASTORE 5 | | ALOAD 5 | | INVOKESTATIC Aspect.ajc_afterThrowing_field_get (Ljava/lang/Throwable;)V | | ALOAD 5 @@ -22,24 +22,24 @@ public abstract class FancyHelloWorld extends java.lang.Object: | | L0: NOP | field-get(java.io.PrintStream java.lang.System.out) | ASTORE_1 - | finally -> E2 - | | catch java.lang.Exception -> E1 + | finally -> E1 + | | catch java.lang.Exception -> E0 | | | ALOAD_1 // java.io.PrintStream out (line 11) | | | LDC "bye" | | | method-call(void java.io.PrintStream.println(java.lang.String)) | | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V | | | method-call(void java.io.PrintStream.println(java.lang.String)) | | | GOTO L1 - | | catch java.lang.Exception -> E1 - | | E1: ASTORE_2 (line 12) + | | catch java.lang.Exception -> E0 + | | E0: ASTORE_2 (line 12) | | ALOAD_1 // java.io.PrintStream out (line 13) | | ALOAD_2 // java.lang.Exception e | | method-call(void java.io.PrintStream.println(java.lang.Object)) | | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/Object;)V | | method-call(void java.io.PrintStream.println(java.lang.Object)) - | finally -> E2 + | finally -> E1 | GOTO L1 - | E2: ASTORE 4 (line 14) + | E1: ASTORE 4 (line 14) | JSR L2 | ALOAD 4 | ATHROW @@ -83,4 +83,5 @@ public abstract class FancyHelloWorld extends java.lang.Object: | ARETURN method-execution(java.lang.String FancyHelloWorld.getName()) end public static String getName() + end public abstract class FancyHelloWorld diff --git a/weaver/testdata/TraceJarHello.txt b/weaver/testdata/TraceJarHello.txt index 6d96a9025..19fa930a5 100644 --- a/weaver/testdata/TraceJarHello.txt +++ b/weaver/testdata/TraceJarHello.txt @@ -66,33 +66,46 @@ public class DynamicHelloWorld extends java.lang.Object implements java.io.Seria | ALOAD_0 | INVOKEVIRTUAL Trace.ajc$before$Trace$51 (Ljava/lang/Object;)V | INVOKESTATIC MyTrace.aspectOf ()LMyTrace; - | BIPUSH 3 - | ANEWARRAY java.lang.Object - | ASTORE 6 - | ALOAD 6 - | BIPUSH 0 + | ACONST_NULL + | ASTORE 13 + | ASTORE 12 + | LDC "Hi" (line 9) + | ASTORE 14 + | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 10) + | NEW java.lang.StringBuffer + | DUP + | LDC "start around: " + | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | ALOAD 14 + | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | ALOAD 13 (line 11) + | ASTORE 18 | ALOAD_0 - | AASTORE - | ALOAD 6 - | BIPUSH 1 | ALOAD_3 - | AASTORE - | ALOAD 6 - | BIPUSH 2 | ALOAD 4 - | AASTORE - | NEW DynamicHelloWorld$AjcClosure3 + | INVOKESTATIC DynamicHelloWorld.doit_aroundBody1 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + | ASTORE 16 + | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 12) + | NEW java.lang.StringBuffer | DUP - | ALOAD 6 - | INVOKESPECIAL DynamicHelloWorld$AjcClosure3.<init> ([Ljava/lang/Object;)V - | INVOKEVIRTUAL Trace.ajc$around$Trace$cc (Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; - | CHECKCAST java.lang.String + | LDC "exiting around with: " + | INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + | ALOAD 16 + | INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + | INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + | ALOAD 16 (line 13) | GOTO L0 - | L0: DUP - | ASTORE 7 + | L0: NOP + | CHECKCAST java.lang.String + | GOTO L1 + | L1: DUP + | ASTORE 19 | INVOKESTATIC MyTrace.aspectOf ()LMyTrace; | ALOAD_0 - | ALOAD 7 + | ALOAD 19 | INVOKEVIRTUAL MyTrace.ajc$afterReturning$MyTrace$6e (Ljava/lang/Object;Ljava/lang/Object;)V | ARETURN method-execution(java.lang.String DynamicHelloWorld.doit(java.lang.String, java.util.List)) @@ -112,88 +125,45 @@ public class DynamicHelloWorld extends java.lang.Object implements java.io.Seria ARETURN end static final String doit_aroundBody0(DynamicHelloWorld, String, java.util.List) - static final String doit_aroundBody2(DynamicHelloWorld, String, java.util.List): + static final String doit_aroundBody1(DynamicHelloWorld, String, java.util.List): INVOKESTATIC MyTrace.aspectOf ()LMyTrace; ALOAD_0 - BIPUSH 3 - ANEWARRAY java.lang.Object + ACONST_NULL ASTORE_3 - ALOAD_3 - BIPUSH 0 - ALOAD_0 - AASTORE - ALOAD_3 - BIPUSH 1 - ALOAD_1 - AASTORE - ALOAD_3 - BIPUSH 2 - ALOAD_2 - AASTORE - NEW DynamicHelloWorld$AjcClosure1 + ASTORE 5 + ASTORE 7 + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 17) + NEW java.lang.StringBuffer DUP + LDC "start around(2): " + INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + ALOAD 5 + INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + ALOAD 5 (line 18) ALOAD_3 - INVOKESPECIAL DynamicHelloWorld$AjcClosure1.<init> ([Ljava/lang/Object;)V - INVOKEVIRTUAL Trace.ajc$around$Trace$1bc (Ljava/lang/Object;Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object; - CHECKCAST java.lang.String - ARETURN - end static final String doit_aroundBody2(DynamicHelloWorld, String, java.util.List) -end public class DynamicHelloWorld - -public class DynamicHelloWorld$AjcClosure1 extends org.aspectj.runtime.internal.AroundClosure: - public void <init>(Object[]): - ALOAD_0 - ALOAD_1 - INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V - RETURN - end public void <init>(Object[]) - - public Object run(Object[]): - ALOAD_0 - GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; - ASTORE_2 - ALOAD_1 - BIPUSH 0 - AALOAD + ASTORE 9 + ASTORE 11 + ALOAD 11 CHECKCAST DynamicHelloWorld - ALOAD_2 - BIPUSH 1 - AALOAD - CHECKCAST java.lang.String - ALOAD_2 - BIPUSH 2 - AALOAD - CHECKCAST java.util.List - INVOKESTATIC DynamicHelloWorld.doit_aroundBody0 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; - ARETURN - end public Object run(Object[]) -end public class DynamicHelloWorld$AjcClosure1 - -public class DynamicHelloWorld$AjcClosure3 extends org.aspectj.runtime.internal.AroundClosure: - public void <init>(Object[]): - ALOAD_0 ALOAD_1 - INVOKESPECIAL org.aspectj.runtime.internal.AroundClosure.<init> ([Ljava/lang/Object;)V - RETURN - end public void <init>(Object[]) - - public Object run(Object[]): - ALOAD_0 - GETFIELD org.aspectj.runtime.internal.AroundClosure.state [Ljava/lang/Object; - ASTORE_2 - ALOAD_2 - BIPUSH 0 - AALOAD - CHECKCAST DynamicHelloWorld ALOAD_2 - BIPUSH 1 - AALOAD + INVOKESTATIC DynamicHelloWorld.doit_aroundBody0 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; + ASTORE 13 + GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 19) + NEW java.lang.StringBuffer + DUP + LDC "exiting around with(2): " + INVOKESPECIAL java.lang.StringBuffer.<init> (Ljava/lang/String;)V + ALOAD 13 + INVOKEVIRTUAL java.lang.StringBuffer.append (Ljava/lang/Object;)Ljava/lang/StringBuffer; + INVOKEVIRTUAL java.lang.StringBuffer.toString ()Ljava/lang/String; + INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V + ALOAD 13 (line 20) + GOTO L0 + L0: NOP CHECKCAST java.lang.String - ALOAD_2 - BIPUSH 2 - AALOAD - CHECKCAST java.util.List - INVOKESTATIC DynamicHelloWorld.doit_aroundBody2 (LDynamicHelloWorld;Ljava/lang/String;Ljava/util/List;)Ljava/lang/String; ARETURN - end public Object run(Object[]) -end public class DynamicHelloWorld$AjcClosure3 + end static final String doit_aroundBody1(DynamicHelloWorld, String, java.util.List) +end public class DynamicHelloWorld |