aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-05-18 21:59:03 +0000
committeraclement <aclement>2010-05-18 21:59:03 +0000
commitfcfdaf918a394323a94fece363f50e521a7fc049 (patch)
treec3c3e35ebb97aa9ec3d8cc453d64f23c145e658c
parent5982acfce0e2794845f47bc709961d990523c5ae (diff)
downloadaspectj-fcfdaf918a394323a94fece363f50e521a7fc049.tar.gz
aspectj-fcfdaf918a394323a94fece363f50e521a7fc049.zip
312839: WeaverStateInfo compression and move to signatures in 'aspectsAffectingType' rather than names
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java6
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java64
2 files changed, 34 insertions, 36 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 547f0ad7d..74e6d1c25 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -434,7 +434,7 @@ class BcelClassWeaver implements IClassWeaver {
if (typeMungerAffectedType) {
isChanged = true;
if (inReweavableMode || clazz.getType().isAspect()) {
- aspectsAffectingType.add(munger.getAspectType().getName());
+ aspectsAffectingType.add(munger.getAspectType().getSignature());
}
}
}
@@ -510,7 +510,7 @@ class BcelClassWeaver implements IClassWeaver {
if (typeMungerAffectedType) {
isChanged = true;
if (inReweavableMode || clazz.getType().isAspect()) {
- aspectsAffectingType.add(munger.getAspectType().getName());
+ aspectsAffectingType.add(munger.getAspectType().getSignature());
}
}
}
@@ -1512,7 +1512,7 @@ class BcelClassWeaver implements IClassWeaver {
if (munger instanceof BcelAdvice) {
BcelAdvice bcelAdvice = (BcelAdvice) munger;
if (bcelAdvice.getConcreteAspect() != null) {
- aspectsAffectingType.add(bcelAdvice.getConcreteAspect().getName());
+ aspectsAffectingType.add(bcelAdvice.getConcreteAspect().getSignature());
}
} else {
// It is a 'Checker' - we don't need to remember aspects
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index b44481621..a0edd7e22 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -1319,42 +1319,40 @@ public class BcelWeaver {
// are around!
world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.PROCESSING_REWEAVABLE, className, classType
.getSourceLocation().getSourceFile()), null, null);
- Set aspectsPreviouslyInWorld = wsi.getAspectsAffectingType();
- if (aspectsPreviouslyInWorld != null) {
- // keep track of them just to ensure unique missing aspect error
- // reporting
- Set<String> alreadyConfirmedReweavableState = new HashSet<String>();
- for (Iterator iter = aspectsPreviouslyInWorld.iterator(); iter.hasNext();) {
- String requiredTypeName = (String) iter.next();
- if (!alreadyConfirmedReweavableState.contains(requiredTypeName)) {
- ResolvedType rtx = world.resolve(UnresolvedType.forName(requiredTypeName), true);
- boolean exists = !rtx.isMissing();
- if (!exists) {
- world.getLint().missingAspectForReweaving.signal(new String[] { requiredTypeName, className },
- classType.getSourceLocation(), null);
- // world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.MISSING_REWEAVABLE_TYPE,
- // requiredTypeName, className), classType.getSourceLocation(), null);
+ Set<String> aspectsPreviouslyInWorld = wsi.getAspectsAffectingType();
+ // keep track of them just to ensure unique missing aspect error
+ // reporting
+ Set<String> alreadyConfirmedReweavableState = new HashSet<String>();
+ for (String requiredTypeSignature : aspectsPreviouslyInWorld) {
+ // for (Iterator iter = aspectsPreviouslyInWorld.iterator(); iter.hasNext();) {
+ // String requiredTypeName = (String) iter.next();
+ if (!alreadyConfirmedReweavableState.contains(requiredTypeSignature)) {
+ ResolvedType rtx = world.resolve(UnresolvedType.forSignature(requiredTypeSignature), true);
+ boolean exists = !rtx.isMissing();
+ if (!exists) {
+ world.getLint().missingAspectForReweaving.signal(new String[] { rtx.getName(), className }, classType
+ .getSourceLocation(), null);
+ // world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.MISSING_REWEAVABLE_TYPE,
+ // requiredTypeName, className), classType.getSourceLocation(), null);
+ } else {
+ if (world.isOverWeaving()) {
+ // System.out.println(">> Removing " + requiredTypeName + " from weaving process: "
+ // + xcutSet.deleteAspect(rtx));
} else {
- if (world.isOverWeaving()) {
- // System.out.println(">> Removing " + requiredTypeName + " from weaving process: "
- // + xcutSet.deleteAspect(rtx));
- } else {
- // weaved in aspect that are not declared in aop.xml
- // trigger an error for now
- // may cause headhache for LTW and packaged lib
- // without aop.xml in
- // see #104218
- if (!xcutSet.containsAspect(rtx)) {
- world.showMessage(IMessage.ERROR, WeaverMessages.format(
- WeaverMessages.REWEAVABLE_ASPECT_NOT_REGISTERED, requiredTypeName, className), null,
- null);
- } else if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) {
- world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.VERIFIED_REWEAVABLE_TYPE,
- requiredTypeName, rtx.getSourceLocation().getSourceFile()), null, null);
- }
+ // weaved in aspect that are not declared in aop.xml
+ // trigger an error for now
+ // may cause headhache for LTW and packaged lib
+ // without aop.xml in
+ // see #104218
+ if (!xcutSet.containsAspect(rtx)) {
+ world.showMessage(IMessage.ERROR, WeaverMessages.format(
+ WeaverMessages.REWEAVABLE_ASPECT_NOT_REGISTERED, rtx.getName(), className), null, null);
+ } else if (!world.getMessageHandler().isIgnoring(IMessage.INFO)) {
+ world.showMessage(IMessage.INFO, WeaverMessages.format(WeaverMessages.VERIFIED_REWEAVABLE_TYPE, rtx
+ .getName(), rtx.getSourceLocation().getSourceFile()), null, null);
}
- alreadyConfirmedReweavableState.add(requiredTypeName);
}
+ alreadyConfirmedReweavableState.add(requiredTypeSignature);
}
}
}