aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorehilsdal <ehilsdal>2003-11-14 05:43:40 +0000
committerehilsdal <ehilsdal>2003-11-14 05:43:40 +0000
commitc796217f060ebf53e4561215307927e424e35358 (patch)
treeaf8a9f4f500ba0d3dbfb9ac6ec81ae6eceaec02c /weaver
parentfde423ac335eb547834bb6f1b0ec51ddfac51cd6 (diff)
downloadaspectj-c796217f060ebf53e4561215307927e424e35358.tar.gz
aspectj-c796217f060ebf53e4561215307927e424e35358.zip
minor pruning (semantics preserving)
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/AjAttribute.java2
-rw-r--r--weaver/src/org/aspectj/weaver/AjcMemberMaker.java1
-rw-r--r--weaver/src/org/aspectj/weaver/Member.java2
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java2
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelShadow.java28
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelVar.java7
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java2
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelWorld.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/PatternParser.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/ThrowsPattern.java2
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/TypePattern.java2
-rw-r--r--weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java2
12 files changed, 24 insertions, 30 deletions
diff --git a/weaver/src/org/aspectj/weaver/AjAttribute.java b/weaver/src/org/aspectj/weaver/AjAttribute.java
index 217f04280..417fa7ce5 100644
--- a/weaver/src/org/aspectj/weaver/AjAttribute.java
+++ b/weaver/src/org/aspectj/weaver/AjAttribute.java
@@ -130,7 +130,7 @@ public abstract class AjAttribute {
public String getNameString() {
return AttributeName;
}
- private ResolvedTypeMunger munger;
+ // private ResolvedTypeMunger munger;
public AjSynthetic() {}
public void write(DataOutputStream s) throws IOException {}
diff --git a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
index 308b020b9..d91d5f65c 100644
--- a/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
+++ b/weaver/src/org/aspectj/weaver/AjcMemberMaker.java
@@ -386,7 +386,6 @@ public class AjcMemberMaker {
//System.out.println("ret: " + ret + " mods: " + Modifier.toString(modifiers));
if (Modifier.isPublic(constructor.getModifiers()))
return ret;
- int i = 0;
while (true) {
ret = addCookieTo(ret, aspectType);
if (targetType.lookupMemberNoSupers(ret) == null)
diff --git a/weaver/src/org/aspectj/weaver/Member.java b/weaver/src/org/aspectj/weaver/Member.java
index 7e3b2474f..8eddb8b23 100644
--- a/weaver/src/org/aspectj/weaver/Member.java
+++ b/weaver/src/org/aspectj/weaver/Member.java
@@ -247,7 +247,7 @@ public class Member implements Comparable {
public static Member methodFromString(String str) {
str = str.trim();
- final int len = str.length();
+ // final int len = str.length();
int i = 0;
int mods = 0;
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 51308b4bb..fde2d9d0e 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -850,7 +850,7 @@ class BcelClassWeaver implements IClassWeaver {
if (i instanceof FieldInstruction) {
FieldInstruction fi = (FieldInstruction) i;
- if (i instanceof PUTFIELD || i instanceof PUTSTATIC) {
+ if (fi instanceof PUTFIELD || fi instanceof PUTSTATIC) {
// check for sets of constant fields. We first check the previous
// instruction. If the previous instruction is a LD_WHATEVER (push
// constant on the stack) then we must resolve the field to determine
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
index 9bc3b3fa3..6d45e96db 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
@@ -429,7 +429,7 @@ public class BcelShadow extends Shadow {
Member interfaceConstructorSignature)
{
InstructionList body = constructor.getBody();
- TypeX inType = constructor.getEnclosingClass().getType();
+ // TypeX inType = constructor.getEnclosingClass().getType();
BcelShadow s =
new BcelShadow(
world,
@@ -453,9 +453,9 @@ public class BcelShadow extends Shadow {
InstructionHandle next,
Member interfaceConstructorSignature)
{
- final InstructionFactory fact = constructor.getEnclosingClass().getFactory();
+ // final InstructionFactory fact = constructor.getEnclosingClass().getFactory();
InstructionList body = constructor.getBody();
- TypeX inType = constructor.getEnclosingClass().getType();
+ // TypeX inType = constructor.getEnclosingClass().getType();
BcelShadow s =
new BcelShadow(
world,
@@ -705,13 +705,13 @@ public class BcelShadow extends Shadow {
}
}
- // ---- type access methods
- private ObjectType getTargetBcelType() {
- return (ObjectType) BcelWorld.makeBcelType(getTargetType());
- }
- private Type getArgBcelType(int arg) {
- return BcelWorld.makeBcelType(getArgType(arg));
- }
+// // ---- type access methods
+// private ObjectType getTargetBcelType() {
+// return (ObjectType) BcelWorld.makeBcelType(getTargetType());
+// }
+// private Type getArgBcelType(int arg) {
+// return BcelWorld.makeBcelType(getArgType(arg));
+// }
// ---- kinding
@@ -766,7 +766,7 @@ public class BcelShadow extends Shadow {
// reflective thisJoinPoint support
private BcelVar thisJoinPointVar = null;
private BcelVar thisJoinPointStaticPartVar = null;
- private BcelVar thisEnclosingJoinPointStaticPartVar = null;
+ // private BcelVar thisEnclosingJoinPointStaticPartVar = null;
public final Var getThisJoinPointVar() {
return getThisJoinPointBcelVar();
@@ -948,7 +948,7 @@ public class BcelShadow extends Shadow {
* (Unless we have a void return type in which case there's nothing)
*/
public void weaveAfterReturning(BcelAdvice munger) {
- InstructionFactory fact = getFactory();
+ // InstructionFactory fact = getFactory();
List returns = new ArrayList();
Instruction ret = null;
for (InstructionHandle ih = range.getStart(); ih != range.getEnd(); ih = ih.getNext()) {
@@ -1354,7 +1354,7 @@ public class BcelShadow extends Shadow {
// we push a null for the unused closure. It's sad, but there it is.
InstructionList advice = new InstructionList();
- InstructionHandle adviceMethodInvocation;
+ // InstructionHandle adviceMethodInvocation;
{
for (Iterator i = argVarList.iterator(); i.hasNext(); ) {
BcelVar var = (BcelVar)i.next();
@@ -1366,7 +1366,7 @@ public class BcelShadow extends Shadow {
this,
null,
new InstructionList(InstructionConstants.ACONST_NULL)));
- adviceMethodInvocation =
+ // adviceMethodInvocation =
advice.append(
Utility.createInvoke(fact, localAdviceMethod)); //(fact, getWorld(), munger.getSignature()));
advice.append(
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelVar.java b/weaver/src/org/aspectj/weaver/bcel/BcelVar.java
index d2f1d35f3..dddd47a16 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelVar.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelVar.java
@@ -39,21 +39,18 @@ public class BcelVar extends Var {
public int getSlot() { return slot; }
+ // fact is used in the subtypes
public Instruction createLoad(InstructionFactory fact) {
- // TODO: remove fact
return InstructionFactory.createLoad(BcelWorld.makeBcelType(getType()), slot);
}
public Instruction createStore(InstructionFactory fact) {
- // TODO: remove fact
return InstructionFactory.createStore(BcelWorld.makeBcelType(getType()), slot);
}
public void appendStore(InstructionList il, InstructionFactory fact) {
- // TODO: remove fact
il.append(createStore(fact));
}
public void appendLoad(InstructionList il, InstructionFactory fact) {
- // TODO: remove fact
il.append(createLoad(fact));
}
public void appendLoadAndConvert(
@@ -64,11 +61,9 @@ public class BcelVar extends Var {
Utility.appendConversion(il, fact, getType(), toType);
}
public void insertLoad(InstructionList il, InstructionFactory fact) {
- // TODO: remove fact
il.insert(createLoad(fact));
}
public InstructionList createCopyFrom(InstructionFactory fact, int oldSlot) {
- // TODO: remove fact
InstructionList il = new InstructionList();
il.append(InstructionFactory.createLoad(BcelWorld.makeBcelType(getType()), oldSlot));
il.append(createStore(fact));
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
index 78ee0d576..3a83bf2c4 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
@@ -151,7 +151,7 @@ public class BcelWeaver implements IWeaver {
FileInputStream fis = new FileInputStream(files[i]);
byte[] bytes = FileUtil.readAsByteArray(fis);
- String relativePath = files[i].getPath();
+ // String relativePath = files[i].getPath();
// ASSERT: files[i].getAbsolutePath().startsWith(inFile.getAbsolutePath()
// or we are in trouble...
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
index a74e7918c..873b07818 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java
@@ -52,7 +52,7 @@ public class BcelWorld extends World {
private ClassPathManager classPath;
//private ClassPathManager aspectPath = null;
- private List aspectPathEntries;
+ // private List aspectPathEntries;
// ---- constructors
diff --git a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
index d2f9b9b0c..0f0bd3e57 100644
--- a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
+++ b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java
@@ -399,7 +399,7 @@ public class PatternParser {
private TypePattern parseAtomicTypePattern() {
if (maybeEat("!")) {
- int startPos = tokenSource.peek(-1).getStart();
+ //int startPos = tokenSource.peek(-1).getStart();
//??? we lose source location for true start of !type
TypePattern p = new NotTypePattern(parseAtomicTypePattern());
return p;
diff --git a/weaver/src/org/aspectj/weaver/patterns/ThrowsPattern.java b/weaver/src/org/aspectj/weaver/patterns/ThrowsPattern.java
index 5de0c16b7..113b90000 100644
--- a/weaver/src/org/aspectj/weaver/patterns/ThrowsPattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/ThrowsPattern.java
@@ -72,7 +72,7 @@ public class ThrowsPattern extends PatternNode {
//System.out.println("matching: " + this + " with " + Arrays.asList(tys));
ResolvedTypeX[] types = world.resolve(tys);
- int len = types.length;
+ // int len = types.length;
for (int j=0, lenj = required.size(); j < lenj; j++) {
if (! matchesAny(required.get(j), types)) {
return false;
diff --git a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
index 7568f75b0..6c58c5c6b 100644
--- a/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
+++ b/weaver/src/org/aspectj/weaver/patterns/TypePattern.java
@@ -91,7 +91,7 @@ public abstract class TypePattern extends PatternNode {
return true;
}
- FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
+ // FuzzyBoolean ret = FuzzyBoolean.NO; // ??? -eh
for (Iterator i = type.getDirectSupertypes(); i.hasNext(); ) {
ResolvedTypeX superType = (ResolvedTypeX)i.next();
if (matchesSubtypes(superType)) return true;
diff --git a/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java b/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
index c790b4dc7..e44ee1f72 100644
--- a/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
+++ b/weaver/testsrc/org/aspectj/weaver/bcel/MegaZipTestCase.java
@@ -44,7 +44,7 @@ public class MegaZipTestCase extends WeaveTestCase {
private BcelAdvice makeAroundMunger(final boolean matchOnlyPrintln) {
- BcelWorld world = new BcelWorld();
+ // BcelWorld world = new BcelWorld();
final Member sig =
Member.method(
TypeX.forName("fluffy.Aspect"),