aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-01-17 00:03:37 +0000
committeraclement <aclement>2008-01-17 00:03:37 +0000
commit5b0ec373124a0615254d8e4f0b9e637f019f555d (patch)
treed600fefd35ca422b7a1634626c5156b4aec9f055
parent1f45da2efa026604b1a9ae48057054b075df0f1c (diff)
downloadaspectj-5b0ec373124a0615254d8e4f0b9e637f019f555d.tar.gz
aspectj-5b0ec373124a0615254d8e4f0b9e637f019f555d.zip
AspectJ6: picking up compiler interface changes
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java
index 4df756a19..4cc0060b9 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/AspectClinit.java
@@ -16,12 +16,17 @@ package org.aspectj.ajdt.internal.compiler.ast;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Clinit;
+import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.aspectj.org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
import org.aspectj.org.eclipse.jdt.internal.compiler.codegen.CodeStream;
import org.aspectj.org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel;
import org.aspectj.org.eclipse.jdt.internal.compiler.codegen.Label;
+import org.aspectj.org.eclipse.jdt.internal.compiler.impl.Constant;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
+import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
public class AspectClinit extends Clinit {
private boolean hasPre, hasPost;
@@ -29,7 +34,9 @@ public class AspectClinit extends Clinit {
public AspectClinit(Clinit old, CompilationResult compilationResult, boolean hasPre, boolean hasPost, FieldBinding initFailureField) {
super(compilationResult);
- this.needFreeReturn = old.needFreeReturn;
+ // CHECK do we need all the bits or just the needfreereturn bit?
+ // if ((old.bits & ASTNode.NeedFreeReturn)!=0) this.bits |= ASTNode.NeedFreeReturn;
+ this.bits = old.bits;
this.sourceEnd = old.sourceEnd;
this.sourceStart = old.sourceStart;
this.declarationSourceEnd = old.declarationSourceEnd;
@@ -47,7 +54,8 @@ public class AspectClinit extends Clinit {
CodeStream codeStream)
{
if (initFailureField != null) {
- handlerLabel = new ExceptionLabel(codeStream, classScope.getJavaLangThrowable());
+ handlerLabel = new ExceptionLabel(codeStream, classScope.getJavaLangThrowable());
+ handlerLabel.placeStart();
}
if (hasPre) {
@@ -79,10 +87,12 @@ public class AspectClinit extends Clinit {
// Changes to this exception handling code may require changes to
// BcelClassWeaver.isInitFailureHandler()
handlerLabel.placeEnd();
- Label endLabel = new Label(codeStream);
+ BranchLabel endLabel = new BranchLabel(codeStream);
codeStream.goto_(endLabel);
handlerLabel.place();
codeStream.astore_0(); // Bug #52394
+ // CHECK THIS...
+ codeStream.addVariable(new LocalVariableBinding("caughtException".toCharArray(),initFailureField.type,ClassFileConstants.AccPrivate,false));
codeStream.aload_0();
codeStream.putstatic(initFailureField);
endLabel.place();