From: jhugunin Date: Wed, 18 Dec 2002 18:23:38 +0000 (+0000) Subject: fixed order of thisJoinPoint and thisJoinPointStaticPart X-Git-Tag: V_1_1_b2~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8ff468dda46894084e0878fd9cf68c5798bbdfcf;p=aspectj.git fixed order of thisJoinPoint and thisJoinPointStaticPart --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index b3a42edf3..6c9e4055a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -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); }