]> source.dussan.org Git - aspectj.git/commitdiff
fixed order of thisJoinPoint and thisJoinPointStaticPart
authorjhugunin <jhugunin>
Wed, 18 Dec 2002 18:23:38 +0000 (18:23 +0000)
committerjhugunin <jhugunin>
Wed, 18 Dec 2002 18:23:38 +0000 (18:23 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java

index b3a42edf358b0f013d078776d120fe07c5047a73..6c9e4055ad181bb00db10c82cd68bf7408542c60 100644 (file)
@@ -61,13 +61,13 @@ public class BcelAdvice extends Advice {
                pointcutTest = getPointcut().findResidue(shadow, exposedState);
                
         // make sure thisJoinPoint parameters are initialized
-        if ((extraParameterFlags & ThisJoinPoint) != 0) {
-               ((BcelShadow)shadow).getThisJoinPointVar();
-        }
-        
         if ((extraParameterFlags & ThisJoinPointStaticPart) != 0) {
                ((BcelShadow)shadow).getThisJoinPointStaticPartVar();
         }
+
+        if ((extraParameterFlags & ThisJoinPoint) != 0) {
+               ((BcelShadow)shadow).getThisJoinPointVar();
+        }
         
         if ((extraParameterFlags & ThisEnclosingJoinPointStaticPart) != 0) {
                ((BcelShadow)shadow).getThisEnclosingJoinPointStaticPartVar();
@@ -211,14 +211,17 @@ public class BcelAdvice extends Advice {
                }
         
         // handle thisJoinPoint parameters
-        if ((extraParameterFlags & ThisJoinPoint) != 0) {
-               shadow.getThisJoinPointBcelVar().appendLoad(il, fact);
-        }
-        
+        // these need to be in that same order as parameters in 
+        // org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration
         if ((extraParameterFlags & ThisJoinPointStaticPart) != 0) {
                shadow.getThisJoinPointStaticPartBcelVar().appendLoad(il, fact);
         }
         
+        if ((extraParameterFlags & ThisJoinPoint) != 0) {
+               shadow.getThisJoinPointBcelVar().appendLoad(il, fact);
+        }
+        
+
         if ((extraParameterFlags & ThisEnclosingJoinPointStaticPart) != 0) {
                shadow.getThisEnclosingJoinPointStaticPartBcelVar().appendLoad(il, fact);
         }