Pārlūkot izejas kodu

Upgrade to JDT 1.8.0 compiler

tags/V1_8_0RC1
Andy Clement pirms 10 gadiem
vecāks
revīzija
bedb85ee87

+ 3
- 3
loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java Parādīt failu



private boolean initialized; private boolean initialized;


private List m_dumpTypePattern = new ArrayList();
private List<TypePattern> m_dumpTypePattern = new ArrayList<TypePattern>();
private boolean m_dumpBefore = false; private boolean m_dumpBefore = false;
private boolean dumpDirPerClassloader = false; private boolean dumpDirPerClassloader = false;


// TODO AV - optimize for className.startWith only // TODO AV - optimize for className.startWith only
ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true); ResolvedType classInfo = weaver.getWorld().resolve(UnresolvedType.forName(className), true);
// dump // dump
for (Iterator iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = (TypePattern) iterator.next();
for (Iterator<TypePattern> iterator = m_dumpTypePattern.iterator(); iterator.hasNext();) {
TypePattern typePattern = iterator.next();
if (typePattern.matchesStatically(classInfo)) { if (typePattern.matchesStatically(classInfo)) {
// dump match // dump match
return true; return true;

+ 2
- 2
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java Parādīt failu

} }
} }


public void duplicateMethodInType(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, boolean equalParameters, int severity) {
public void duplicateMethodInType(AbstractMethodDeclaration methodDecl, boolean equalParameters, int severity) {
if (new String(methodDecl.selector).startsWith("ajc$interMethod")) { if (new String(methodDecl.selector).startsWith("ajc$interMethod")) {
// this is an ITD clash and will be reported in another way by AspectJ (173602) // this is an ITD clash and will be reported in another way by AspectJ (173602)
return; return;
} }
super.duplicateMethodInType(type, methodDecl, equalParameters, severity);
super.duplicateMethodInType(methodDecl, equalParameters, severity);
} }


// pr246393 - if we are going to complain about privileged, we clearly don't know what is going on, so don't // pr246393 - if we are going to complain about privileged, we clearly don't know what is going on, so don't

+ 7
- 0
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.java Parādīt failu

import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryMethod; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryNestedType; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryNestedType;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryType; import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryType;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;


/** /**
* Used to determine if a type has structurally changed during incremental compilation. At the end of compilation we create one of * Used to determine if a type has structurally changed during incremental compilation. At the end of compilation we create one of
IBinaryMethod[] binMethods; IBinaryMethod[] binMethods;
IBinaryNestedType[] memberTypes; IBinaryNestedType[] memberTypes;
IBinaryAnnotation[] annotations; IBinaryAnnotation[] annotations;
IBinaryTypeAnnotation[] typeAnnotations;


public CompactTypeStructureRepresentation(ClassFileReader cfr, boolean isAspect) { public CompactTypeStructureRepresentation(ClassFileReader cfr, boolean isAspect) {
// references and which were real declarations // references and which were real declarations
this.memberTypes = cfr.getMemberTypes(isAspect); this.memberTypes = cfr.getMemberTypes(isAspect);
this.annotations = cfr.getAnnotations(); this.annotations = cfr.getAnnotations();
this.typeAnnotations = cfr.getTypeAnnotations();
this.sourceName = cfr.getSourceName(); this.sourceName = cfr.getSourceName();
this.className = cfr.getName(); // slashes... this.className = cfr.getName(); // slashes...
this.modifiers = cfr.getModifiers(); this.modifiers = cfr.getModifiers();
return sourceName; return sourceName;
} }


public IBinaryTypeAnnotation[] getTypeAnnotations() {
return typeAnnotations;
}

} }

Binārs
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip Parādīt failu


Binārs
org.eclipse.jdt.core/jdtcore-for-aspectj.jar Parādīt failu


+ 2
- 2
tests/java5/ataspectj/ataspectj/aop-dumpproxy.xml Parādīt failu

<aspect name="ataspectj.EmptyAspect"/> <aspect name="ataspectj.EmptyAspect"/>
</aspects> </aspects>
<weaver> <weaver>
<!--
<dump within="*..*Proxy*" beforeandafter="true"/> <dump within="*..*Proxy*" beforeandafter="true"/>
-->
<!--
<dump within="*Proxy*" beforeandafter="true"/> <dump within="*Proxy*" beforeandafter="true"/>
-->
</weaver> </weaver>
</aspectj> </aspectj>

+ 2
- 2
tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java Parādīt failu



// The working directory is different because this test must be forked // The working directory is different because this test must be forked
File dir = new File("../tests/java5/ataspectj"); File dir = new File("../tests/java5/ataspectj");
File f = new File(dir, "_ajdump/_before");
File f = new File(dir, "_ajdump/_before/com/sun/proxy");
CountingFilenameFilter cff = new CountingFilenameFilter(".class"); CountingFilenameFilter cff = new CountingFilenameFilter(".class");
f.listFiles(cff); f.listFiles(cff);
assertEquals("Expected dump file in " + f.getAbsolutePath(), 1, cff.getCount()); assertEquals("Expected dump file in " + f.getAbsolutePath(), 1, cff.getCount());
f = new File(dir, "_ajdump");
f = new File(dir, "_ajdump/com/sun/proxy");
cff = new CountingFilenameFilter(".class"); cff = new CountingFilenameFilter(".class");
f.listFiles(cff); f.listFiles(cff);
assertEquals(1, cff.getCount()); assertEquals(1, cff.getCount());

Notiek ielāde…
Atcelt
Saglabāt