From ec805fb6009302ba6dd77c1e11f081f4238ae63a Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Nov 2009 16:06:52 +0000 Subject: [PATCH] demotion system only active for LTW by default --- org.aspectj.matcher/src/org/aspectj/weaver/World.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index 274b22e5e..b29c2f1cc 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -911,7 +911,7 @@ public abstract class World implements Dump.INode { private static boolean debug = false; - private boolean demotionSystemActive = true; + private boolean demotionSystemActive; private boolean debugDemotion = false; // Strategy for entries in the expendable map @@ -940,6 +940,7 @@ public abstract class World implements Dump.INode { private static Trace trace = TraceFactory.getTraceFactory().getTrace(World.TypeMap.class); TypeMap(World w) { + demotionSystemActive = w.isDemotionActive(); addedSinceLastDemote = new ArrayList(); this.w = w; memoryProfiling = false;// !w.getMessageHandler().isIgnoring(Message. @@ -1259,6 +1260,10 @@ public abstract class World implements Dump.INode { // --- with java5 we can get into a recursive mess if we aren't careful when // resolving types (*cough* java.lang.Enum) --- + public boolean isDemotionActive() { + return false; + } + // --- this first map is for java15 delegates which may try and recursively // access the same type variables. // --- I would rather stash this against a reference type - but we don't -- 2.39.5