summaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2006-07-31 12:42:31 +0000
committeraclement <aclement>2006-07-31 12:42:31 +0000
commit4a6ccf0f0d8b8320f665dbdfe3f06c4ac4d242e2 (patch)
treeff491bf109595b5c5d1b8574c9f907e7e819b23f /weaver
parenteb31ec6c3d7016f7b57210f61c27daa54118c263 (diff)
downloadaspectj-4a6ccf0f0d8b8320f665dbdfe3f06c4ac4d242e2.tar.gz
aspectj-4a6ccf0f0d8b8320f665dbdfe3f06c4ac4d242e2.zip
trace!
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/World.java6
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java6
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java7
3 files changed, 17 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java
index 9070a470f..88a96a41b 100644
--- a/weaver/src/org/aspectj/weaver/World.java
+++ b/weaver/src/org/aspectj/weaver/World.java
@@ -1195,6 +1195,10 @@ public abstract class World implements Dump.INode {
public void setIncrementalCompileCouldFollow(boolean b) {incrementalCompileCouldFollow = b;}
public boolean couldIncrementalCompileFollow() {return incrementalCompileCouldFollow;}
- public void setSynchronizationPointcutsInUse() {synchronizationPointcutsInUse =true;}
+ public void setSynchronizationPointcutsInUse() {
+ if (trace.isTraceEnabled()) trace.enter("setSynchronizationPointcutsInUse", this);
+ synchronizationPointcutsInUse =true;
+ if (trace.isTraceEnabled()) trace.exit("setSynchronizationPointcutsInUse");
+ }
public boolean areSynchronizationPointcutsInUse() {return synchronizationPointcutsInUse;}
}
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
index 9425ce0b4..a7cece45e 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelClassWeaver.java
@@ -99,8 +99,12 @@ import org.aspectj.weaver.WeaverStateInfo;
import org.aspectj.weaver.World;
import org.aspectj.weaver.patterns.DeclareAnnotation;
import org.aspectj.weaver.patterns.ExactTypePattern;
+import org.aspectj.weaver.tools.Trace;
+import org.aspectj.weaver.tools.TraceFactory;
class BcelClassWeaver implements IClassWeaver {
+
+ private static Trace trace = TraceFactory.getTraceFactory().getTrace(BcelClassWeaver.class);
/**
* This is called from {@link BcelWeaver} to perform the per-class weaving process.
@@ -1453,6 +1457,7 @@ class BcelClassWeaver implements IClassWeaver {
* tidying up - there is some duplication that can be removed.
*/
public static void transformSynchronizedMethod(LazyMethodGen synchronizedMethod) {
+ if (trace.isTraceEnabled()) trace.enter("transformSynchronizedMethod",synchronizedMethod);
// System.err.println("DEBUG: Transforming synchronized method: "+synchronizedMethod.getName());
final InstructionFactory fact = synchronizedMethod.getEnclosingClass().getFactory();
InstructionList body = synchronizedMethod.getBody();
@@ -1862,6 +1867,7 @@ class BcelClassWeaver implements IClassWeaver {
// gonna have to go through and change all aload_0s to load the var from a variable,
// going to add a new variable for the this var
+ if (trace.isTraceEnabled()) trace.exit("transformSynchronizedMethod");
}
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
index d377cf509..9e678df76 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java
@@ -70,6 +70,7 @@ import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.WeaverMessages;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
+import org.aspectj.weaver.tools.Traceable;
/**
@@ -86,7 +87,7 @@ import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
* <p> We stay away from targeters for rangey things like Shadows and Exceptions.
*/
-public final class LazyMethodGen {
+public final class LazyMethodGen implements Traceable {
private static final int ACC_SYNTHETIC = 0x1000;
private int accessFlags;
@@ -1558,4 +1559,8 @@ public final class LazyMethodGen {
attributes = newAttributes;
}
+ public String toTraceString() {
+ return toShortString();
+ }
+
}