From: aclement Date: Mon, 20 Feb 2006 17:28:17 +0000 (+0000) Subject: optimization: reset logic for primitives so they don't anchor a world instance in... X-Git-Tag: POST_MEMORY_CHANGES~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=113d5bd5cf3f380a3265521e40c3b10a61fbe7b5;p=aspectj.git optimization: reset logic for primitives so they don't anchor a world instance in static. --- diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java index 07eb8a926..0e78007f0 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedType.java +++ b/weaver/src/org/aspectj/weaver/ResolvedType.java @@ -778,6 +778,20 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl public static final Primitive BOOLEAN = new Primitive("Z", 1, 7); public static final Missing MISSING = new Missing(); + /** Reset the static state in the primitive types */ + public static void resetPrimitives() { + BYTE.world=null; + CHAR.world=null; + DOUBLE.world=null; + FLOAT.world=null; + INT.world=null; + LONG.world=null; + SHORT.world=null; + VOID.world=null; + BOOLEAN.world=null; + } + + // ---- types public static ResolvedType makeArray(ResolvedType type, int dim) { if (dim == 0) return type; diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index ca0aa26e9..27df42c2a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -542,6 +542,7 @@ public class BcelWorld extends World implements Repository { // At end of compile, close any open files so deletion of those archives is possible classPath.closeArchives(); typeMap.report(); + ResolvedType.resetPrimitives(); }