diff options
author | aclement <aclement> | 2006-05-10 11:19:05 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-10 11:19:05 +0000 |
commit | 2b6f28eaefef88f26aa7d089f7b50e3e5129a514 (patch) | |
tree | 908f455faea5b09b2746b6e5eacde6c78c9beeb5 | |
parent | 5220ac4b57132a268a3bb8cb962ee178339f798d (diff) | |
download | aspectj-2b6f28eaefef88f26aa7d089f7b50e3e5129a514.tar.gz aspectj-2b6f28eaefef88f26aa7d089f7b50e3e5129a514.zip |
134471 - incremental structure model repair code overhaul
-rw-r--r-- | asm/src/org/aspectj/asm/IRelationship.java | 2 | ||||
-rw-r--r-- | asm/src/org/aspectj/asm/internal/Relationship.java | 15 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/World.java | 5 |
3 files changed, 22 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/IRelationship.java b/asm/src/org/aspectj/asm/IRelationship.java index 7d901e0a9..508ce4892 100644 --- a/asm/src/org/aspectj/asm/IRelationship.java +++ b/asm/src/org/aspectj/asm/IRelationship.java @@ -83,4 +83,6 @@ public interface IRelationship extends Serializable { return ALL[ordinal]; } } + + public boolean isAffects(); } diff --git a/asm/src/org/aspectj/asm/internal/Relationship.java b/asm/src/org/aspectj/asm/internal/Relationship.java index 6cef5f3e7..e057d5057 100644 --- a/asm/src/org/aspectj/asm/internal/Relationship.java +++ b/asm/src/org/aspectj/asm/internal/Relationship.java @@ -76,5 +76,20 @@ public class Relationship implements IRelationship { public boolean hasRuntimeTest() { return hasRuntimeTest; } + + // For repairing the relationship map on incremental builds, we need + // to know the direction of the relationship: either 'affects' or 'affected by' + // this set are considered the 'affects' relationship. If we know which direction + // it is in, we know which ones should be removed when a particular resource + // is modified because the subsequent reweave will re-add it. + public boolean isAffects() { + // TODO should be a well defined set (enum type) with a flag for this... + return name.equals("advises") || + name.equals("declares on") || + name.equals("softens") || + name.equals("matched by") || + name.equals("declared on") || + name.equals("annotates"); + } } diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index 7f4263e38..90f7aa74c 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -55,6 +55,11 @@ public abstract class World implements Dump.INode { /** The heart of the world, a map from type signatures to resolved types */ protected TypeMap typeMap = new TypeMap(this); // Signature to ResolvedType + // See pr134471 - we would like to set this false but need for handles in the structure model + // to be independent of location before we can do that. + /** Should we take into account source location when comparing mungers - which may trigger full builds */ + public final static boolean compareLocations = true; + /** Calculator for working out aspect precedence */ private AspectPrecedenceCalculator precedenceCalculator; |