]> source.dussan.org Git - aspectj.git/commitdiff
implemented fastMatch method along with some basic tests of
authorjhugunin <jhugunin>
Wed, 12 Mar 2003 02:10:40 +0000 (02:10 +0000)
committerjhugunin <jhugunin>
Wed, 12 Mar 2003 02:10:40 +0000 (02:10 +0000)
weave performance with and without it

33 files changed:
org.aspectj.ajdt.core/testdata/src1/trace/HardTraceNothing.java [new file with mode: 0644]
org.aspectj.ajdt.core/testdata/src1/trace/ObviousTraceNothing.java [new file with mode: 0644]
org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/BcweaverJarMaker.java
weaver/src/org/aspectj/weaver/bcel/BcelWeaver.java
weaver/src/org/aspectj/weaver/patterns/AndPointcut.java
weaver/src/org/aspectj/weaver/patterns/ArgsPointcut.java
weaver/src/org/aspectj/weaver/patterns/CflowPointcut.java
weaver/src/org/aspectj/weaver/patterns/ConcreteCflowPointcut.java
weaver/src/org/aspectj/weaver/patterns/HandlerPointcut.java
weaver/src/org/aspectj/weaver/patterns/IfPointcut.java
weaver/src/org/aspectj/weaver/patterns/KindedPointcut.java
weaver/src/org/aspectj/weaver/patterns/NotPointcut.java
weaver/src/org/aspectj/weaver/patterns/OrPointcut.java
weaver/src/org/aspectj/weaver/patterns/PerCflow.java
weaver/src/org/aspectj/weaver/patterns/PerClause.java
weaver/src/org/aspectj/weaver/patterns/PerFromSuper.java
weaver/src/org/aspectj/weaver/patterns/PerObject.java
weaver/src/org/aspectj/weaver/patterns/PerSingleton.java
weaver/src/org/aspectj/weaver/patterns/Pointcut.java
weaver/src/org/aspectj/weaver/patterns/ReferencePointcut.java
weaver/src/org/aspectj/weaver/patterns/SignaturePattern.java
weaver/src/org/aspectj/weaver/patterns/ThisOrTargetPointcut.java
weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java
weaver/src/org/aspectj/weaver/patterns/WithinPointcut.java
weaver/src/org/aspectj/weaver/patterns/WithincodePointcut.java
weaver/testdata/aspectjtools.jar [deleted file]
weaver/testdata/dummyAspect.jar
weaver/testdata/megatrace.jar
weaver/testdata/megatrace0easy.jar [new file with mode: 0644]
weaver/testdata/megatrace0hard.jar [new file with mode: 0644]
weaver/testdata/megatraceNoweave.jar
weaver/testdata/tracing.jar
weaver/testsrc/org/aspectj/weaver/bcel/ZipTestCase.java

diff --git a/org.aspectj.ajdt.core/testdata/src1/trace/HardTraceNothing.java b/org.aspectj.ajdt.core/testdata/src1/trace/HardTraceNothing.java
new file mode 100644 (file)
index 0000000..6f6b8e1
--- /dev/null
@@ -0,0 +1,5 @@
+package trace;
+
+public aspect HardTraceNothing extends MegaTrace {
+       pointcut where(): call(public * frotz(..));
+}
\ No newline at end of file
diff --git a/org.aspectj.ajdt.core/testdata/src1/trace/ObviousTraceNothing.java b/org.aspectj.ajdt.core/testdata/src1/trace/ObviousTraceNothing.java
new file mode 100644 (file)
index 0000000..5b1af00
--- /dev/null
@@ -0,0 +1,7 @@
+package trace;
+
+public aspect ObviousTraceNothing extends MegaTrace {
+       pointcut where(): within(foo.bar..*);
+       
+       declare parents: foo.bar..* implements Marker;
+}
\ No newline at end of file
index f83ee7ed3a3ef80eecdaf1ebf7fa27b58bc78eb0..86bd3c227ed8625c2be37390327d85e3eb8077b1 100644 (file)
@@ -28,6 +28,10 @@ public class BcweaverJarMaker {
                makeJar1a();
                makeJar2();
                
+               makeJarObviousNothing();
+               makeJarHardNothing();
+               
+               
                makeTestJars();
        }
        
@@ -60,6 +64,35 @@ public class BcweaverJarMaker {
        }
        
        
