diff options
author | avasseur <avasseur> | 2005-12-12 10:48:46 +0000 |
---|---|---|
committer | avasseur <avasseur> | 2005-12-12 10:48:46 +0000 |
commit | 979124d0fe6ac23df1dd5ee41838056bbaed6789 (patch) | |
tree | 6cd8cc92593f67ff29794a49bc35f68d9f25ffec /weaver | |
parent | 0c8c0a3d21365eade6f53a0484bba71f24637a65 (diff) | |
download | aspectj-979124d0fe6ac23df1dd5ee41838056bbaed6789.tar.gz aspectj-979124d0fe6ac23df1dd5ee41838056bbaed6789.zip |
#120351 cflowbelow @AJ and binding
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java | 12 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelShadow.java | 8 |
2 files changed, 11 insertions, 9 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index 728b6c128..f18506e25 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -595,14 +595,16 @@ public class BcelAdvice extends Advice { } } - public BcelVar[] getExposedStateAsBcelVars() { + public BcelVar[] getExposedStateAsBcelVars(boolean isAround) { // ATAJ aspect - // the closure instantiation has the same mapping as the extracted method from wich it is called - if (getConcreteAspect()!= null && getConcreteAspect().isAnnotationStyleAspect()) { - return BcelVar.NONE; + if (isAround) { + // the closure instantiation has the same mapping as the extracted method from wich it is called + if (getConcreteAspect()!= null && getConcreteAspect().isAnnotationStyleAspect()) { + return BcelVar.NONE; + } } - //System.out.println("vars: " + Arrays.asList(exposedState.vars)); + //System.out.println("vars: " + Arrays.asList(exposedState.vars)); if (exposedState == null) return BcelVar.NONE; int len = exposedState.vars.length; BcelVar[] ret = new BcelVar[len]; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java index 96fe92f4d..1e8312eb0 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java @@ -1894,7 +1894,7 @@ public class BcelShadow extends Shadow { new Type[] { }, Constants.INVOKESTATIC)); } else { - BcelVar[] cflowStateVars = munger.getExposedStateAsBcelVars(); + BcelVar[] cflowStateVars = munger.getExposedStateAsBcelVars(false); if (cflowStateVars.length == 0) { // This should be getting managed by a counter - lets make sure. @@ -1958,7 +1958,7 @@ public class BcelShadow extends Shadow { exitInstructions.append(Utility.createGet(fact, cflowField)); if (munger.getKind() != AdviceKind.PerCflowEntry && munger.getKind() != AdviceKind.PerCflowBelowEntry && - munger.getExposedStateAsBcelVars().length==0) { + munger.getExposedStateAsBcelVars(false).length==0) { exitInstructions .append( fact @@ -2342,7 +2342,7 @@ public class BcelShadow extends Shadow { // we have on stack all the arguments for the ADVICE call. // we have in frame somewhere all the arguments for the non-advice call. - BcelVar[] adviceVars = munger.getExposedStateAsBcelVars(); + BcelVar[] adviceVars = munger.getExposedStateAsBcelVars(true); IntMap proceedMap = makeProceedArgumentMap(adviceVars); // System.out.println(proceedMap + " for " + this); @@ -2587,7 +2587,7 @@ public class BcelShadow extends Shadow { 0, munger); - BcelVar[] adviceVars = munger.getExposedStateAsBcelVars(); + BcelVar[] adviceVars = munger.getExposedStateAsBcelVars(true); String closureClassName = NameMangler.makeClosureClassName( |