issue_id
int64
2.04k
425k
title
stringlengths
9
251
body
stringlengths
4
32.8k
status
stringclasses
6 values
after_fix_sha
stringlengths
7
7
project_name
stringclasses
6 values
repo_url
stringclasses
6 values
repo_name
stringclasses
6 values
language
stringclasses
1 value
issue_url
null
before_fix_sha
null
pull_url
null
commit_datetime
timestamp[us, tz=UTC]
report_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
23
187
chunk_content
stringlengths
1
22k
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} public ResolvedType[] fromEclipse(ReferenceBinding[] bindings) { if (bindings == null) { return ResolvedType.NONE; } int len = bindings.length; ResolvedType[] ret = new ResolvedType[len]; for (int i = 0; i < len; i++) { ret[i] = fromEclipse(bindings[i]); } return ret; } public static String getName(TypeBinding binding) { if (binding instanceof TypeVariableBinding) { TypeVariableBinding tvb = (TypeVariableBinding) binding; if (tvb.firstBound != null) { return getName(tvb.firstBound); } else { return getName(tvb.superclass); } } if (binding instanceof ReferenceBinding) { return new String(CharOperation.concatWith(((ReferenceBinding) binding).compoundName, '.')); } String packageName = new String(binding.qualifiedPackageName()); String className = new String(binding.qualifiedSourceName()).replace('.', '$'); if (packageName.length() > 0) { className = packageName + "." + className; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return new String(className); } /** * Some generics notes: * * Andy 6-May-05 We were having trouble with parameterized types in a couple of places - due to TypeVariableBindings. When we * see a TypeVariableBinding now we default to either the firstBound if it is specified or java.lang.Object. Not sure when/if * this gets us unstuck? It does mean we forget that it is a type variable when going back the other way from the UnresolvedType * and that would seem a bad thing - but I've yet to see the reason we need to remember the type variable. Adrian 10-July-05 * When we forget it's a type variable we come unstuck when getting the declared members of a parameterized type - since we * don't know it's a type variable we can't replace it with the type parameter. */ public UnresolvedType fromBinding(TypeBinding binding) { if (binding instanceof HelperInterfaceBinding) { return ((HelperInterfaceBinding) binding).getTypeX(); } if (binding == null || binding.qualifiedSourceName() == null) { return ResolvedType.MISSING; } if (binding instanceof TypeVariableBinding) { TypeVariableBinding tb = (TypeVariableBinding) binding; UnresolvedTypeVariableReferenceType utvrt = (UnresolvedTypeVariableReferenceType) fromTypeVariableBinding(tb); return utvrt; } if (binding instanceof ArrayBinding) { ArrayBinding aBinding = (ArrayBinding) binding;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
UnresolvedType componentType = fromBinding(aBinding.leafComponentType); return UnresolvedType.makeArray(componentType, aBinding.dimensions); } if (binding instanceof WildcardBinding) { WildcardBinding eWB = (WildcardBinding) binding; UnresolvedType theBound = null; if (eWB.bound instanceof TypeVariableBinding) { theBound = fromTypeVariableBinding((TypeVariableBinding) eWB.bound); } else { theBound = fromBinding(eWB.bound); } WildcardedUnresolvedType theType = (WildcardedUnresolvedType) TypeFactory.createTypeFromSignature(CharOperation .charToString(eWB.genericTypeSignature())); return theType; } if (binding instanceof ParameterizedTypeBinding) { if (binding instanceof RawTypeBinding) { return UnresolvedType.forRawTypeName(getName(binding)); } ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) binding;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
UnresolvedType[] arguments = null; if (ptb.arguments != null) { arguments = new UnresolvedType[ptb.arguments.length]; for (int i = 0; i < arguments.length; i++) { arguments[i] = fromBinding(ptb.arguments[i]); } } String baseTypeSignature = null; ResolvedType baseType = getWorld().resolve(UnresolvedType.forName(getName(binding)), true); if (!baseType.isMissing()) { baseTypeSignature = baseType.getErasureSignature(); } else { baseTypeSignature = UnresolvedType.forName(getName(binding)).getSignature(); } if (arguments == null) { arguments = new UnresolvedType[0]; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return TypeFactory.createUnresolvedParameterizedType(baseTypeSignature, arguments); } if (binding.isGenericType() && !binding.isParameterizedType() && !binding.isRawType()) { TypeVariableBinding[] tvbs = binding.typeVariables(); TypeVariable[] tVars = new TypeVariable[tvbs.length]; for (int i = 0; i < tvbs.length; i++) { TypeVariableBinding eclipseV = tvbs[i]; tVars[i] = ((TypeVariableReference) fromTypeVariableBinding(eclipseV)).getTypeVariable(); } if (!(binding instanceof SourceTypeBinding)) { throw new RuntimeException("Cant get the generic sig for " + binding.debugName()); } return UnresolvedType.forGenericType(getName(binding), tVars, CharOperation.charToString(((SourceTypeBinding) binding).genericSignature())); } if (binding instanceof LocalTypeBinding) { LocalTypeBinding ltb = (LocalTypeBinding) binding; if (ltb.constantPoolName() != null && ltb.constantPoolName().length > 0) { return UnresolvedType.forSignature(new String(binding.signature())); } else {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return UnresolvedType.forSignature(new String(ltb.enclosingType.signature())); } } UnresolvedType ut = UnresolvedType.forSignature(new String(binding.signature())); return ut; } /** * Some type variables refer to themselves recursively, this enables us to avoid recursion problems. */ private static Map typeVariableBindingsInProgress = new HashMap(); /** * Convert from the eclipse form of type variable (TypeVariableBinding) to the AspectJ form (TypeVariable). */ private UnresolvedType fromTypeVariableBinding(TypeVariableBinding aTypeVariableBinding) { if (typeVariableBindingsInProgress.containsKey(aTypeVariableBinding)) { return (UnresolvedType) typeVariableBindingsInProgress.get(aTypeVariableBinding); } if (typeVariablesForAliasRecovery != null) { String aliasname = (String) typeVariablesForAliasRecovery.get(aTypeVariableBinding); if (aliasname != null) { UnresolvedTypeVariableReferenceType ret = new UnresolvedTypeVariableReferenceType(); ret.setTypeVariable(new TypeVariable(aliasname)); return ret; } } if (typeVariablesForThisMember.containsKey(new String(aTypeVariableBinding.sourceName))) { return (UnresolvedType) typeVariablesForThisMember.get(new String(aTypeVariableBinding.sourceName));
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} String name = CharOperation.charToString(aTypeVariableBinding.sourceName()); UnresolvedTypeVariableReferenceType ret = new UnresolvedTypeVariableReferenceType(); typeVariableBindingsInProgress.put(aTypeVariableBinding, ret); TypeVariable tv = new TypeVariable(name); ret.setTypeVariable(tv); UnresolvedType superclassType = fromBinding(aTypeVariableBinding.superclass()); UnresolvedType[] superinterfaces = null; if (aTypeVariableBinding == null || aTypeVariableBinding.superInterfaces == null) { superinterfaces = UnresolvedType.NONE; } else { superinterfaces = new UnresolvedType[aTypeVariableBinding.superInterfaces.length]; for (int i = 0; i < superinterfaces.length; i++) { superinterfaces[i] = fromBinding(aTypeVariableBinding.superInterfaces[i]); } } tv.setSuperclass(superclassType); tv.setAdditionalInterfaceBounds(superinterfaces); tv.setRank(aTypeVariableBinding.rank); if (aTypeVariableBinding.declaringElement instanceof MethodBinding) { tv.setDeclaringElementKind(TypeVariable.METHOD); } else { tv.setDeclaringElementKind(TypeVariable.TYPE); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
if (aTypeVariableBinding.declaringElement instanceof MethodBinding) { typeVariablesForThisMember.put(new String(aTypeVariableBinding.sourceName), ret); } typeVariableBindingsInProgress.remove(aTypeVariableBinding); return ret; } public UnresolvedType[] fromBindings(TypeBinding[] bindings) { if (bindings == null) { return UnresolvedType.NONE; } int len = bindings.length; UnresolvedType[] ret = new UnresolvedType[len]; for (int i = 0; i < len; i++) { ret[i] = fromBinding(bindings[i]); } return ret; } public static ASTNode astForLocation(IHasPosition location) { return new EmptyStatement(location.getStart(), location.getEnd()); } public List<DeclareParents> getDeclareParents() { return getWorld().getDeclareParents(); } public List<DeclareAnnotation> getDeclareAnnotationOnTypes() { return getWorld().getDeclareAnnotationOnTypes(); } public List<DeclareAnnotation> getDeclareAnnotationOnFields() { return getWorld().getDeclareAnnotationOnFields(); } public List<DeclareAnnotation> getDeclareAnnotationOnMethods() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return getWorld().getDeclareAnnotationOnMethods(); } public boolean areTypeMungersFinished() { return finishedTypeMungers != null; } public void finishTypeMungers() { List<ConcreteTypeMunger> ret = new ArrayList<ConcreteTypeMunger>(); List<ConcreteTypeMunger> baseTypeMungers = getWorld().getCrosscuttingMembersSet().getTypeMungers(); debug_mungerCount = baseTypeMungers.size(); for (ConcreteTypeMunger munger : baseTypeMungers) { EclipseTypeMunger etm = makeEclipseTypeMunger(munger); if (etm != null) { if (munger.getMunger().getKind() == ResolvedTypeMunger.InnerClass) { ret.add(0, etm); } else { ret.add(etm); } } } finishedTypeMungers = ret; } public EclipseTypeMunger makeEclipseTypeMunger(ConcreteTypeMunger concrete) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
if (concrete.getMunger() != null && EclipseTypeMunger.supportsKind(concrete.getMunger().getKind())) { AbstractMethodDeclaration method = null; if (concrete instanceof EclipseTypeMunger) { method = ((EclipseTypeMunger) concrete).getSourceMethod(); } EclipseTypeMunger ret = new EclipseTypeMunger(this, concrete.getMunger(), concrete.getAspectType(), method); if (ret.getSourceLocation() == null) { ret.setSourceLocation(concrete.getSourceLocation()); } return ret; } else { return null; } } public List<ConcreteTypeMunger> getTypeMungers() { return finishedTypeMungers; } public ResolvedMemberImpl makeResolvedMember(MethodBinding binding) { return makeResolvedMember(binding, binding.declaringClass); } public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, Shadow.Kind shadowKind) { MemberKind memberKind = binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD; if (shadowKind == Shadow.AdviceExecution) { memberKind = Member.ADVICE; } return makeResolvedMember(binding, binding.declaringClass, memberKind); } /**
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
* Conversion from a methodbinding (eclipse) to a resolvedmember (aspectj) is now done in the scope of some type variables. * Before converting the parts of a methodbinding (params, return type) we store the type variables in this structure, then * should any component of the method binding refer to them, we grab them from the map. */ private final Map typeVariablesForThisMember = new HashMap(); /** * This is a map from typevariablebindings (eclipsey things) to the names the user originally specified in their ITD. For * example if the target is 'interface I<N extends Number> {}' and the ITD was 'public void I<X>.m(List<X> lxs) {}' then this * map would contain a pointer from the eclipse type 'N extends Number' to the letter 'X'. */ private Map typeVariablesForAliasRecovery; /** * Construct a resolvedmember from a methodbinding. The supplied map tells us about any typevariablebindings that replaced * typevariables whilst the compiler was resolving types - this only happens if it is a generic itd that shares type variables * with its target type. */ public ResolvedMemberImpl makeResolvedMemberForITD(MethodBinding binding, TypeBinding declaringType, Map /* * TypeVariableBinding > * original alias name */recoveryAliases) { ResolvedMemberImpl result = null; try { typeVariablesForAliasRecovery = recoveryAliases; result = makeResolvedMember(binding, declaringType); } finally { typeVariablesForAliasRecovery = null; } return result; } public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, TypeBinding declaringType) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return makeResolvedMember(binding, declaringType, binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD); } public ResolvedMemberImpl makeResolvedMember(MethodBinding binding, TypeBinding declaringType, MemberKind memberKind) { UnresolvedType[] ajTypeRefs = null; typeVariablesForThisMember.clear(); if (binding.typeVariables != null) { ajTypeRefs = new UnresolvedType[binding.typeVariables.length]; for (int i = 0; i < binding.typeVariables.length; i++) { ajTypeRefs[i] = fromBinding(binding.typeVariables[i]); typeVariablesForThisMember.put(new String(binding.typeVariables[i].sourceName),/* * new * Integer(binding.typeVariables[ * i].rank), */ajTypeRefs[i]); } } ResolvedType realDeclaringType = world.resolve(fromBinding(declaringType)); if (realDeclaringType.isRawType()) { realDeclaringType = realDeclaringType.getGenericType(); } ResolvedMemberImpl ret = new EclipseResolvedMember(binding, memberKind, realDeclaringType, binding.modifiers, fromBinding(binding.returnType), new String(binding.selector), fromBindings(binding.parameters), fromBindings(binding.thrownExceptions), this); if (binding.isVarargs()) { ret.setVarargsMethod(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
if (ajTypeRefs != null) { TypeVariable[] tVars = new TypeVariable[ajTypeRefs.length]; for (int i = 0; i < ajTypeRefs.length; i++) { tVars[i] = ((TypeVariableReference) ajTypeRefs[i]).getTypeVariable(); } ret.setTypeVariables(tVars); } typeVariablesForThisMember.clear(); ret.resolve(world); return ret; } public ResolvedMember makeResolvedMember(FieldBinding binding) { return makeResolvedMember(binding, binding.declaringClass); } public ResolvedMember makeResolvedMember(FieldBinding binding, TypeBinding receiverType) { ResolvedType realDeclaringType = world.resolve(fromBinding(receiverType)); if (realDeclaringType.isRawType()) { realDeclaringType = realDeclaringType.getGenericType(); } ResolvedMemberImpl ret = new EclipseResolvedMember(binding, Member.FIELD, realDeclaringType, binding.modifiers, world.resolve(fromBinding(binding.type)), new String(binding.name), UnresolvedType.NONE); return ret; } public TypeBinding makeTypeBinding(UnresolvedType typeX) { TypeBinding ret = null; if (!typeX.isTypeVariableReference() && !isParameterizedWithTypeVariables(typeX)) { if (typeX.isRawType()) { ret = (TypeBinding) rawTypeXToBinding.get(typeX);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} else { ret = (TypeBinding) typexToBinding.get(typeX); } } if (ret == null) { ret = makeTypeBinding1(typeX); if (ret != null) { if (!(typeX instanceof BoundedReferenceType) && !(typeX instanceof UnresolvedTypeVariableReferenceType)) { if (typeX.isRawType()) { rawTypeXToBinding.put(typeX, ret); } else { typexToBinding.put(typeX, ret); } } } } return ret; } private boolean isParameterizedWithTypeVariables(UnresolvedType typeX) { if (!typeX.isParameterizedType()) { return false; } UnresolvedType[] typeArguments = typeX.getTypeParameters(); if (typeArguments != null) { for (int i = 0; i < typeArguments.length; i++) { if (typeArguments[i].isTypeVariableReference()) { return true; } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} return false; } private ReferenceBinding baseTypeForParameterizedType; private int indexOfTypeParameterBeingConverted; private TypeBinding makeTypeBinding1(UnresolvedType typeX) { if (typeX.isPrimitiveType()) { if (typeX.equals(UnresolvedType.BOOLEAN)) { return TypeBinding.BOOLEAN; } if (typeX.equals(UnresolvedType.BYTE)) { return TypeBinding.BYTE; } if (typeX.equals(UnresolvedType.CHAR)) { return TypeBinding.CHAR; } if (typeX.equals(UnresolvedType.DOUBLE)) { return TypeBinding.DOUBLE; } if (typeX.equals(UnresolvedType.FLOAT)) { return TypeBinding.FLOAT; } if (typeX.equals(UnresolvedType.INT)) { return TypeBinding.INT; } if (typeX.equals(UnresolvedType.LONG)) { return TypeBinding.LONG; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
if (typeX.equals(UnresolvedType.SHORT)) { return TypeBinding.SHORT; } if (typeX.equals(UnresolvedType.VOID)) { return TypeBinding.VOID; } throw new RuntimeException("weird primitive type " + typeX); } else if (typeX.isArray()) { int dim = 0; while (typeX.isArray()) { dim++; typeX = typeX.getComponentType(); } return lookupEnvironment.createArrayType(makeTypeBinding(typeX), dim); } else if (typeX.isParameterizedType()) { UnresolvedType[] typeParameters = typeX.getTypeParameters(); ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName()); TypeBinding[] argumentBindings = new TypeBinding[typeParameters.length]; baseTypeForParameterizedType = baseTypeBinding; for (int i = 0; i < argumentBindings.length; i++) { indexOfTypeParameterBeingConverted = i; argumentBindings[i] = makeTypeBinding(typeParameters[i]); } indexOfTypeParameterBeingConverted = 0; baseTypeForParameterizedType = null; ParameterizedTypeBinding ptb = lookupEnvironment.createParameterizedType(baseTypeBinding, argumentBindings, baseTypeBinding.enclosingType()); return ptb; } else if (typeX.isTypeVariableReference()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return makeTypeVariableBindingFromAJTypeVariable(((TypeVariableReference) typeX).getTypeVariable()); } else if (typeX.isRawType()) { ReferenceBinding baseTypeBinding = lookupBinding(typeX.getBaseName()); RawTypeBinding rtb = lookupEnvironment.createRawType(baseTypeBinding, baseTypeBinding.enclosingType()); return rtb; } else if (typeX.isGenericWildcard()) { if (typeX instanceof WildcardedUnresolvedType) { WildcardedUnresolvedType wut = (WildcardedUnresolvedType) typeX; int boundkind = Wildcard.UNBOUND; TypeBinding bound = null; if (wut.isExtends()) { boundkind = Wildcard.EXTENDS; bound = makeTypeBinding(wut.getUpperBound()); } else if (wut.isSuper()) { boundkind = Wildcard.SUPER; bound = makeTypeBinding(wut.getLowerBound()); } TypeBinding[] otherBounds = null; WildcardBinding wb = lookupEnvironment.createWildcard(baseTypeForParameterizedType, indexOfTypeParameterBeingConverted, bound, otherBounds, boundkind); return wb; } else if (typeX instanceof BoundedReferenceType) { BoundedReferenceType brt = (BoundedReferenceType) typeX; int boundkind = Wildcard.UNBOUND;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
TypeBinding bound = null; if (brt.isExtends()) { boundkind = Wildcard.EXTENDS; bound = makeTypeBinding(brt.getUpperBound()); } else if (brt.isSuper()) { boundkind = Wildcard.SUPER; bound = makeTypeBinding(brt.getLowerBound()); } TypeBinding[] otherBounds = null; if (brt.getAdditionalBounds() != null && brt.getAdditionalBounds().length != 0) { otherBounds = makeTypeBindings(brt.getAdditionalBounds()); } WildcardBinding wb = lookupEnvironment.createWildcard(baseTypeForParameterizedType, indexOfTypeParameterBeingConverted, bound, otherBounds, boundkind); return wb; } else { throw new BCException("This type " + typeX + " (class " + typeX.getClass().getName() + ") should not be claiming to be a wildcard!"); } } else { return lookupBinding(typeX.getName()); } } private ReferenceBinding lookupBinding(String sname) { char[][] name = CharOperation.splitOn('.', sname.toCharArray()); ReferenceBinding rb = lookupEnvironment.getType(name); if (rb == null && !sname.equals(UnresolvedType.MISSING_NAME)) { return new ProblemReferenceBinding(name, null, ProblemReasons.NotFound); } return rb;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} public TypeBinding[] makeTypeBindings(UnresolvedType[] types) { int len = types.length; TypeBinding[] ret = new TypeBinding[len]; for (int i = 0; i < len; i++) { ret[i] = makeTypeBinding(types[i]); } return ret; } private ReferenceBinding[] makeReferenceBindings(UnresolvedType[] types) { int len = types.length; ReferenceBinding[] ret = new ReferenceBinding[len]; for (int i = 0; i < len; i++) { ret[i] = (ReferenceBinding) makeTypeBinding(types[i]); } return ret; } public FieldBinding makeFieldBinding(NewFieldTypeMunger nftm) { return internalMakeFieldBinding(nftm.getSignature(), nftm.getTypeVariableAliases()); } /** * Convert a resolvedmember into an eclipse field binding */ public FieldBinding makeFieldBinding(ResolvedMember member, List aliases) { return internalMakeFieldBinding(member, aliases); } /** * Convert a resolvedmember into an eclipse field binding
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
*/ public FieldBinding makeFieldBinding(ResolvedMember member) { return internalMakeFieldBinding(member, null); } /** * Build a new Eclipse SyntheticFieldBinding for an AspectJ ResolvedMember. */ public SyntheticFieldBinding createSyntheticFieldBinding(SourceTypeBinding owningType, ResolvedMember member) { SyntheticFieldBinding sfb = new SyntheticFieldBinding(member.getName().toCharArray(), makeTypeBinding(member.getReturnType()), member.getModifiers() | Flags.AccSynthetic, owningType, Constant.NotAConstant, -1); owningType.addSyntheticField(sfb); return sfb; } /** * Take a normal AJ member and convert it into an eclipse fieldBinding. Taking into account any aliases that it may include due * to being a generic itd. Any aliases are put into the typeVariableToBinding map so that they will be substituted as * appropriate in the returned fieldbinding. */ public FieldBinding internalMakeFieldBinding(ResolvedMember member, List aliases) { typeVariableToTypeBinding.clear(); ReferenceBinding declaringType = (ReferenceBinding) makeTypeBinding(member.getDeclaringType()); if (aliases != null && aliases.size() > 0 && declaringType.typeVariables() != null && declaringType.typeVariables().length != 0) { int i = 0;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
for (Iterator iter = aliases.iterator(); iter.hasNext();) { String element = (String) iter.next(); typeVariableToTypeBinding.put(element, declaringType.typeVariables()[i++]); } } currentType = declaringType; FieldBinding fb = null; if (member.getName().startsWith(NameMangler.PREFIX)) { fb = new SyntheticFieldBinding(member.getName().toCharArray(), makeTypeBinding(member.getReturnType()), member.getModifiers() | Flags.AccSynthetic, currentType, Constant.NotAConstant, -1); } else { fb = new FieldBinding(member.getName().toCharArray(), makeTypeBinding(member.getReturnType()), member.getModifiers(), currentType, Constant.NotAConstant); } typeVariableToTypeBinding.clear(); currentType = null; if (member.getName().startsWith(NameMangler.PREFIX)) { fb.modifiers |= Flags.AccSynthetic; } return fb; } private ReferenceBinding currentType = null; public MethodBinding makeMethodBinding(NewMethodTypeMunger nmtm) { return internalMakeMethodBinding(nmtm.getSignature(), nmtm.getTypeVariableAliases()); } /** * Convert a resolvedmember into an eclipse method binding. */ public MethodBinding makeMethodBinding(ResolvedMember member, List aliases) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return internalMakeMethodBinding(member, aliases); } /** * Creates a method binding for a resolvedmember taking into account type variable aliases - this variant can take an * aliasTargetType and should be used when the alias target type cannot be retrieved from the resolvedmember. */ public MethodBinding makeMethodBinding(ResolvedMember member, List aliases, UnresolvedType aliasTargetType) { return internalMakeMethodBinding(member, aliases, aliasTargetType); } /** * Convert a resolvedmember into an eclipse method binding. */ public MethodBinding makeMethodBinding(ResolvedMember member) { return internalMakeMethodBinding(member, null); } public MethodBinding internalMakeMethodBinding(ResolvedMember member, List aliases) { return internalMakeMethodBinding(member, aliases, member.getDeclaringType()); } /** * Take a normal AJ member and convert it into an eclipse methodBinding. Taking into account any aliases that it may include due * to being a generic ITD. Any aliases are put into the typeVariableToBinding map so that they will be substituted as * appropriate in the returned methodbinding */ public MethodBinding internalMakeMethodBinding(ResolvedMember member, List aliases, UnresolvedType aliasTargetType) { typeVariableToTypeBinding.clear(); TypeVariableBinding[] tvbs = null; if (member.getTypeVariables() != null) { if (member.getTypeVariables().length == 0) { tvbs = Binding.NO_TYPE_VARIABLES; } else {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
tvbs = makeTypeVariableBindingsFromAJTypeVariables(member.getTypeVariables()); } } ReferenceBinding declaringType = (ReferenceBinding) makeTypeBinding(member.getDeclaringType()); if (aliases != null && aliases.size() != 0 && declaringType.typeVariables() != null && declaringType.typeVariables().length != 0) { int i = 0; ReferenceBinding aliasTarget = (ReferenceBinding) makeTypeBinding(aliasTargetType); if (aliasTarget.isRawType()) { aliasTarget = ((RawTypeBinding) aliasTarget).genericType(); } for (Iterator iter = aliases.iterator(); iter.hasNext();) { String element = (String) iter.next(); typeVariableToTypeBinding.put(element, aliasTarget.typeVariables()[i++]); } } currentType = declaringType; MethodBinding mb = new MethodBinding(member.getModifiers(), member.getName().toCharArray(), makeTypeBinding(member.getReturnType()), makeTypeBindings(member.getParameterTypes()), makeReferenceBindings(member.getExceptions()), declaringType); if (tvbs != null) { mb.typeVariables = tvbs; } typeVariableToTypeBinding.clear(); currentType = null; if (NameMangler.isSyntheticMethod(member.getName(), true)) { mb.modifiers |= Flags.AccSynthetic; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
return mb; } /** * Convert a bunch of type variables in one go, from AspectJ form to Eclipse form. */ private TypeVariableBinding[] makeTypeVariableBindingsFromAJTypeVariables(TypeVariable[] typeVariables) { int len = typeVariables.length; TypeVariableBinding[] ret = new TypeVariableBinding[len]; for (int i = 0; i < len; i++) { ret[i] = makeTypeVariableBindingFromAJTypeVariable(typeVariables[i]); } return ret; } private final Map typeVariableToTypeBinding = new HashMap();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
private TypeVariableBinding makeTypeVariableBindingFromAJTypeVariable(TypeVariable tv) { TypeVariableBinding tvBinding = (TypeVariableBinding) typeVariableToTypeBinding.get(tv.getName()); if (currentType != null) { TypeVariableBinding tvb = currentType.getTypeVariable(tv.getName().toCharArray()); if (tvb != null) { return tvb; } } if (tvBinding == null) { Binding declaringElement = null; tvBinding = new TypeVariableBinding(tv.getName().toCharArray(), declaringElement, tv.getRank(),this.lookupEnvironment); typeVariableToTypeBinding.put(tv.getName(), tvBinding); if (tv.getSuperclass() != null && (!tv.getSuperclass().getSignature().equals("Ljava/lang/Object;") || tv.getSuperInterfaces() != null)) { tvBinding.superclass = (ReferenceBinding) makeTypeBinding(tv.getSuperclass()); } tvBinding.firstBound = makeTypeBinding(tv.getFirstBound()); if (tv.getSuperInterfaces() == null) { tvBinding.superInterfaces = TypeVariableBinding.NO_SUPERINTERFACES;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} else { TypeBinding tbs[] = makeTypeBindings(tv.getSuperInterfaces()); ReferenceBinding[] rbs = new ReferenceBinding[tbs.length]; for (int i = 0; i < tbs.length; i++) { rbs[i] = (ReferenceBinding) tbs[i]; } tvBinding.superInterfaces = rbs; } } return tvBinding; } public MethodBinding makeMethodBindingForCall(Member member) { return new MethodBinding(member.getModifiers() & ~Modifier.INTERFACE, member.getName().toCharArray(), makeTypeBinding(member.getReturnType()), makeTypeBindings(member.getParameterTypes()), new ReferenceBinding[0], (ReferenceBinding) makeTypeBinding(member.getDeclaringType())); } public void finishedCompilationUnit(CompilationUnitDeclaration unit) { if ((buildManager != null) && buildManager.doGenerateModel()) { AjBuildManager.getAsmHierarchyBuilder().buildStructureForCompilationUnit(unit, buildManager.getStructureModel(), buildManager.buildConfig); } } public void addTypeBinding(TypeBinding binding) { typexToBinding.put(fromBinding(binding), binding); } public void addTypeBindingAndStoreInWorld(TypeBinding binding) { UnresolvedType ut = fromBinding(binding); typexToBinding.put(ut, binding); world.lookupOrCreateName(ut); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
public Shadow makeShadow(ASTNode location, ReferenceContext context) { return EclipseShadow.makeShadow(this, location, context); } public Shadow makeShadow(ReferenceContext context) { return EclipseShadow.makeShadow(this, (ASTNode) context, context); } public void addSourceTypeBinding(SourceTypeBinding binding, CompilationUnitDeclaration unit) { TypeDeclaration decl = binding.scope.referenceContext; UnresolvedType simpleTx = null; if (binding.isGenericType()) { simpleTx = UnresolvedType.forRawTypeName(getName(binding)); } else if (binding.isLocalType()) { LocalTypeBinding ltb = (LocalTypeBinding) binding; if (ltb.constantPoolName() != null && ltb.constantPoolName().length > 0) { simpleTx = UnresolvedType.forSignature(new String(binding.signature())); } else { simpleTx = UnresolvedType.forName(getName(binding)); } } else { simpleTx = UnresolvedType.forName(getName(binding)); } ReferenceType name = getWorld().lookupOrCreateName(simpleTx); if (!binding.isRawType() && !binding.isGenericType() && name.getTypekind() == TypeKind.RAW) { name.demoteToSimpleType();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
} EclipseSourceType t = new EclipseSourceType(name, this, binding, decl, unit); if (binding.isGenericType()) { UnresolvedType complexTx = fromBinding(binding); ResolvedType cName = world.resolve(complexTx, true); ReferenceType complexName = null; if (!cName.isMissing()) { complexName = (ReferenceType) cName; complexName = (ReferenceType) complexName.getGenericType(); if (complexName == null) { complexName = new ReferenceType(complexTx, world); } } else { complexName = new ReferenceType(complexTx, world); } name.setGenericType(complexName); complexName.setDelegate(t); } name.setDelegate(t); if (decl instanceof AspectDeclaration) { ((AspectDeclaration) decl).typeX = name; ((AspectDeclaration) decl).concreteName = t; } ReferenceBinding[] memberTypes = binding.memberTypes; for (int i = 0, length = memberTypes.length; i < length; i++) { addSourceTypeBinding((SourceTypeBinding) memberTypes[i], unit); } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
public boolean isXSerializableAspects() { return xSerializableAspects; } public ResolvedMember fromBinding(MethodBinding binding) { return new ResolvedMemberImpl(Member.METHOD, fromBinding(binding.declaringClass), binding.modifiers, fromBinding(binding.returnType), CharOperation.charToString(binding.selector), fromBindings(binding.parameters)); } public TypeVariableDeclaringElement fromBinding(Binding declaringElement) { if (declaringElement instanceof TypeBinding) { return fromBinding(((TypeBinding) declaringElement)); } else { return fromBinding((MethodBinding) declaringElement); } } public void cleanup() { this.typexToBinding.clear(); this.rawTypeXToBinding.clear(); this.finishedTypeMungers = null; } public void minicleanup() { this.typexToBinding.clear(); this.rawTypeXToBinding.clear(); } public int getItdVersion() { return world.getItdVersion(); } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
/* ******************************************************************* * Copyright (c) 2002 Contributors * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * Andy Clement - June 2005 - separated out from ResolvedType * ******************************************************************/ package org.aspectj.weaver; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.patterns.Declare; import org.aspectj.weaver.patterns.PerClause; /** * A reference type represents some 'real' type, not a primitive, not an array - but a real type, for example java.util.List. Each * ReferenceType has a delegate that is the underlying artifact - either an eclipse artifact or a bcel artifact. If the type * represents a raw type (i.e. there is a generic form) then the genericType field is set to point to the generic type. If it is for * a parameterized type then the generic type is also set to point to the generic form. */ public class ReferenceType extends ResolvedType {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
public static final ReferenceType[] EMPTY_ARRAY = new ReferenceType[0]; /** * For generic types, this list holds references to all the derived raw and parameterized versions. We need this so that if the * generic delegate is swapped during incremental compilation, the delegate of the derivatives is swapped also. */ private final Set<ReferenceType> derivativeTypes = new HashSet<ReferenceType>(); /** * For parameterized types (or the raw type) - this field points to the actual reference type from which they are derived. */ ReferenceType genericType = null; ReferenceTypeDelegate delegate = null; int startPos = 0; int endPos = 0; ResolvedMember[] parameterizedMethods = null; ResolvedMember[] parameterizedFields = null; ResolvedMember[] parameterizedPointcuts = null;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
WeakReference<ResolvedType[]> parameterizedInterfaces = new WeakReference<ResolvedType[]>(null); Collection<Declare> parameterizedDeclares = null; private ResolvedType[] annotationTypes = null; private AnnotationAJ[] annotations = null; private ResolvedType newSuperclass; private ResolvedType[] newInterfaces; public ReferenceType(String signature, World world) { super(signature, world); } public ReferenceType(String signature, String signatureErasure, World world) { super(signature, signatureErasure, world); } public static ReferenceType fromTypeX(UnresolvedType tx, World world) { ReferenceType rt = new ReferenceType(tx.getErasureSignature(), world); rt.typeKind = tx.typeKind; return rt; } /** * Constructor used when creating a parameterized type. */ public ReferenceType(ResolvedType theGenericType, ResolvedType[] theParameters, World aWorld) { super(makeParameterizedSignature(theGenericType, theParameters), theGenericType.signatureErasure, aWorld);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
ReferenceType genericReferenceType = (ReferenceType) theGenericType; this.typeParameters = theParameters; this.genericType = genericReferenceType; this.typeKind = TypeKind.PARAMETERIZED; this.delegate = genericReferenceType.getDelegate(); genericReferenceType.addDependentType(this); } /** * Constructor used when creating a raw type. */ synchronized void addDependentType(ReferenceType dependent) { this.derivativeTypes.add(dependent); } @Override public String getSignatureForAttribute() { if (genericType == null || typeParameters == null) { return getSignature();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} return makeDeclaredSignature(genericType, typeParameters); } /** * Create a reference type for a generic type */ public ReferenceType(UnresolvedType genericType, World world) { super(genericType.getSignature(), world); typeKind = TypeKind.GENERIC; } @Override public boolean isClass() { return getDelegate().isClass(); } @Override public int getCompilerVersion() { return getDelegate().getCompilerVersion(); } @Override public boolean isGenericType() { return !isParameterizedType() && !isRawType() && getDelegate().isGeneric(); } public String getGenericSignature() { String sig = getDelegate().getDeclaredGenericSignature(); return (sig == null) ? "" : sig; } @Override public AnnotationAJ[] getAnnotations() { return getDelegate().getAnnotations(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@Override public void addAnnotation(AnnotationAJ annotationX) { if (annotations == null) { annotations = new AnnotationAJ[1]; annotations[0] = annotationX; } else { AnnotationAJ[] newAnnotations = new AnnotationAJ[annotations.length + 1]; System.arraycopy(annotations, 0, newAnnotations, 1, annotations.length); newAnnotations[0] = annotationX; annotations = newAnnotations; } addAnnotationType(annotationX.getType()); } public boolean hasAnnotation(UnresolvedType ofType) { boolean onDelegate = getDelegate().hasAnnotation(ofType); if (onDelegate) { return true; } if (annotationTypes != null) { for (int i = 0; i < annotationTypes.length; i++) { if (annotationTypes[i].equals(ofType)) { return true; } } } return false; } private void addAnnotationType(ResolvedType ofType) { if (annotationTypes == null) { annotationTypes = new ResolvedType[1];
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
annotationTypes[0] = ofType; } else { ResolvedType[] newAnnotationTypes = new ResolvedType[annotationTypes.length + 1]; System.arraycopy(annotationTypes, 0, newAnnotationTypes, 1, annotationTypes.length); newAnnotationTypes[0] = ofType; annotationTypes = newAnnotationTypes; } } @Override public ResolvedType[] getAnnotationTypes() { if (getDelegate() == null) { throw new BCException("Unexpected null delegate for type " + this.getName()); } if (annotationTypes == null) { return getDelegate().getAnnotationTypes(); } else { ResolvedType[] delegateAnnotationTypes = getDelegate().getAnnotationTypes(); ResolvedType[] result = new ResolvedType[annotationTypes.length + delegateAnnotationTypes.length]; System.arraycopy(delegateAnnotationTypes, 0, result, 0, delegateAnnotationTypes.length); System.arraycopy(annotationTypes, 0, result, delegateAnnotationTypes.length, annotationTypes.length); return result; } } @Override public String getNameAsIdentifier() { return getRawName().replace('.', '_'); } @Override public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
AnnotationAJ[] axs = getDelegate().getAnnotations(); if (axs != null) { for (int i = 0; i < axs.length; i++) { if (axs[i].getTypeSignature().equals(ofType.getSignature())) { return axs[i]; } } } if (annotations != null) { String searchSig = ofType.getSignature(); for (int i = 0; i < annotations.length; i++) { if (annotations[i].getTypeSignature().equals(searchSig)) { return annotations[i]; } } } return null; } @Override public boolean isAspect() { return getDelegate().isAspect(); } @Override public boolean isAnnotationStyleAspect() { return getDelegate().isAnnotationStyleAspect(); } @Override public boolean isEnum() { return getDelegate().isEnum(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@Override public boolean isAnnotation() { return getDelegate().isAnnotation(); } @Override public boolean isAnonymous() { return getDelegate().isAnonymous(); } @Override public boolean isNested() { return getDelegate().isNested(); } public ResolvedType getOuterClass() { return getDelegate().getOuterClass(); } public String getRetentionPolicy() { return getDelegate().getRetentionPolicy(); } @Override public boolean isAnnotationWithRuntimeRetention() { return getDelegate().isAnnotationWithRuntimeRetention(); } @Override public boolean canAnnotationTargetType() { return getDelegate().canAnnotationTargetType(); } @Override public AnnotationTargetKind[] getAnnotationTargetKinds() { return getDelegate().getAnnotationTargetKinds(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@Override public boolean isCoerceableFrom(ResolvedType o) { ResolvedType other = o.resolve(world); if (this.isAssignableFrom(other) || other.isAssignableFrom(this)) { return true; } if (this.isParameterizedType() && other.isParameterizedType()) { return isCoerceableFromParameterizedType(other); } if (this.isParameterizedType() && other.isRawType()) { return ((ReferenceType) this.getRawType()).isCoerceableFrom(other.getGenericType()); } if (this.isRawType() && other.isParameterizedType()) { return this.getGenericType().isCoerceableFrom((other.getRawType())); } if (!this.isInterface() && !other.isInterface()) { return false; } if (this.isFinal() || other.isFinal()) { return false; } ResolvedMember[] a = getDeclaredMethods(); ResolvedMember[] b = other.getDeclaredMethods(); for (int ai = 0, alen = a.length; ai < alen; ai++) { for (int bi = 0, blen = b.length; bi < blen; bi++) { if (!b[bi].isCompatibleWith(a[ai])) { return false;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} } } return true; } private final boolean isCoerceableFromParameterizedType(ResolvedType other) { if (!other.isParameterizedType()) { return false; } ResolvedType myRawType = getRawType(); ResolvedType theirRawType = other.getRawType(); if (myRawType == theirRawType || myRawType.isCoerceableFrom(theirRawType)) { if (getTypeParameters().length == other.getTypeParameters().length) { ResolvedType[] myTypeParameters = getResolvedTypeParameters(); ResolvedType[] theirTypeParameters = other.getResolvedTypeParameters(); for (int i = 0; i < myTypeParameters.length; i++) { if (myTypeParameters[i] != theirTypeParameters[i]) { if (myTypeParameters[i].isGenericWildcard()) { BoundedReferenceType wildcard = (BoundedReferenceType) myTypeParameters[i]; if (!wildcard.canBeCoercedTo(theirTypeParameters[i])) { return false; } } else if (myTypeParameters[i].isTypeVariableReference()) { TypeVariableReferenceType tvrt = (TypeVariableReferenceType) myTypeParameters[i]; TypeVariable tv = tvrt.getTypeVariable(); tv.resolve(world); if (!tv.canBeBoundTo(theirTypeParameters[i])) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
return false; } } else if (theirTypeParameters[i].isTypeVariableReference()) { TypeVariableReferenceType tvrt = (TypeVariableReferenceType) theirTypeParameters[i]; TypeVariable tv = tvrt.getTypeVariable(); tv.resolve(world); if (!tv.canBeBoundTo(myTypeParameters[i])) { return false; } } else if (theirTypeParameters[i].isGenericWildcard()) { BoundedReferenceType wildcard = (BoundedReferenceType) theirTypeParameters[i]; if (!wildcard.canBeCoercedTo(myTypeParameters[i])) { return false; } } else { return false; } } } return true; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} return false; } @Override public boolean isAssignableFrom(ResolvedType other) { return isAssignableFrom(other, false); } @Override public boolean isAssignableFrom(ResolvedType other, boolean allowMissing) { if (other.isPrimitiveType()) { if (!world.isInJava5Mode()) { return false; } if (ResolvedType.validBoxing.contains(this.getSignature() + other.getSignature())) { return true; } } if (this == other) { return true; } if (this.getSignature().equals("Ljava/lang/Object;")) { return true; } if (!isTypeVariableReference() && other.getSignature().equals("Ljava/lang/Object;")) { return false; } boolean thisRaw = this.isRawType(); if (thisRaw && other.isParameterizedOrGenericType()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
return isAssignableFrom(other.getRawType()); } boolean thisGeneric = this.isGenericType(); if (thisGeneric && other.isParameterizedOrRawType()) { return isAssignableFrom(other.getGenericType()); } if (this.isParameterizedType()) { if (((ReferenceType) this.getRawType()).isAssignableFrom(other)) { boolean wildcardsAllTheWay = true; ResolvedType[] myParameters = this.getResolvedTypeParameters(); for (int i = 0; i < myParameters.length; i++) { if (!myParameters[i].isGenericWildcard()) { wildcardsAllTheWay = false; } else { BoundedReferenceType boundedRT = (BoundedReferenceType) myParameters[i]; if (boundedRT.isExtends() || boundedRT.isSuper()) { wildcardsAllTheWay = false; } } } if (wildcardsAllTheWay && !other.isParameterizedType()) { return true; } ResolvedType[] theirParameters = other.getResolvedTypeParameters(); boolean parametersAssignable = true; if (myParameters.length == theirParameters.length) { for (int i = 0; i < myParameters.length && parametersAssignable; i++) { if (myParameters[i] == theirParameters[i]) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
continue; } ResolvedType mp = myParameters[i]; ResolvedType tp = theirParameters[i]; if (mp.isParameterizedType() && tp.isParameterizedType()) { if (mp.getGenericType().equals(tp.getGenericType())) { UnresolvedType[] mtps = mp.getTypeParameters(); UnresolvedType[] ttps = tp.getTypeParameters(); for (int ii = 0; ii < mtps.length; ii++) { if (mtps[ii].isTypeVariableReference() && ttps[ii].isTypeVariableReference()) { TypeVariable mtv = ((TypeVariableReferenceType) mtps[ii]).getTypeVariable(); boolean b = mtv.canBeBoundTo((ResolvedType) ttps[ii]); if (!b) { parametersAssignable = false; break; } } else { parametersAssignable = false; break; } } continue; } else { parametersAssignable = false; break; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} if (myParameters[i].isTypeVariableReference() && theirParameters[i].isTypeVariableReference()) { TypeVariable myTV = ((TypeVariableReferenceType) myParameters[i]).getTypeVariable(); boolean b = myTV.canBeBoundTo(theirParameters[i]); if (!b) { parametersAssignable = false; break; } else { continue; } } if (!myParameters[i].isGenericWildcard()) { parametersAssignable = false; break; } else { BoundedReferenceType wildcardType = (BoundedReferenceType) myParameters[i]; if (!wildcardType.alwaysMatches(theirParameters[i])) { parametersAssignable = false; break; } } } } else { parametersAssignable = false; } if (parametersAssignable) { return true; } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} if (isTypeVariableReference() && !other.isTypeVariableReference()) { TypeVariable aVar = ((TypeVariableReference) this).getTypeVariable(); return aVar.resolve(world).canBeBoundTo(other); } if (other.isTypeVariableReference()) { TypeVariableReferenceType otherType = (TypeVariableReferenceType) other; if (this instanceof TypeVariableReference) { return ((TypeVariableReference) this).getTypeVariable().resolve(world) .canBeBoundTo(otherType.getTypeVariable().getFirstBound().resolve(world)); } else { return this.isAssignableFrom(otherType.getTypeVariable().getFirstBound().resolve(world)); } } if (allowMissing && other.isMissing()) { return false; } ResolvedType[] interfaces = other.getDeclaredInterfaces(); for (ResolvedType intface : interfaces) { boolean b; if (thisRaw && intface.isParameterizedOrGenericType()) { b = this.isAssignableFrom(intface.getRawType(), allowMissing); } else { b = this.isAssignableFrom(intface, allowMissing); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
if (b) { return true; } } ResolvedType superclass = other.getSuperclass(); if (superclass != null) { boolean b; if (thisRaw && superclass.isParameterizedOrGenericType()) { b = this.isAssignableFrom(superclass.getRawType(), allowMissing); } else { b = this.isAssignableFrom(superclass, allowMissing); } if (b) { return true; } } return false; } @Override public ISourceContext getSourceContext() { return getDelegate().getSourceContext(); } @Override public ISourceLocation getSourceLocation() { ISourceContext isc = getDelegate().getSourceContext(); return isc.makeSourceLocation(new Position(startPos, endPos)); } @Override public boolean isExposedToWeaver() { return (getDelegate() == null) || delegate.isExposedToWeaver();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} @Override public WeaverStateInfo getWeaverState() { return getDelegate().getWeaverState(); } @Override public ResolvedMember[] getDeclaredFields() { if (parameterizedFields != null) { return parameterizedFields; } if (isParameterizedType() || isRawType()) { ResolvedMember[] delegateFields = getDelegate().getDeclaredFields(); parameterizedFields = new ResolvedMember[delegateFields.length]; for (int i = 0; i < delegateFields.length; i++) { parameterizedFields[i] = delegateFields[i].parameterizedWith(getTypesForMemberParameterization(), this, isParameterizedType()); } return parameterizedFields; } else { return getDelegate().getDeclaredFields(); } } /** * Find out from the generic signature the true signature of any interfaces I implement. If I am parameterized, these may then * need to be parameterized before returning. */ @Override public ResolvedType[] getDeclaredInterfaces() { ResolvedType[] interfaces = parameterizedInterfaces.get(); if (interfaces != null) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
return interfaces; } ResolvedType[] delegateInterfaces = getDelegate().getDeclaredInterfaces(); if (isRawType()) { if (newInterfaces != null) { throw new IllegalStateException( "The raw type should never be accumulating new interfaces, they should be on the generic type. Type is " + this.getName()); } ResolvedType[] newInterfacesFromGenericType = genericType.newInterfaces; if (newInterfacesFromGenericType != null) { ResolvedType[] extraInterfaces = new ResolvedType[delegateInterfaces.length + newInterfacesFromGenericType.length]; System.arraycopy(delegateInterfaces, 0, extraInterfaces, 0, delegateInterfaces.length); System.arraycopy(newInterfacesFromGenericType, 0, extraInterfaces, delegateInterfaces.length, newInterfacesFromGenericType.length); delegateInterfaces = extraInterfaces; } } else if (newInterfaces != null) { ResolvedType[] extraInterfaces = new ResolvedType[delegateInterfaces.length + newInterfaces.length]; System.arraycopy(delegateInterfaces, 0, extraInterfaces, 0, delegateInterfaces.length); System.arraycopy(newInterfaces, 0, extraInterfaces, delegateInterfaces.length, newInterfaces.length); delegateInterfaces = extraInterfaces; } if (isParameterizedType()) { interfaces = new ResolvedType[delegateInterfaces.length]; for (int i = 0; i < delegateInterfaces.length; i++) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
if (delegateInterfaces[i].isParameterizedType()) { interfaces[i] = delegateInterfaces[i].parameterize(getMemberParameterizationMap()).resolve(world); } else { interfaces[i] = delegateInterfaces[i]; } } parameterizedInterfaces = new WeakReference<ResolvedType[]>(interfaces); return interfaces; } else if (isRawType()) { UnresolvedType[] paramTypes = getTypesForMemberParameterization(); interfaces = new ResolvedType[delegateInterfaces.length]; for (int i = 0, max = interfaces.length; i < max; i++) { interfaces[i] = delegateInterfaces[i]; if (interfaces[i].isGenericType()) { interfaces[i] = interfaces[i].getRawType().resolve(getWorld()); } else if (interfaces[i].isParameterizedType()) { UnresolvedType[] toUseForParameterization = determineThoseTypesToUse(interfaces[i], paramTypes); interfaces[i] = interfaces[i].parameterizedWith(toUseForParameterization); } } parameterizedInterfaces = new WeakReference<ResolvedType[]>(interfaces); return interfaces; } if (getDelegate().isCacheable()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
parameterizedInterfaces = new WeakReference<ResolvedType[]>(delegateInterfaces); } return delegateInterfaces; } /** * Locates the named type variable in the list of those on this generic type and returns the type parameter from the second list * supplied. Returns null if it can't be found */ /** * It is possible this type has multiple type variables but the interface we are about to parameterize only uses a subset - this
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
* method determines the subset to use by looking at the type variable names used. For example: <code> * class Foo<T extends String,E extends Number> implements SuperInterface<T> {} * </code> where <code> * interface SuperInterface<Z> {} * </code> In that example, a use of the 'Foo' raw type should know that it implements the SuperInterface<String>. */ private UnresolvedType[] determineThoseTypesToUse(ResolvedType parameterizedInterface, UnresolvedType[] paramTypes) { UnresolvedType[] tParms = parameterizedInterface.getTypeParameters(); UnresolvedType[] retVal = new UnresolvedType[tParms.length]; for (int i = 0; i < tParms.length; i++) { UnresolvedType tParm = tParms[i]; if (tParm.isTypeVariableReference()) { TypeVariableReference tvrt = (TypeVariableReference) tParm; TypeVariable tv = tvrt.getTypeVariable(); int rank = getRank(tv.getName()); if (rank != -1) { retVal[i] = paramTypes[rank]; } else { retVal[i] = tParms[i]; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} else { retVal[i] = tParms[i]; } } return retVal; } /** * Returns the position within the set of type variables for this type for the specified type variable name. Returns -1 if there * is no type variable with the specified name. */ private int getRank(String tvname) { TypeVariable[] thisTypesTVars = getGenericType().getTypeVariables(); for (int i = 0; i < thisTypesTVars.length; i++) { TypeVariable tv = thisTypesTVars[i]; if (tv.getName().equals(tvname)) { return i; } } return -1; } @Override public ResolvedMember[] getDeclaredMethods() { if (parameterizedMethods != null) { return parameterizedMethods; } if (isParameterizedType() || isRawType()) { ResolvedMember[] delegateMethods = getDelegate().getDeclaredMethods(); UnresolvedType[] parameters = getTypesForMemberParameterization(); parameterizedMethods = new ResolvedMember[delegateMethods.length]; for (int i = 0; i < delegateMethods.length; i++) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
parameterizedMethods[i] = delegateMethods[i].parameterizedWith(parameters, this, isParameterizedType()); } return parameterizedMethods; } else { return getDelegate().getDeclaredMethods(); } } @Override public ResolvedMember[] getDeclaredPointcuts() { if (parameterizedPointcuts != null) { return parameterizedPointcuts; } if (isParameterizedType()) { ResolvedMember[] delegatePointcuts = getDelegate().getDeclaredPointcuts(); parameterizedPointcuts = new ResolvedMember[delegatePointcuts.length]; for (int i = 0; i < delegatePointcuts.length; i++) { parameterizedPointcuts[i] = delegatePointcuts[i].parameterizedWith(getTypesForMemberParameterization(), this, isParameterizedType()); } return parameterizedPointcuts; } else { return getDelegate().getDeclaredPointcuts(); } } private UnresolvedType[] getTypesForMemberParameterization() { UnresolvedType[] parameters = null; if (isParameterizedType()) { parameters = getTypeParameters(); } else if (isRawType()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
TypeVariable[] tvs = getGenericType().getTypeVariables(); parameters = new UnresolvedType[tvs.length]; for (int i = 0; i < tvs.length; i++) { parameters[i] = tvs[i].getFirstBound(); } } return parameters; } @Override public TypeVariable[] getTypeVariables() { if (this.typeVariables == null) { this.typeVariables = getDelegate().getTypeVariables(); for (int i = 0; i < this.typeVariables.length; i++) { this.typeVariables[i].resolve(world); } } return this.typeVariables; } @Override public PerClause getPerClause() { PerClause pclause = getDelegate().getPerClause(); if (pclause != null && isParameterizedType()) { Map<String, UnresolvedType> parameterizationMap = getAjMemberParameterizationMap(); pclause = (PerClause) pclause.parameterizeWith(parameterizationMap, world); } return pclause; } @Override public Collection<Declare> getDeclares() { if (parameterizedDeclares != null) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
return parameterizedDeclares; } Collection<Declare> declares = null; if (ajMembersNeedParameterization()) { Collection<Declare> genericDeclares = getDelegate().getDeclares(); parameterizedDeclares = new ArrayList<Declare>(); Map<String, UnresolvedType> parameterizationMap = getAjMemberParameterizationMap(); for (Declare declareStatement : genericDeclares) { parameterizedDeclares.add(declareStatement.parameterizeWith(parameterizationMap, world)); } declares = parameterizedDeclares; } else { declares = getDelegate().getDeclares(); } for (Declare d : declares) { d.setDeclaringType(this); } return declares; } @Override public Collection<ConcreteTypeMunger> getTypeMungers() { return getDelegate().getTypeMungers(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
@Override public Collection<ResolvedMember> getPrivilegedAccesses() { return getDelegate().getPrivilegedAccesses(); } @Override public int getModifiers() { return getDelegate().getModifiers(); } WeakReference<ResolvedType> superclassReference = new WeakReference<ResolvedType>(null); @Override public ResolvedType getSuperclass() { ResolvedType ret = null; if (newSuperclass != null) { if (this.isParameterizedType() && newSuperclass.isParameterizedType()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
return newSuperclass.parameterize(getMemberParameterizationMap()).resolve(getWorld()); } if (getDelegate().isCacheable()) { superclassReference = new WeakReference<ResolvedType>(ret); } return newSuperclass; } try { world.setTypeVariableLookupScope(this); ret = getDelegate().getSuperclass(); } finally { world.setTypeVariableLookupScope(null); } if (this.isParameterizedType() && ret.isParameterizedType()) { ret = ret.parameterize(getMemberParameterizationMap()).resolve(getWorld()); } if (getDelegate().isCacheable()) { superclassReference = new WeakReference<ResolvedType>(ret); } return ret; } public ReferenceTypeDelegate getDelegate() { return delegate; } public void setDelegate(ReferenceTypeDelegate delegate) { if (this.delegate != null && this.delegate.copySourceContext() && this.delegate.getSourceContext() != SourceContextImpl.UNKNOWN_SOURCE_CONTEXT) { ((AbstractReferenceTypeDelegate) delegate).setSourceContext(this.delegate.getSourceContext());
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
} this.delegate = delegate; for (ReferenceType dependent : derivativeTypes) { dependent.setDelegate(delegate); } if (isRawType() && getGenericType() != null) { ReferenceType genType = (ReferenceType) getGenericType(); if (genType.getDelegate() != delegate) { genType.setDelegate(delegate); } } clearParameterizationCaches(); ensureConsistent(); } private void clearParameterizationCaches() { parameterizedFields = null; parameterizedInterfaces.clear(); parameterizedMethods = null; parameterizedPointcuts = null; superclassReference = new WeakReference<ResolvedType>(null); } public int getEndPos() { return endPos; } public int getStartPos() { return startPos; } public void setEndPos(int endPos) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
this.endPos = endPos; } public void setStartPos(int startPos) { this.startPos = startPos; } @Override public boolean doesNotExposeShadowMungers() { return getDelegate().doesNotExposeShadowMungers(); } public String getDeclaredGenericSignature() { return getDelegate().getDeclaredGenericSignature(); } public void setGenericType(ReferenceType rt) { genericType = rt; if (typeKind == TypeKind.SIMPLE) { typeKind = TypeKind.RAW; signatureErasure = signature; } if (typeKind == TypeKind.RAW) { genericType.addDependentType(this); } if (this.isRawType() && rt.isRawType()) { new RuntimeException("PR341926 diagnostics: Incorrect setup for a generic type, raw type should not point to raw: " + this.getName()).printStackTrace(); } } public void demoteToSimpleType() { genericType = null;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
typeKind = TypeKind.SIMPLE; signatureErasure = null; } @Override public ResolvedType getGenericType() { if (isGenericType()) { return this; } return genericType; } /** * a parameterized signature starts with a "P" in place of the "L", see the comment on signatures in UnresolvedType. * * @param aGenericType * @param someParameters * @return */ private static String makeParameterizedSignature(ResolvedType aGenericType, ResolvedType[] someParameters) { String rawSignature = aGenericType.getErasureSignature(); StringBuffer ret = new StringBuffer(); ret.append(PARAMETERIZED_TYPE_IDENTIFIER); ret.append(rawSignature.substring(1, rawSignature.length() - 1)); ret.append("<"); for (int i = 0; i < someParameters.length; i++) { ret.append(someParameters[i].getSignature()); } ret.append(">;"); return ret.toString(); } private static String makeDeclaredSignature(ResolvedType aGenericType, UnresolvedType[] someParameters) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
StringBuffer ret = new StringBuffer(); String rawSig = aGenericType.getErasureSignature(); ret.append(rawSig.substring(0, rawSig.length() - 1)); ret.append("<"); for (int i = 0; i < someParameters.length; i++) { try { ret.append(((ReferenceType) someParameters[i]).getSignatureForAttribute()); } catch (ClassCastException cce) { throw new IllegalStateException("DebugFor325731: expected a ReferenceType but was " + someParameters[i] + " of type " + someParameters[i].getClass().getName(), cce); } } ret.append(">;"); return ret.toString(); } @Override public void ensureConsistent() { annotations = null; annotationTypes = null; newSuperclass = null; newInterfaces = null; typeVariables = null; parameterizedInterfaces.clear(); superclassReference = new WeakReference<ResolvedType>(null); if (getDelegate() != null) { delegate.ensureConsistent(); } } @Override public void addParent(ResolvedType newParent) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
if (newParent.isClass()) { newSuperclass = newParent; superclassReference = new WeakReference<ResolvedType>(null); } else { if (newInterfaces == null) { newInterfaces = new ResolvedType[1]; newInterfaces[0] = newParent; } else { ResolvedType[] existing = getDelegate().getDeclaredInterfaces(); if (existing != null) { for (int i = 0; i < existing.length; i++) { if (existing[i].equals(newParent)) { return; } } } ResolvedType[] newNewInterfaces = new ResolvedType[newInterfaces.length + 1]; System.arraycopy(newInterfaces, 0, newNewInterfaces, 1, newInterfaces.length); newNewInterfaces[0] = newParent; newInterfaces = newNewInterfaces; } if (this.isGenericType()) { for (ReferenceType derivativeType : derivativeTypes) { derivativeType.parameterizedInterfaces.clear(); } } parameterizedInterfaces.clear(); } } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
/* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Eclipse Public License v1.0 * which accompanies this distribution and is available at * http:www.eclipse.org/legal/epl-v10.html * * Contributors: * PARC initial implementation * Alexandre Vasseur @AspectJ ITDs * ******************************************************************/ package org.aspectj.weaver; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Queue; import java.util.Set; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.ISourceLocation; import org.aspectj.bridge.Message; import org.aspectj.bridge.MessageUtil; import org.aspectj.util.FuzzyBoolean; import org.aspectj.weaver.AjAttribute.WeaverVersionInfo; import org.aspectj.weaver.Iterators.Getter; import org.aspectj.weaver.patterns.Declare; import org.aspectj.weaver.patterns.PerClause; public abstract class ResolvedType extends UnresolvedType implements AnnotatedElement { public static final ResolvedType[] EMPTY_RESOLVED_TYPE_ARRAY = new ResolvedType[0]; public static final String PARAMETERIZED_TYPE_IDENTIFIER = "P"; public ResolvedType[] temporaryAnnotationTypes; private ResolvedType[] resolvedTypeParams; private String binaryPath; protected World world; private int bits; private static int AnnotationBitsInitialized = 0x0001;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
private static int AnnotationMarkedInherited = 0x0002; private static int MungersAnalyzed = 0x0004; private static int HasParentMunger = 0x0008; private static int TypeHierarchyCompleteBit = 0x0010; private static int GroovyObjectInitialized = 0x0020; private static int IsGroovyObject = 0x0040; protected ResolvedType(String signature, World world) { super(signature); this.world = world; } protected ResolvedType(String signature, String signatureErasure, World world) { super(signature, signatureErasure); this.world = world; } public int getSize() { return 1; } /** * Returns an iterator through ResolvedType objects representing all the direct supertypes of this type. That is, through the * superclass, if any, and all declared interfaces. */ public final Iterator<ResolvedType> getDirectSupertypes() { Iterator<ResolvedType> interfacesIterator = Iterators.array(getDeclaredInterfaces()); ResolvedType superclass = getSuperclass(); if (superclass == null) { return interfacesIterator; } else { return Iterators.snoc(interfacesIterator, superclass); } }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public abstract ResolvedMember[] getDeclaredFields(); public abstract ResolvedMember[] getDeclaredMethods(); public abstract ResolvedType[] getDeclaredInterfaces(); public abstract ResolvedMember[] getDeclaredPointcuts(); public boolean isCacheable() { return true; } /** * @return the superclass of this type, or null (if this represents a jlObject, primitive, or void) */ public abstract ResolvedType getSuperclass(); public abstract int getModifiers(); public boolean isMissing() { return false; } public static boolean isMissing(UnresolvedType unresolved) { if (unresolved instanceof ResolvedType) { ResolvedType resolved = (ResolvedType) unresolved; return resolved.isMissing(); } else { return (unresolved == MISSING); } } public ResolvedType[] getAnnotationTypes() { return EMPTY_RESOLVED_TYPE_ARRAY; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public AnnotationAJ getAnnotationOfType(UnresolvedType ofType) { return null; } protected static Set<String> validBoxing = new HashSet<String>(); static { validBoxing.add("Ljava/lang/Byte;B"); validBoxing.add("Ljava/lang/Character;C"); validBoxing.add("Ljava/lang/Double;D"); validBoxing.add("Ljava/lang/Float;F"); validBoxing.add("Ljava/lang/Integer;I"); validBoxing.add("Ljava/lang/Long;J"); validBoxing.add("Ljava/lang/Short;S"); validBoxing.add("Ljava/lang/Boolean;Z"); validBoxing.add("BLjava/lang/Byte;"); validBoxing.add("CLjava/lang/Character;"); validBoxing.add("DLjava/lang/Double;"); validBoxing.add("FLjava/lang/Float;"); validBoxing.add("ILjava/lang/Integer;"); validBoxing.add("JLjava/lang/Long;"); validBoxing.add("SLjava/lang/Short;"); validBoxing.add("ZLjava/lang/Boolean;"); } public ResolvedType getResolvedComponentType() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return null; } public World getWorld() { return world; } @Override public final boolean equals(Object other) { if (other instanceof ResolvedType) { return this == other; } else { return super.equals(other); } } /** * returns an iterator through all of the fields of this type, in order for checking from JVM spec 2ed 5.4.3.2. This means that * the order is * <p/> * <ul> * <li>fields from current class</li> * <li>recur into direct superinterfaces</li> * <li>recur into superclass</li> * </ul> * <p/> * We keep a hashSet of interfaces that we've visited so we don't spiral out into 2^n land. */ public Iterator<ResolvedMember> getFields() { final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter(o.getDirectSupertypes()); } }; return Iterators.mapOver(Iterators.recur(this, typeGetter), FieldGetterInstance); } /** * returns an iterator through all of the methods of this type, in order for checking from JVM spec 2ed 5.4.3.3. This means that * the order is * <p/> * <ul> * <li>methods from current class</li> * <li>recur into superclass, all the way up, not touching interfaces</li> * <li>recur into all superinterfaces, in some unspecified order (but those 'closest' to this type are first)</li> * </ul> * <p/> * * @param wantGenerics is true if the caller would like all generics information, otherwise those methods are collapsed to their * erasure */ public Iterator<ResolvedMember> getMethods(boolean wantGenerics, boolean wantDeclaredParents) { return Iterators.mapOver(getHierarchy(wantGenerics, wantDeclaredParents), MethodGetterInstance); } public Iterator<ResolvedMember> getMethodsIncludingIntertypeDeclarations(boolean wantGenerics, boolean wantDeclaredParents) { return Iterators.mapOver(getHierarchy(wantGenerics, wantDeclaredParents), MethodGetterWithItdsInstance); } /** * An Iterators.Getter that returns an iterator over all methods declared on some resolved type. */ private static class MethodGetter implements Iterators.Getter<ResolvedType, ResolvedMember> {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public Iterator<ResolvedMember> get(ResolvedType type) { return Iterators.array(type.getDeclaredMethods()); } } /** * An Iterators.Getter that returns an iterator over all pointcuts declared on some resolved type. */ private static class PointcutGetter implements Iterators.Getter<ResolvedType, ResolvedMember> { public Iterator<ResolvedMember> get(ResolvedType o) { return Iterators.array(o.getDeclaredPointcuts()); } } private static class MethodGetterIncludingItds implements Iterators.Getter<ResolvedType, ResolvedMember> { public Iterator<ResolvedMember> get(ResolvedType type) { ResolvedMember[] methods = type.getDeclaredMethods(); if (type.interTypeMungers != null) { int additional = 0; for (ConcreteTypeMunger typeTransformer : type.interTypeMungers) { ResolvedMember rm = typeTransformer.getSignature(); if (rm != null) { additional++; } } if (additional > 0) { ResolvedMember[] methods2 = new ResolvedMember[methods.length + additional];
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
System.arraycopy(methods, 0, methods2, 0, methods.length); additional = methods.length; for (ConcreteTypeMunger typeTransformer : type.interTypeMungers) { ResolvedMember rm = typeTransformer.getSignature(); if (rm != null) { methods2[additional++] = typeTransformer.getSignature(); } } methods = methods2; } } return Iterators.array(methods); } } /** * An Iterators.Getter that returns an iterator over all fields declared on some resolved type. */ private static class FieldGetter implements Iterators.Getter<ResolvedType, ResolvedMember> { public Iterator<ResolvedMember> get(ResolvedType type) { return Iterators.array(type.getDeclaredFields()); } } private final static MethodGetter MethodGetterInstance = new MethodGetter(); private final static MethodGetterIncludingItds MethodGetterWithItdsInstance = new MethodGetterIncludingItds(); private final static PointcutGetter PointcutGetterInstance = new PointcutGetter(); private final static FieldGetter FieldGetterInstance = new FieldGetter(); /** * Return an iterator over the types in this types hierarchy - starting with this type first, then all superclasses up to Object * and then all interfaces (starting with those 'nearest' this type). *
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
* @param wantGenerics true if the caller wants full generic information * @param wantDeclaredParents true if the caller even wants those parents introduced via declare parents * @return an iterator over all types in the hierarchy of this type */ public Iterator<ResolvedType> getHierarchy() { return getHierarchy(false, false); } public Iterator<ResolvedType> getHierarchy(final boolean wantGenerics, final boolean wantDeclaredParents) { final Iterators.Getter<ResolvedType, ResolvedType> interfaceGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { List<String> alreadySeen = new ArrayList<String>(); public Iterator<ResolvedType> get(ResolvedType type) { ResolvedType[] interfaces = type.getDeclaredInterfaces(); if (!wantDeclaredParents && type.hasNewParentMungers()) { List<Integer> forRemoval = new ArrayList<Integer>(); for (ConcreteTypeMunger munger : type.interTypeMungers) { if (munger.getMunger() != null) { ResolvedTypeMunger m = munger.getMunger(); if (m.getKind() == ResolvedTypeMunger.Parent) { ResolvedType newType = ((NewParentTypeMunger) m).getNewParent(); if (!wantGenerics && newType.isParameterizedOrGenericType()) { newType = newType.getRawType(); } for (int ii = 0; ii < interfaces.length; ii++) { ResolvedType iface = interfaces[ii]; if (!wantGenerics && iface.isParameterizedOrGenericType()) { iface = iface.getRawType(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (newType.getSignature().equals(iface.getSignature())) { forRemoval.add(ii); } } } } } if (forRemoval.size() > 0) { ResolvedType[] interfaces2 = new ResolvedType[interfaces.length - forRemoval.size()]; int p = 0; for (int ii = 0; ii < interfaces.length; ii++) { if (!forRemoval.contains(ii)) { interfaces2[p++] = interfaces[ii]; } } interfaces = interfaces2; } } return new Iterators.ResolvedTypeArrayIterator(interfaces, alreadySeen, wantGenerics); } }; if (this.isInterface()) { return new SuperInterfaceWalker(interfaceGetter, this); } else { SuperInterfaceWalker superInterfaceWalker = new SuperInterfaceWalker(interfaceGetter); Iterator<ResolvedType> superClassesIterator = new SuperClassWalker(this, superInterfaceWalker, wantGenerics);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return Iterators.append1(superClassesIterator, superInterfaceWalker); } } /** * Return a list of methods, first those declared on this class, then those declared on the superclass (recurse) and then those * declared on the superinterfaces. This is expensive - use the getMethods() method if you can! */ public List<ResolvedMember> getMethodsWithoutIterator(boolean includeITDs, boolean allowMissing, boolean genericsAware) { List<ResolvedMember> methods = new ArrayList<ResolvedMember>(); Set<String> knowninterfaces = new HashSet<String>(); addAndRecurse(knowninterfaces, methods, this, includeITDs, allowMissing, genericsAware); return methods; } /** * Return a list of the types in the hierarchy of this type, starting with this type. The order in the list is the superclasses * followed by the super interfaces. * * @param genericsAware should the list include parameterized/generic types (if not, they will be collapsed to raw)? * @return list of resolvedtypes in this types hierarchy, including this type first */ public List<ResolvedType> getHierarchyWithoutIterator(boolean includeITDs, boolean allowMissing, boolean genericsAware) { List<ResolvedType> types = new ArrayList<ResolvedType>(); Set<String> visited = new HashSet<String>(); recurseHierarchy(visited, types, this, includeITDs, allowMissing, genericsAware); return types; } private void addAndRecurse(Set<String> knowninterfaces, List<ResolvedMember> collector, ResolvedType resolvedType, boolean includeITDs, boolean allowMissing, boolean genericsAware) { collector.addAll(Arrays.asList(resolvedType.getDeclaredMethods()));
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (includeITDs && resolvedType.interTypeMungers != null) { for (ConcreteTypeMunger typeTransformer : interTypeMungers) { ResolvedMember rm = typeTransformer.getSignature(); if (rm != null) { collector.add(typeTransformer.getSignature()); } } } if (!resolvedType.isInterface() && !resolvedType.equals(ResolvedType.OBJECT)) { ResolvedType superType = resolvedType.getSuperclass(); if (superType != null && !superType.isMissing()) { if (!genericsAware && superType.isParameterizedOrGenericType()) { superType = superType.getRawType(); } addAndRecurse(knowninterfaces, collector, superType, includeITDs, allowMissing, genericsAware); } } ResolvedType[] interfaces = resolvedType.getDeclaredInterfaces(); for (int i = 0; i < interfaces.length; i++) { ResolvedType iface = interfaces[i]; if (!genericsAware && iface.isParameterizedOrGenericType()) { iface = iface.getRawType(); } boolean shouldSkip = false;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
for (int j = 0; j < resolvedType.interTypeMungers.size(); j++) { ConcreteTypeMunger munger = resolvedType.interTypeMungers.get(j); if (munger.getMunger() != null && munger.getMunger().getKind() == ResolvedTypeMunger.Parent && ((NewParentTypeMunger) munger.getMunger()).getNewParent().equals(iface) ) { shouldSkip = true; break; } } if (!shouldSkip && !knowninterfaces.contains(iface.getSignature())) { knowninterfaces.add(iface.getSignature()); if (allowMissing && iface.isMissing()) { if (iface instanceof MissingResolvedTypeWithKnownSignature) { ((MissingResolvedTypeWithKnownSignature) iface).raiseWarningOnMissingInterfaceWhilstFindingMethods(); } } else { addAndRecurse(knowninterfaces, collector, iface, includeITDs, allowMissing, genericsAware); } } } } /** * Recurse up a type hierarchy, first the superclasses then the super interfaces. */ private void recurseHierarchy(Set<String> knowninterfaces, List<ResolvedType> collector, ResolvedType resolvedType, boolean includeITDs, boolean allowMissing, boolean genericsAware) { collector.add(resolvedType); if (!resolvedType.isInterface() && !resolvedType.equals(ResolvedType.OBJECT)) { ResolvedType superType = resolvedType.getSuperclass();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (superType != null && !superType.isMissing()) { if (!genericsAware && (superType.isParameterizedType() || superType.isGenericType())) { superType = superType.getRawType(); } recurseHierarchy(knowninterfaces, collector, superType, includeITDs, allowMissing, genericsAware); } } ResolvedType[] interfaces = resolvedType.getDeclaredInterfaces(); for (int i = 0; i < interfaces.length; i++) { ResolvedType iface = interfaces[i]; if (!genericsAware && (iface.isParameterizedType() || iface.isGenericType())) { iface = iface.getRawType(); } boolean shouldSkip = false; for (int j = 0; j < resolvedType.interTypeMungers.size(); j++) { ConcreteTypeMunger munger = resolvedType.interTypeMungers.get(j); if (munger.getMunger() != null && munger.getMunger().getKind() == ResolvedTypeMunger.Parent && ((NewParentTypeMunger) munger.getMunger()).getNewParent().equals(iface) ) { shouldSkip = true; break; } } if (!shouldSkip && !knowninterfaces.contains(iface.getSignature())) { knowninterfaces.add(iface.getSignature());
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (allowMissing && iface.isMissing()) { if (iface instanceof MissingResolvedTypeWithKnownSignature) { ((MissingResolvedTypeWithKnownSignature) iface).raiseWarningOnMissingInterfaceWhilstFindingMethods(); } } else { recurseHierarchy(knowninterfaces, collector, iface, includeITDs, allowMissing, genericsAware); } } } } public ResolvedType[] getResolvedTypeParameters() { if (resolvedTypeParams == null) { resolvedTypeParams = world.resolve(typeParameters); } return resolvedTypeParams; } /** * described in JVM spec 2ed 5.4.3.2 */ public ResolvedMember lookupField(Member field) { Iterator<ResolvedMember> i = getFields(); while (i.hasNext()) { ResolvedMember resolvedMember = i.next(); if (matches(resolvedMember, field)) { return resolvedMember; } if (resolvedMember.hasBackingGenericMember() && field.getName().equals(resolvedMember.getName())) { if (matches(resolvedMember.getBackingGenericMember(), field)) { return resolvedMember;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } } return null; } /** * described in JVM spec 2ed 5.4.3.3. Doesnt check ITDs. * * <p> * Check the current type for the method. If it is not found, check the super class and any super interfaces. Taking care not to * process interfaces multiple times. */ public ResolvedMember lookupMethod(Member m) { List<ResolvedType> typesTolookat = new ArrayList<ResolvedType>(); typesTolookat.add(this); int pos = 0; while (pos < typesTolookat.size()) { ResolvedType type = typesTolookat.get(pos++); if (!type.isMissing()) { ResolvedMember[] methods = type.getDeclaredMethods(); if (methods != null) { for (int i = 0; i < methods.length; i++) { ResolvedMember method = methods[i]; if (matches(method, m)) { return method; } if (method.hasBackingGenericMember() && m.getName().equals(method.getName())) { if (matches(method.getBackingGenericMember(), m)) { return method;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} } } } } ResolvedType superclass = type.getSuperclass(); if (superclass != null) { typesTolookat.add(superclass); } ResolvedType[] superinterfaces = type.getDeclaredInterfaces(); if (superinterfaces != null) { for (int i = 0; i < superinterfaces.length; i++) { ResolvedType interf = superinterfaces[i]; if (!typesTolookat.contains(interf)) { typesTolookat.add(interf); } } } } return null; } /** * @param member the member to lookup in intertype declarations affecting this type * @return the real signature defined by any matching intertype declaration, otherwise null */ public ResolvedMember lookupMethodInITDs(Member member) { for (ConcreteTypeMunger typeTransformer : interTypeMungers) { if (matches(typeTransformer.getSignature(), member)) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return typeTransformer.getSignature(); } } return null; } /** * return null if not found */ private ResolvedMember lookupMember(Member m, ResolvedMember[] a) { for (int i = 0; i < a.length; i++) { ResolvedMember f = a[i]; if (matches(f, m)) { return f; } } return null; } /** * Looks for the first member in the hierarchy matching aMember. This method differs from lookupMember(Member) in that it takes * into account parameters which are type variables - which clearly an unresolved Member cannot do since it does not know * anything about type variables. */ public ResolvedMember lookupResolvedMember(ResolvedMember aMember, boolean allowMissing, boolean eraseGenerics) { Iterator<ResolvedMember> toSearch = null; ResolvedMember found = null; if ((aMember.getKind() == Member.METHOD) || (aMember.getKind() == Member.CONSTRUCTOR)) { toSearch = getMethodsIncludingIntertypeDeclarations(!eraseGenerics, true); } else {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
assert aMember.getKind() == Member.FIELD; toSearch = getFields(); } while (toSearch.hasNext()) { ResolvedMember candidate = toSearch.next(); if (eraseGenerics) { if (candidate.hasBackingGenericMember()) { candidate = candidate.getBackingGenericMember(); } } if (candidate.matches(aMember, eraseGenerics)) { found = candidate; break; } } return found; } public static boolean matches(Member m1, Member m2) { if (m1 == null) { return m2 == null; } if (m2 == null) { return false; } boolean equalNames = m1.getName().equals(m2.getName()); if (!equalNames) { return false; }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
boolean equalSignatures = m1.getSignature().equals(m2.getSignature()); if (equalSignatures) { return true; } boolean equalCovariantSignatures = m1.getParameterSignature().equals(m2.getParameterSignature()); if (equalCovariantSignatures) { return true; } return false; } public static boolean conflictingSignature(Member m1, Member m2) { if (m1 == null || m2 == null) { return false; } if (!m1.getName().equals(m2.getName())) { return false; } if (m1.getKind() != m2.getKind()) { return false; } if (m1.getKind() == Member.FIELD) { return m1.getDeclaringType().equals(m2.getDeclaringType()); } else if (m1.getKind() == Member.POINTCUT) { return true; } UnresolvedType[] p1 = m1.getGenericParameterTypes();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
UnresolvedType[] p2 = m2.getGenericParameterTypes(); if (p1 == null) { p1 = m1.getParameterTypes(); } if (p2 == null) { p2 = m2.getParameterTypes(); } int n = p1.length; if (n != p2.length) { return false; } for (int i = 0; i < n; i++) { if (!p1[i].equals(p2[i])) { return false; } } return true; } /** * returns an iterator through all of the pointcuts of this type, in order for checking from JVM spec 2ed 5.4.3.2 (as for * fields). This means that the order is * <p/> * <ul> * <li>pointcuts from current class</li> * <li>recur into direct superinterfaces</li> * <li>recur into superclass</li> * </ul> * <p/> * We keep a hashSet of interfaces that we've visited so we don't spiral out into 2^n land. */
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public Iterator<ResolvedMember> getPointcuts() { final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter(o.getDirectSupertypes()); } }; return Iterators.mapOver(Iterators.recur(this, typeGetter), PointcutGetterInstance); } public ResolvedPointcutDefinition findPointcut(String name) { for (Iterator<ResolvedMember> i = getPointcuts(); i.hasNext();) { ResolvedPointcutDefinition f = (ResolvedPointcutDefinition) i.next(); if (f != null && name.equals(f.getName())) { return f; } } if (!getOutermostType().equals(this)) { ResolvedType outerType = getOutermostType().resolve(world); ResolvedPointcutDefinition rpd = outerType.findPointcut(name); return rpd; } return null; } public CrosscuttingMembers crosscuttingMembers; public CrosscuttingMembers collectCrosscuttingMembers(boolean shouldConcretizeIfNeeded) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
crosscuttingMembers = new CrosscuttingMembers(this, shouldConcretizeIfNeeded); if (getPerClause() == null) { return crosscuttingMembers; } crosscuttingMembers.setPerClause(getPerClause()); crosscuttingMembers.addShadowMungers(collectShadowMungers()); crosscuttingMembers.addTypeMungers(getTypeMungers()); crosscuttingMembers.addDeclares(collectDeclares(!this.doesNotExposeShadowMungers())); crosscuttingMembers.addPrivilegedAccesses(getPrivilegedAccesses()); return crosscuttingMembers; } public final List<Declare> collectDeclares(boolean includeAdviceLike) { if (!this.isAspect()) { return Collections.emptyList(); } List<Declare> ret = new ArrayList<Declare>(); if (!this.isAbstract()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter((o).getDirectSupertypes()); } }; Iterator<ResolvedType> typeIterator = Iterators.recur(this, typeGetter); while (typeIterator.hasNext()) { ResolvedType ty = typeIterator.next(); for (Iterator<Declare> i = ty.getDeclares().iterator(); i.hasNext();) { Declare dec = i.next(); if (dec.isAdviceLike()) { if (includeAdviceLike) { ret.add(dec); } } else { ret.add(dec); } } } } return ret; } private final List<ShadowMunger> collectShadowMungers() { if (!this.isAspect() || this.isAbstract() || this.doesNotExposeShadowMungers()) { return Collections.emptyList(); } List<ShadowMunger> acc = new ArrayList<ShadowMunger>();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
final Iterators.Filter<ResolvedType> dupFilter = Iterators.dupFilter(); Iterators.Getter<ResolvedType, ResolvedType> typeGetter = new Iterators.Getter<ResolvedType, ResolvedType>() { public Iterator<ResolvedType> get(ResolvedType o) { return dupFilter.filter((o).getDirectSupertypes()); } }; Iterator<ResolvedType> typeIterator = Iterators.recur(this, typeGetter); while (typeIterator.hasNext()) { ResolvedType ty = typeIterator.next(); acc.addAll(ty.getDeclaredShadowMungers()); } return acc; } public void addParent(ResolvedType newParent) { } protected boolean doesNotExposeShadowMungers() { return false; } public PerClause getPerClause() { return null; } public Collection<Declare> getDeclares() { return Collections.emptyList(); } public Collection<ConcreteTypeMunger> getTypeMungers() { return Collections.emptyList(); } public Collection<ResolvedMember> getPrivilegedAccesses() { return Collections.emptyList();
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
} public final boolean isInterface() { return Modifier.isInterface(getModifiers()); } public final boolean isAbstract() { return Modifier.isAbstract(getModifiers()); } public boolean isClass() { return false; } public boolean isAspect() { return false; } public boolean isAnnotationStyleAspect() { return false; } /** * Note: Only overridden by Name subtype. */ public boolean isEnum() { return false; } /** * Note: Only overridden by Name subtype. */ public boolean isAnnotation() { return false; } public boolean isAnonymous() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return false; } public boolean isNested() { return false; } public void addAnnotation(AnnotationAJ annotationX) { throw new RuntimeException("ResolvedType.addAnnotation() should never be called"); } public AnnotationAJ[] getAnnotations() { throw new RuntimeException("ResolvedType.getAnnotations() should never be called"); } /** * Note: Only overridden by ReferenceType subtype */ public boolean canAnnotationTargetType() { return false; } /** * Note: Only overridden by ReferenceType subtype */ public AnnotationTargetKind[] getAnnotationTargetKinds() { return null; } /** * Note: Only overridden by Name subtype. */ public boolean isAnnotationWithRuntimeRetention() { return false; } public boolean isSynthetic() {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return signature.indexOf("$ajc") != -1; } public final boolean isFinal() { return Modifier.isFinal(getModifiers()); } protected Map<String, UnresolvedType> getMemberParameterizationMap() { if (!isParameterizedType()) { return Collections.emptyMap(); } TypeVariable[] tvs = getGenericType().getTypeVariables(); Map<String, UnresolvedType> parameterizationMap = new HashMap<String, UnresolvedType>(); for (int i = 0; i < tvs.length; i++) { parameterizationMap.put(tvs[i].getName(), typeParameters[i]); } return parameterizationMap; } public List<ShadowMunger> getDeclaredAdvice() { List<ShadowMunger> l = new ArrayList<ShadowMunger>(); ResolvedMember[] methods = getDeclaredMethods(); if (isParameterizedType()) { methods = getGenericType().getDeclaredMethods(); } Map<String, UnresolvedType> typeVariableMap = getAjMemberParameterizationMap(); for (int i = 0, len = methods.length; i < len; i++) { ShadowMunger munger = methods[i].getAssociatedShadowMunger(); if (munger != null) { if (ajMembersNeedParameterization()) { munger = munger.parameterizeWith(this, typeVariableMap);
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (munger instanceof Advice) { Advice advice = (Advice) munger; UnresolvedType[] ptypes = methods[i].getGenericParameterTypes(); UnresolvedType[] newPTypes = new UnresolvedType[ptypes.length]; for (int j = 0; j < ptypes.length; j++) { if (ptypes[j] instanceof TypeVariableReferenceType) { TypeVariableReferenceType tvrt = (TypeVariableReferenceType) ptypes[j]; if (typeVariableMap.containsKey(tvrt.getTypeVariable().getName())) { newPTypes[j] = typeVariableMap.get(tvrt.getTypeVariable().getName()); } else { newPTypes[j] = ptypes[j]; } } else { newPTypes[j] = ptypes[j]; } } advice.setBindingParameterTypes(newPTypes); } } munger.setDeclaringType(this); l.add(munger); } } return l; } public List<ShadowMunger> getDeclaredShadowMungers() { return getDeclaredAdvice(); }
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public ResolvedMember[] getDeclaredJavaFields() { return filterInJavaVisible(getDeclaredFields()); } public ResolvedMember[] getDeclaredJavaMethods() { return filterInJavaVisible(getDeclaredMethods()); } private ResolvedMember[] filterInJavaVisible(ResolvedMember[] ms) { List<ResolvedMember> l = new ArrayList<ResolvedMember>(); for (int i = 0, len = ms.length; i < len; i++) { if (!ms[i].isAjSynthetic() && ms[i].getAssociatedShadowMunger() == null) { l.add(ms[i]); } } return l.toArray(new ResolvedMember[l.size()]); } public abstract ISourceContext getSourceContext(); public static final ResolvedType[] NONE = new ResolvedType[0]; public static final ResolvedType[] EMPTY_ARRAY = NONE; public static final Missing MISSING = new Missing(); public static ResolvedType makeArray(ResolvedType type, int dim) { if (dim == 0) { return type; } ResolvedType array = new ArrayReferenceType("[" + type.getSignature(), "[" + type.getErasureSignature(), type.getWorld(), type); return makeArray(array, dim - 1); } static class Primitive extends ResolvedType {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
private final int size; private final int index; Primitive(String signature, int size, int index) { super(signature, null); this.size = size; this.index = index; this.typeKind = TypeKind.PRIMITIVE; } @Override public final int getSize() { return size; } @Override public final int getModifiers() { return Modifier.PUBLIC | Modifier.FINAL; } @Override public final boolean isPrimitiveType() { return true; } public boolean hasAnnotation(UnresolvedType ofType) { return false; } @Override public final boolean isAssignableFrom(ResolvedType other) { if (!other.isPrimitiveType()) {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
if (!world.isInJava5Mode()) { return false; } return validBoxing.contains(this.getSignature() + other.getSignature()); } return assignTable[((Primitive) other).index][index]; } @Override public final boolean isAssignableFrom(ResolvedType other, boolean allowMissing) { return isAssignableFrom(other); } @Override public final boolean isCoerceableFrom(ResolvedType other) { if (this == other) { return true; } if (!other.isPrimitiveType()) { return false; } if (index > 6 || ((Primitive) other).index > 6) { return false; } return true; } @Override public ResolvedType resolve(World world) { if (this.world != world) { throw new IllegalStateException(); } this.world = world;
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
return super.resolve(world); } @Override public final boolean needsNoConversionFrom(ResolvedType other) { if (!other.isPrimitiveType()) { return false; } return noConvertTable[((Primitive) other).index][index]; } private static final boolean[][] assignTable = { { true, true, true, true, true, true, true, false, false }, { false, true, true, true, true, true, false, false, false }, { false, false, true, false, false, false, false, false, false }, { false, false, true, true, false, false, false, false, false }, { false, false, true, true, true, true, false, false, false }, { false, false, true, true, false, true, false, false, false }, { false, false, true, true, true, true, true, false, false }, { false, false, false, false, false, false, false, true, false }, { false, false, false, false, false, false, false, false, true }, }; private static final boolean[][] noConvertTable = { { true, true, false, false, true, false, true, false, false }, { false, true, false, false, true, false, false, false, false }, { false, false, true, false, false, false, false, false, false }, { false, false, false, true, false, false, false, false, false }, { false, false, false, false, true, false, false, false, false }, { false, false, false, false, false, true, false, false, false }, { false, false, false, false, true, false, true, false, false },
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
{ false, false, false, false, false, false, false, true, false }, { false, false, false, false, false, false, false, false, true }, }; @Override public final ResolvedMember[] getDeclaredFields() { return ResolvedMember.NONE; } @Override public final ResolvedMember[] getDeclaredMethods() { return ResolvedMember.NONE; } @Override public final ResolvedType[] getDeclaredInterfaces() { return ResolvedType.NONE; } @Override public final ResolvedMember[] getDeclaredPointcuts() { return ResolvedMember.NONE; } @Override public final ResolvedType getSuperclass() { return null; } @Override public ISourceContext getSourceContext() { return null; } } static class Missing extends ResolvedType {
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
Missing() { super(MISSING_NAME, null); } @Override
374,745
Bug 374745 Performance regression in 1.6.12
null
resolved fixed
549d227
AspectJ
https://github.com/eclipse/org.aspectj
eclipse/org.aspectj
java
null
null
null
2012-03-23T23:57:10Z
2012-03-20T10:40:00Z
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
public final String getName() { return MISSING_NAME; } @Override public final boolean isMissing() { return true; } public boolean hasAnnotation(UnresolvedType ofType) { return false; } @Override public final ResolvedMember[] getDeclaredFields() { return ResolvedMember.NONE; } @Override public final ResolvedMember[] getDeclaredMethods() { return ResolvedMember.NONE; } @Override public final ResolvedType[] getDeclaredInterfaces() { return ResolvedType.NONE; } @Override public final ResolvedMember[] getDeclaredPointcuts() { return ResolvedMember.NONE; } @Override public final ResolvedType getSuperclass() { return null; }