From 8c06443c1d14cee1b6b4596f6cf38a5fd2033fc6 Mon Sep 17 00:00:00 2001 From: aclement Date: Sat, 7 Nov 2009 22:20:43 +0000 Subject: [PATCH] slowly merging in optimizations --- weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java | 6 ++++-- .../org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java | 2 +- weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java index 6aa287a1d..5b97d8986 100644 --- a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java +++ b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java @@ -779,7 +779,8 @@ public class AtAjAttributes { // then iterate on field interface hierarchy (not object) boolean hasAtLeastOneMethod = false; - ResolvedMember[] methods = fieldType.getMethodsWithoutIterator(true, false).toArray(new ResolvedMember[0]); + ResolvedMember[] methods = fieldType.getMethodsWithoutIterator(true, false, false).toArray( + new ResolvedMember[0]); for (int i = 0; i < methods.length; i++) { ResolvedMember method = methods[i]; if (method.isAbstract()) { @@ -970,7 +971,8 @@ public class AtAjAttributes { ResolvedType typeForDelegation = (ResolvedType) iterator.next(); // TODO check for overlapping interfaces. Eg. A implements I, I extends J - if they specify interfaces={I,J} we dont // want to do any methods twice - ResolvedMember[] methods = typeForDelegation.getMethodsWithoutIterator(true, false).toArray(new ResolvedMember[0]); + ResolvedMember[] methods = typeForDelegation.getMethodsWithoutIterator(true, false, false).toArray( + new ResolvedMember[0]); for (int i = 0; i < methods.length; i++) { ResolvedMember method = methods[i]; if (method.isAbstract()) { diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java index cffdec821..32333c204 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java @@ -153,7 +153,7 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger { ResolvedType callee = m_aspectGen.getWorld().resolve(UnresolvedType.forName(invoke.getClassName(cpg))); // look in the whole method list and not just declared for super calls and alike - List methods = callee.getMethodsWithoutIterator(false, true); + List methods = callee.getMethodsWithoutIterator(false, true, false); for (Iterator iter = methods.iterator(); iter.hasNext();) { ResolvedMember resolvedMember = (ResolvedMember) iter.next(); if (invoke.getName(cpg).equals(resolvedMember.getName()) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index 40b274b00..8cc4121f8 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -210,7 +210,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { cont = enforceDecpRule1_abstractMethodsImplemented(weaver, munger.getSourceLocation(), newParentTarget, newParent); cont = enforceDecpRule2_cantExtendFinalClass(weaver, munger.getSourceLocation(), newParentTarget, newParent) && cont; - List methods = newParent.getMethodsWithoutIterator(false, true); + List methods = newParent.getMethodsWithoutIterator(false, true, false); for (Iterator iter = methods.iterator(); iter.hasNext();) { ResolvedMember superMethod = (ResolvedMember) iter.next(); if (!superMethod.getName().equals("")) { @@ -258,7 +258,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // classes // or // interfaces - List methods = newParent.getMethodsWithoutIterator(false, true); + List methods = newParent.getMethodsWithoutIterator(false, true, false); for (Iterator i = methods.iterator(); i.hasNext();) { ResolvedMember o = (ResolvedMember) i.next(); if (o.isAbstract() && !o.getName().startsWith("ajc$interField")) { // Ignore @@ -269,7 +269,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { // prefixed // methods ResolvedMember discoveredImpl = null; - List newParentTargetMethods = newParentTarget.getType().getMethodsWithoutIterator(false, true); + List newParentTargetMethods = newParentTarget.getType().getMethodsWithoutIterator(false, true, false); for (Iterator ii = newParentTargetMethods.iterator(); ii.hasNext() && discoveredImpl == null;) { ResolvedMember gen2 = (ResolvedMember) ii.next(); if (gen2.getName().equals(o.getName()) && !gen2.isAbstract()) { -- 2.39.5