aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/verifier-src/org/aspectj/apache/bcel
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2022-08-13 22:46:45 +0200
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-08-13 23:07:49 +0200
commit208eafba3245da6e3eed1b22269e13c6f9920544 (patch)
treea932fcd881c3923e795e8adb885ffc48427fb6ef /bcel-builder/verifier-src/org/aspectj/apache/bcel
parentaeb598cda1165c076eae78c12b9a69405b5d59a2 (diff)
downloadaspectj-208eafba3245da6e3eed1b22269e13c6f9920544.tar.gz
aspectj-208eafba3245da6e3eed1b22269e13c6f9920544.zip
Improve condy (constant dynamic) support
Relates to #170. Fixes the "Unknown constant type 17" problem. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'bcel-builder/verifier-src/org/aspectj/apache/bcel')
-rw-r--r--bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/DescendingVisitor.java10
-rw-r--r--bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/EmptyClassVisitor.java8
2 files changed, 12 insertions, 6 deletions
diff --git a/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/DescendingVisitor.java b/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/DescendingVisitor.java
index 3335f1ea8..531af4d05 100644
--- a/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/DescendingVisitor.java
+++ b/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/DescendingVisitor.java
@@ -381,13 +381,17 @@ public class DescendingVisitor implements ClassVisitor {
}
@Override
- public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj) {
- throw new IllegalStateException("nyi");
+ public void visitConstantInvokeDynamic(ConstantInvokeDynamic constant) {
+ stack.push(constant);
+ constant.accept(visitor);
+ stack.pop();
}
@Override
public void visitConstantDynamic(ConstantDynamic obj) {
- throw new IllegalStateException("nyi");
+ stack.push(obj);
+ obj.accept(visitor);
+ stack.pop();
}
@Override
diff --git a/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/EmptyClassVisitor.java b/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/EmptyClassVisitor.java
index 1ca901650..0873dee5c 100644
--- a/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/EmptyClassVisitor.java
+++ b/bcel-builder/verifier-src/org/aspectj/apache/bcel/verifier/EmptyClassVisitor.java
@@ -117,7 +117,7 @@ import org.aspectj.apache.bcel.classfile.annotation.RuntimeVisTypeAnnos;
*
* @see DescendingVisitor
* @version $Id: EmptyClassVisitor.java,v 1.3 2009/09/15 19:40:22 aclement Exp $
- *
+ *
*/
public class EmptyClassVisitor implements ClassVisitor {
protected EmptyClassVisitor() { }
@@ -149,6 +149,8 @@ public void visitConstantMethodType(ConstantMethodType obj) {}
@Override
public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj) {}
@Override
+public void visitConstantDynamic(ConstantDynamic obj) {}
+ @Override
public void visitConstantNameAndType(ConstantNameAndType obj) {}
@Override
public void visitConstantPool(ConstantPool obj) {}
@@ -214,7 +216,7 @@ public void visitRuntimeInvisibleParameterAnnotations(RuntimeInvisParamAnnos att
public void visitAnnotationDefault(AnnotationDefault attribute) {}
@Override
public void visitLocalVariableTypeTable(LocalVariableTypeTable obj) {}
-
+
// J8:
@Override
public void visitRuntimeVisibleTypeAnnotations(RuntimeVisTypeAnnos attribute) {}
@@ -235,5 +237,5 @@ public void visitModuleMainClass(ModuleMainClass attribute) {}
@Override public void visitConstantDynamic(ConstantDynamic attribute) {}
@Override public void visitNestHost(NestHost attribute) { }
@Override public void visitNestMembers(NestMembers attribute) { }
-
+
}