aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2006-06-08 09:36:59 +0000
committeraclement <aclement>2006-06-08 09:36:59 +0000
commit6f1419826c990e919ff88e48d6a417fd973da06a (patch)
treed33ec5314c24eac7bc9de16009fd23813deeead7 /weaver
parent8d92b51c9c5a4038f57759c7024e9834896cf8c0 (diff)
downloadaspectj-6f1419826c990e919ff88e48d6a417fd973da06a.tar.gz
aspectj-6f1419826c990e919ff88e48d6a417fd973da06a.zip
synchronization joinpoints: code dump...
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/MemberImpl.java9
-rw-r--r--weaver/src/org/aspectj/weaver/asm/AjASMAttribute.java2
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java10
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/Pointcut.java9
4 files changed, 20 insertions, 10 deletions
diff --git a/weaver/src/org/aspectj/weaver/MemberImpl.java b/weaver/src/org/aspectj/weaver/MemberImpl.java
index 0f257f59a..14b7fde02 100644
--- a/weaver/src/org/aspectj/weaver/MemberImpl.java
+++ b/weaver/src/org/aspectj/weaver/MemberImpl.java
@@ -213,6 +213,15 @@ public class MemberImpl implements Comparable, AnnotatedElement,Member {
Object[] pair = signatureToTypes(signature,false);
return method(declaring, mods, (UnresolvedType) pair[0], name, (UnresolvedType[]) pair[1]);
}
+
+ public static MemberImpl monitorEnter() {
+ return new MemberImpl(MONITORENTER,UnresolvedType.OBJECT,Modifier.STATIC,ResolvedType.VOID,"<lock>",UnresolvedType.ARRAY_WITH_JUST_OBJECT);
+ }
+
+ public static MemberImpl monitorExit() {
+ return new MemberImpl(MONITOREXIT,UnresolvedType.OBJECT,Modifier.STATIC,ResolvedType.VOID,"<unlock>",UnresolvedType.ARRAY_WITH_JUST_OBJECT);
+ }
+
public static Member pointcut(UnresolvedType declaring, String name, String signature) {
Object[] pair = signatureToTypes(signature,false);
return pointcut(declaring, 0, (UnresolvedType) pair[0], name, (UnresolvedType[]) pair[1]);
diff --git a/weaver/src/org/aspectj/weaver/asm/AjASMAttribute.java b/weaver/src/org/aspectj/weaver/asm/AjASMAttribute.java
index 59903ca40..444ac9a10 100644
--- a/weaver/src/org/aspectj/weaver/asm/AjASMAttribute.java
+++ b/weaver/src/org/aspectj/weaver/asm/AjASMAttribute.java
@@ -57,7 +57,7 @@ class AjASMAttribute extends Attribute {
public AjAttribute unpack(AsmDelegate relatedDelegate) {
if (unpacked) throw new BCException("Don't unpack an attribute twice!");
- AjAttribute attr = AjAttribute.read(relatedDelegate.weaverVersion,type,data,relatedDelegate.getSourceContext(),relatedDelegate.getWorld().getMessageHandler());
+ AjAttribute attr = AjAttribute.read(relatedDelegate.weaverVersion,type,data,relatedDelegate.getSourceContext(),relatedDelegate.getWorld());
unpacked=true;
return attr;
}
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java b/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java
index 5487fbda5..5eb7eaaf8 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelAttributes.java
@@ -19,10 +19,10 @@ import java.util.List;
import org.aspectj.apache.bcel.classfile.Attribute;
import org.aspectj.apache.bcel.classfile.Unknown;
import org.aspectj.apache.bcel.generic.ConstantPoolGen;
-import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ISourceContext;
+import org.aspectj.weaver.World;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
@@ -35,7 +35,7 @@ class BcelAttributes {
* list contains the AspectJ attributes identified and unpacked to 'AjAttribute' objects.
*/
public static List readAjAttributes(String classname,Attribute[] as, ISourceContext context,
- IMessageHandler msgHandler,AjAttribute.WeaverVersionInfo version) {
+ World w,AjAttribute.WeaverVersionInfo version) {
List l = new ArrayList();
// first pass, look for version
@@ -48,7 +48,7 @@ class BcelAttributes {
if (name.charAt(0)=='o') { // 'o'rg.aspectj
if (name.startsWith(AjAttribute.AttributePrefix)) {
if (name.endsWith(WeaverVersionInfo.AttributeName)) {
- version = (AjAttribute.WeaverVersionInfo)AjAttribute.read(version,name,u.getBytes(),context,msgHandler);
+ version = (AjAttribute.WeaverVersionInfo)AjAttribute.read(version,name,u.getBytes(),context,w);
if (version.getMajorVersion() > WeaverVersionInfo.getCurrentWeaverMajorVersion()) {
throw new BCException("Unable to continue, this version of AspectJ supports classes built with weaver version "+
WeaverVersionInfo.toCurrentVersionString()+" but the class "+classname+" is version "+version.toString());
@@ -63,7 +63,7 @@ class BcelAttributes {
for (int i = forSecondPass.size()-1; i >= 0; i--) {
Unknown a = (Unknown)forSecondPass.get(i);
String name = a.getName();
- AjAttribute attr = AjAttribute.read(version,name,a.getBytes(),context,msgHandler);
+ AjAttribute attr = AjAttribute.read(version,name,a.getBytes(),context,w);
if (attr!=null) l.add(attr);
}
return l;
@@ -78,4 +78,4 @@ class BcelAttributes {
}
-}
+} \ No newline at end of file
diff --git a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
index a4af8a495..2f4e583ec 100644
--- a/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
+++ b/weaver/src/org/aspectj/weaver/patterns/Pointcut.java
@@ -313,10 +313,11 @@ public abstract class Pointcut extends PatternNode {
}
public void check(ISourceContext ctx,World world) {
- PoliceExtensionUse pointcutPolice = new PoliceExtensionUse(world,this);
- this.accept(pointcutPolice, null);
- if (pointcutPolice.synchronizationDesignatorEncountered())
- world.setSynchronizationPointcutsInUse();
+ // this is a quick visitor...
+ PoliceExtensionUse pointcutPolice = new PoliceExtensionUse(world,this);
+ this.accept(pointcutPolice, null);
+ if (pointcutPolice.synchronizationDesignatorEncountered())
+ world.setSynchronizationPointcutsInUse();
}