+       public static void makeJarObviousNothing() throws IOException {
+               List args = new ArrayList();
+               args.add("-outjar");
+               args.add("../weaver/testdata/megatrace0easy.jar");
+
+               args.add("-classpath");
+               args.add("../runtime/bin");
+               
+               args.add("testdata/src1/trace/MegaTrace.java");
+               args.add("testdata/src1/trace/ObviousTraceNothing.java");
+               
+               CommandTestCase.runCompiler(args, CommandTestCase.NO_ERRORS);
+       }
+       
+       public static void makeJarHardNothing() throws IOException {
+               List args = new ArrayList();
+               args.add("-outjar");
+               args.add("../weaver/testdata/megatrace0hard.jar");
+
+               args.add("-classpath");
+               args.add("../runtime/bin");
+               
+               args.add("testdata/src1/trace/MegaTrace.java");
+               args.add("testdata/src1/trace/HardTraceNothing.java");
+               
+               CommandTestCase.runCompiler(args, CommandTestCase.NO_ERRORS);
+       }
+       
+       
        public static void makeJar1a() throws IOException {
                List args = new ArrayList();
                args.add("-outjar");
index 11f3f34052f4e5c50a1645ade923183aa6e0e5fa..bb6515a4020a9ef6323396a31db2dc5ac94a638b 100644 (file)
 
 package org.aspectj.weaver.bcel;
 
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipOutputStream;
+import java.io.*;
+import java.util.*;
+import java.util.zip.*;
 
 import org.apache.bcel.classfile.ClassParser;
 import org.apache.bcel.classfile.JavaClass;
 import org.aspectj.bridge.IMessage;
 import org.aspectj.util.FileUtil;
-import org.aspectj.weaver.ConcreteTypeMunger;
-import org.aspectj.weaver.CrosscuttingMembersSet;
-import org.aspectj.weaver.IWeaver;
-import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.TypeX;
+import org.aspectj.weaver.*;
+import org.aspectj.weaver.patterns.Pointcut;
 
 public class BcelWeaver implements IWeaver {
     private BcelWorld world;
@@ -327,8 +309,8 @@ public class BcelWeaver implements IWeaver {
                }
                
                JavaClass javaClass = classType.getJavaClass();
-               List shadowMungers = fastMatch(shadowMungerList, javaClass);
-               List typeMungers = fastMatch(classType.getResolvedTypeX().getInterTypeMungers(), javaClass);
+               List shadowMungers = fastMatch(shadowMungerList, classType.getResolvedTypeX());
+               List typeMungers = classType.getResolvedTypeX().getInterTypeMungers();
 
                LazyClassGen clazz = null;
                
@@ -406,26 +388,17 @@ public class BcelWeaver implements IWeaver {
                zipOutputStream.closeEntry();
        }
 
-       // ---- fast matching
-
-//     boolean fastMatch(JavaClass jc) {
-//             ConstantPool pool = jc.getConstantPool();
-//             for (int i=0, len=pool.getLength(); i < len; i++) {
-//                     Constant c = pool.getConstant(i);
-//                     if (c instanceof ConstantNameAndType) {
-//                             ConstantNameAndType nt = (ConstantNameAndType)c;
-//                             if (nt.getName(pool).equals("toShortString")) {
-//                                     //System.out.println("found in " + jc);
-//                                     return true;
-//                             }
-//                     }
-//             }
-//             return false;
-//     }
-
-       //XXX need to implement a real fast-match here
-       private List fastMatch(List list, JavaClass javaClass) {
+       private List fastMatch(List list, ResolvedTypeX type) {
                if (list == null) return Collections.EMPTY_LIST;
-               return list;
+
+               List result = new ArrayList();
+               Iterator iter = list.iterator();
+               while (iter.hasNext()) {
+                       ShadowMunger munger = (ShadowMunger)iter.next();
+                       if (munger.getPointcut().fastMatch(type).maybeTrue()) {
+                               result.add(munger);
+                       }
+               }
+               return result;
        }
 }
index f0e270d9bcf1a211d0d28206b5eeec1f3c46011a..352023def1de06cd1b9bc0cd9dde44f278f45137 100644 (file)
@@ -34,6 +34,10 @@ public class AndPointcut extends Pointcut {
                setLocation(left.getSourceContext(), left.getStart(), right.getEnd());
        }
 
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return left.fastMatch(type).and(right.fastMatch(type));
+       }
+
        public FuzzyBoolean match(Shadow shadow) {
                return left.match(shadow).and(right.match(shadow));
        }
index 3cfff4a6832ec3188797e7bd230294d35998f4f0..ce79c56084575d509ee7b2fb68139e09789e9258 100644 (file)
@@ -40,6 +40,10 @@ public class ArgsPointcut extends NameBindingPointcut {
        public ArgsPointcut(TypePatternList arguments) {
                this.arguments = arguments;
        }
+       
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
 
        public FuzzyBoolean match(Shadow shadow) {
                FuzzyBoolean ret =
index 5cc3eb4dfae9a7781ff59499d1384911661b2c05..68d9a4e886e0c88a952a1caae9723163f5971646 100644 (file)
@@ -59,6 +59,10 @@ public class CflowPointcut extends Pointcut {
                this.freeVars = freeVars;
        }
     
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+    
        public FuzzyBoolean match(Shadow shadow) {
                //??? this is not maximally efficient
                return FuzzyBoolean.MAYBE;
index e20a9a12a04740ad7eb5bc08df83229d7afcbccb..3354dbbbfe6289ac90f3362370ad45368d0a6891 100644 (file)
@@ -40,6 +40,10 @@ public class ConcreteCflowPointcut extends Pointcut {
                this.slots = slots;
        }
     
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+    
        public FuzzyBoolean match(Shadow shadow) {
                //??? this is not maximally efficient
                return FuzzyBoolean.MAYBE;
index 243205b7e4ad6e5bcac6574bec23a84ff2fd9354..258c8ac80cf39658583a70e390faa3636264095b 100644 (file)
@@ -38,6 +38,10 @@ public class HandlerPointcut extends Pointcut {
                this.exceptionType = exceptionType;
        }
 
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+       //??? should be able to do better by finding all referenced types in type
+               return FuzzyBoolean.MAYBE;
+       }
        
        public FuzzyBoolean match(Shadow shadow) {
                if (shadow.getKind() != Shadow.ExceptionHandler) return FuzzyBoolean.NO;
index 267e5e00cf35e85439955662eebf74ce6671220e..9fd8a73ec9145a360df4e86699b0089e2ab8898e 100644 (file)
@@ -49,6 +49,10 @@ public class IfPointcut extends Pointcut {
                this.testMethod = testMethod;
                this.extraParameterFlags = extraParameterFlags;
        }
+       
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
     
        public FuzzyBoolean match(Shadow shadow) {
                //??? this is not maximally efficient
index 1204c97a4245509ec7c882cd4e83ffe1b7c746fb..6fd2042578ced5f584b2cbc337614dd215139e47 100644 (file)
 
 package org.aspectj.weaver.patterns;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
+import java.io.*;
 
-import org.apache.bcel.classfile.JavaClass;
 import org.aspectj.util.FuzzyBoolean;
-import org.aspectj.weaver.ISourceContext;
-import org.aspectj.weaver.IntMap;
-import org.aspectj.weaver.ResolvedTypeX;
-import org.aspectj.weaver.Shadow;
+import org.aspectj.weaver.*;
 import org.aspectj.weaver.ast.Literal;
 import org.aspectj.weaver.ast.Test;
 
@@ -37,8 +31,9 @@ public class KindedPointcut extends Pointcut {
                this.signature = signature;
        }
        
-       public boolean fastMatch(JavaClass jc) { return true; }
-       
+    public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }       
        public FuzzyBoolean match(Shadow shadow) {
                if (shadow.getKind() != kind) return FuzzyBoolean.NO;
                
index 56ade77636a5610e9d2c18963d02364476711a38..d10eea34f69c6a390f42a28ba65b6b12b352f3fd 100644 (file)
@@ -31,20 +31,16 @@ public class NotPointcut extends Pointcut {
                this.body = left;
        }
 
-       /**
-        * Constructor NotPointcut.
-        * @param pointcut
-        * @param startPos
-        */
        public NotPointcut(Pointcut pointcut, int startPos) {
                this(pointcut);
                setLocation(pointcut.getSourceContext(), startPos, pointcut.getEnd());          
        }
 
 
-       /**
-        * @see org.aspectj.weaver.patterns.Pointcut#match(BcelShadow)
-        */
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return body.fastMatch(type).not();
+       }
+
        public FuzzyBoolean match(Shadow shadow) {
                return body.match(shadow).not();
        }
index a66d0e1e1835d2e3ea8fbf1c25a767568d7fb2e4..631ad666653397d3fbd7086fb576795a8fa32322 100644 (file)
@@ -26,9 +26,7 @@ import org.aspectj.weaver.ast.Test;
 
 public class OrPointcut extends Pointcut {
        private Pointcut left, right;
-       /**
-        * Constructor for AndPointcut.
-        */
+
        public OrPointcut(Pointcut left, Pointcut right) {
                super();
                this.left = left;
@@ -36,9 +34,11 @@ public class OrPointcut extends Pointcut {
                setLocation(left.getSourceContext(), left.getStart(), right.getEnd());
        }
 
-       /**
-        * @see org.aspectj.weaver.patterns.Pointcut#match(BcelShadow)
-        */
+
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return left.fastMatch(type).or(right.fastMatch(type));
+       }
+
        public FuzzyBoolean match(Shadow shadow) {
                return left.match(shadow).or(right.match(shadow));
        }
index 9af28b7eefa76937ac6fe62eba20a7002b4a57cd..fe815e3ba31a8a15c719f668144006bae9ff37d2 100644 (file)
@@ -47,6 +47,10 @@ public class PerCflow extends PerClause {
        
        // -----
        
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+       
     public FuzzyBoolean match(Shadow shadow) {
         return FuzzyBoolean.YES;
     }
index 7764b15cbeecdf3c0f5e4e744a319b826c50cbeb..b28e8fc24e7775fde36950b6d4fe0fa04663c3f6 100644 (file)
@@ -17,10 +17,7 @@ import java.io.DataInputStream;
 import java.io.IOException;
 
 import org.aspectj.util.TypeSafeEnum;
-import org.aspectj.weaver.BCException;
-import org.aspectj.weaver.ISourceContext;
-import org.aspectj.weaver.IntMap;
-import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.*;
 
 public abstract class PerClause extends Pointcut {
        protected ResolvedTypeX inAspect;
@@ -41,10 +38,8 @@ public abstract class PerClause extends Pointcut {
 
        public abstract PerClause concretize(ResolvedTypeX inAspect);
        
-       
        public abstract PerClause.Kind getKind();
        
-       
        public static class Kind extends TypeSafeEnum {
         public Kind(String name, int key) { super(name, key); }
         
index 0977d7c7ce7520638118a8e87565e7d261c3f3b1..4976d2f7fe58d38d213c0a4bd8c30ea96f98d097 100644 (file)
@@ -31,6 +31,10 @@ public class PerFromSuper extends PerClause {
                this.kind = kind;
        }
        
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               throw new RuntimeException("unimplemented");
+       }
+       
     public FuzzyBoolean match(Shadow shadow) {
         throw new RuntimeException("unimplemented");
     }
index d49536abe0da37a31df833c94e4e402917070386..de70b35e2922d5ed97efd6177cee3f76ab1837a5 100644 (file)
@@ -40,6 +40,10 @@ public class PerObject extends PerClause {
        }
        
        // -----
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+       
        
     public FuzzyBoolean match(Shadow shadow) {
        //System.err.println("matches " + this + " ? " + shadow + ", " + shadow.hasTarget());
index 553bc5a94d65e5bc5eae330f1aef07fae86808e5..6399b643017ee93088dcca1b69db4fca71b96000 100644 (file)
@@ -30,6 +30,10 @@ public class PerSingleton extends PerClause {
        public PerSingleton() {
        }
        
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.YES;
+       }
+       
     public FuzzyBoolean match(Shadow shadow) {
         return FuzzyBoolean.YES;
     }
index 4d1696ae637fcfddfa79acd2763d9da51c17039b..3cd0c9cf6a2a821d5fe71a672ac6c6684484488c 100644 (file)
@@ -61,9 +61,9 @@ public abstract class Pointcut extends PatternNode {
        
 
        /**
-        * Could I match any shadows in this JavaClass
+        * Could I match any shadows in the code defined within this type?
         */
-       public boolean fastMatch(JavaClass jc) { return true; }
+       public abstract FuzzyBoolean fastMatch(ResolvedTypeX type);
        
        /**
         * Do I really match this shadow?
@@ -195,6 +195,10 @@ public abstract class Pointcut extends PatternNode {
                        return Literal.FALSE; // can only get here if an earlier error occurred
                }
 
+               public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+                       return FuzzyBoolean.NO;
+               }
+               
                public FuzzyBoolean match(Shadow shadow) {
                        return FuzzyBoolean.NO;
                }
index 1a12423b25e728984f18c80a11eb2238fbaec74b..2d32917920151cacefa58eed57030d255390848b 100644 (file)
@@ -55,10 +55,11 @@ public class ReferencePointcut extends Pointcut {
                this.arguments = arguments;
        }
        
-       /**
-        * Could I match any shadows in this JavaClass
-        */
-       public boolean fastMatch(JavaClass jc) { return true; }
+
+       //??? do either of these match methods make any sense???
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
        
        /**
         * Do I really match this shadow?
index 28ffb33dcdaf9a078f449b397298248b26017a62..d6db93f10f3201ffb5bf5d31f7beba3538d9387d 100644 (file)
@@ -83,7 +83,7 @@ public class SignaturePattern extends PatternNode {
        
        public boolean matches(Member member, World world) {
                //XXX performance gains would come from matching on name before resolving
-               //    to fail fast
+               //    to fail fast              
                ResolvedMember sig = member.resolve(world);
                if (sig == null) {
                        //XXX
index 4b4e8076657b04afa1c4eb91c75b013b54e5c6c7..4fd791031a896dd3ebd5440f84308a9d5ac39c75 100644 (file)
@@ -50,6 +50,10 @@ public class ThisOrTargetPointcut extends NameBindingPointcut {
                this.type = type;
        }
        
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+       
        private boolean couldMatch(Shadow shadow) {
                return isThis ? shadow.hasThis() : shadow.hasTarget();
        }
index 45f1328754af2e802bd6426c15e11a8196e90abf..3b1da45ed97b179f3cf2275891f5630199185102 100644 (file)
@@ -39,7 +39,6 @@ public class WildTypePattern extends TypePattern {
        WildTypePattern(NamePattern[] namePatterns, boolean includeSubtypes, int dim) {
                super(includeSubtypes);
                this.namePatterns = namePatterns;
-               this.ellipsisCount = ellipsisCount;
                this.dim = dim;
                ellipsisCount = 0;
                for (int i=0; i<namePatterns.length; i++) {
index c3ddb5f191dbea98d7672c894acae6752795df20..f2f8addc60697cb8a9361f1d69ede949fc68bb95 100644 (file)
@@ -27,31 +27,34 @@ import org.aspectj.weaver.ast.Literal;
 import org.aspectj.weaver.ast.Test;
 
 public class WithinPointcut extends Pointcut {
-       TypePattern type;
+       TypePattern typePattern;
        
        public WithinPointcut(TypePattern type) {
-               this.type = type;
+               this.typePattern = type;
        }
-    
-       public FuzzyBoolean match(Shadow shadow) {
-               ResolvedTypeX enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType());
-               //System.err.println("enclosingType: " + enclosingType);
-//             if (shadow.getKind() == Shadow.FieldSet) {
-//                     System.err.println("within?" + type  + " matches " + enclosingType + " on " + shadow);
-//             }
-               
-               while (enclosingType != null) {
-                       if (type.matchesStatically(enclosingType)) {
+       
+       private FuzzyBoolean isWithinType(ResolvedTypeX type) {
+               while (type != null) {
+                       if (typePattern.matchesStatically(type)) {
                                return FuzzyBoolean.YES;
                        }
-                       enclosingType = enclosingType.getDeclaringType();
+                       type = type.getDeclaringType();
                }
                return FuzzyBoolean.NO;
        }
+       
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return isWithinType(type);
+       }
+    
+       public FuzzyBoolean match(Shadow shadow) {
+               ResolvedTypeX enclosingType = shadow.getIWorld().resolve(shadow.getEnclosingType());
+               return isWithinType(enclosingType);
+       }
 
        public void write(DataOutputStream s) throws IOException {
                s.writeByte(Pointcut.WITHIN);
-               type.write(s);
+               typePattern.write(s);
                writeLocation(s);
        }
        public static Pointcut read(DataInputStream s, ISourceContext context) throws IOException {
@@ -62,26 +65,26 @@ public class WithinPointcut extends Pointcut {
        }
 
        public void resolveBindings(IScope scope, Bindings bindings) {
-               type = type.resolveBindings(scope, bindings, false, false);
+               typePattern = typePattern.resolveBindings(scope, bindings, false, false);
        }
 
        public void postRead(ResolvedTypeX enclosingType) {
-               type.postRead(enclosingType);
+               typePattern.postRead(enclosingType);
        }
 
        public boolean equals(Object other) {
                if (!(other instanceof WithinPointcut)) return false;
                WithinPointcut o = (WithinPointcut)other;
-               return o.type.equals(this.type);
+               return o.typePattern.equals(this.typePattern);
        }
     public int hashCode() {
         int result = 43;
-        result = 37*result + type.hashCode();
+        result = 37*result + typePattern.hashCode();
         return result;
     }
 
        public String toString() {
-               return "within(" + type + ")";
+               return "within(" + typePattern + ")";
        }
 
        public Test findResidue(Shadow shadow, ExposedState state) {
index 2b01f961a0f38354cb064fa21a5c79254fbc0a52..d673c8ecb353a12f0268f2e146a5fa82965565dd 100644 (file)
@@ -32,6 +32,10 @@ public class WithincodePointcut extends Pointcut {
                this.signature = signature;
        }
     
+       public FuzzyBoolean fastMatch(ResolvedTypeX type) {
+               return FuzzyBoolean.MAYBE;
+       }
+    
        public FuzzyBoolean match(Shadow shadow) {
                //This will not match code in local or anonymous classes as if
                //they were withincode of the outer signature
diff --git a/weaver/testdata/aspectjtools.jar b/weaver/testdata/aspectjtools.jar
deleted file mode 100644 (file)
index b75dfa0..0000000
Binary files a/weaver/testdata/aspectjtools.jar and /dev/null differ
index 54b76f013f5bc1828c839fcb54e97f6f2f1105d2..fd37338f440f2102bff86a3c2938a2df5923d815 100644 (file)
Binary files a/weaver/testdata/dummyAspect.jar and b/weaver/testdata/dummyAspect.jar differ
index 8c0843c286c0775cc32f230506e0e01b46b42b87..13fde4cc1e561e88afa12ce3849d8b0227fda05c 100644 (file)
Binary files a/weaver/testdata/megatrace.jar and b/weaver/testdata/megatrace.jar differ
diff --git a/weaver/testdata/megatrace0easy.jar b/weaver/testdata/megatrace0easy.jar
new file mode 100644 (file)
index 0000000..4754944
Binary files /dev/null and b/weaver/testdata/megatrace0easy.jar differ
diff --git a/weaver/testdata/megatrace0hard.jar b/weaver/testdata/megatrace0hard.jar
new file mode 100644 (file)
index 0000000..70f8200
Binary files /dev/null and b/weaver/testdata/megatrace0hard.jar differ
index dba8efbff861bd7ae49f6b1e677e26061971471a..cb2a819f29019886a55621cdfead1f20a6bc896e 100644 (file)
Binary files a/weaver/testdata/megatraceNoweave.jar and b/weaver/testdata/megatraceNoweave.jar differ
index 18bf1b7597bd5dcaa44302e5bfab23e216cb432d..6e178f867caa4c24b4b93daf4a4d559711ef8110 100644 (file)
Binary files a/weaver/testdata/tracing.jar and b/weaver/testdata/tracing.jar differ
index c39dad22a70be93ee20a26b8e9db010c2308a26a..ecc961a750572b4a965b4d47c9870576b2626420 100644 (file)
@@ -51,6 +51,7 @@ public class ZipTestCase extends TestCase {
                                weaver.addLibraryJarFile(new File(aspectjar));
                        }
                }
+               weaver.addLibraryJarFile(new File("testdata/Regex.jar")); //???
                
                
                Collection woven = weaver.weave(outFile);
@@ -76,11 +77,24 @@ public class ZipTestCase extends TestCase {
                zipTest("testdata/Regex.jar", "testdata/megatraceNoweave.jar", true);
        }
 
-       // this is something we test every now and again.
+
        public void testBig() throws IOException {
                System.out.println("could take 4 seconds...");
                zipTest("../lib/bcel/bcel.jar", null);
        }
+       
+       
+       public void testBigWithEasyNoTrace() throws IOException {
+               System.out.println("could take 4 seconds...");
+               zipTest("../lib/bcel/bcel.jar", "testdata/megatrace0easy.jar");
+       }
+
+       // this is something we test every now and again.
+       public void xtestBigWithHardNoTrace() throws IOException {
+               System.out.println("could take 24 seconds...");
+               zipTest("../lib/bcel/bcel.jar", "testdata/megatrace0hard.jar");
+       }
+
 
        public void xtestBigWithAspects() throws IOException {
                System.out.println("could take 40 seconds...");