< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/BasicVerifier.java

Print this page
rev 47452 : imported patch jdk-new-asmv6.patch


  59 package jdk.internal.org.objectweb.asm.tree.analysis;
  60 
  61 import java.util.List;
  62 
  63 import jdk.internal.org.objectweb.asm.Type;
  64 import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
  65 import jdk.internal.org.objectweb.asm.tree.FieldInsnNode;
  66 import jdk.internal.org.objectweb.asm.tree.InvokeDynamicInsnNode;
  67 import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
  68 
  69 /**
  70  * An extended {@link BasicInterpreter} that checks that bytecode instructions
  71  * are correctly used.
  72  *
  73  * @author Eric Bruneton
  74  * @author Bing Ran
  75  */
  76 public class BasicVerifier extends BasicInterpreter {
  77 
  78     public BasicVerifier() {
  79         super(ASM5);
  80     }
  81 
  82     protected BasicVerifier(final int api) {
  83         super(api);
  84     }
  85 
  86     @Override
  87     public BasicValue copyOperation(final AbstractInsnNode insn,
  88             final BasicValue value) throws AnalyzerException {
  89         Value expected;
  90         switch (insn.getOpcode()) {
  91         case ILOAD:
  92         case ISTORE:
  93             expected = BasicValue.INT_VALUE;
  94             break;
  95         case FLOAD:
  96         case FSTORE:
  97             expected = BasicValue.FLOAT_VALUE;
  98             break;
  99         case LLOAD:




  59 package jdk.internal.org.objectweb.asm.tree.analysis;
  60 
  61 import java.util.List;
  62 
  63 import jdk.internal.org.objectweb.asm.Type;
  64 import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
  65 import jdk.internal.org.objectweb.asm.tree.FieldInsnNode;
  66 import jdk.internal.org.objectweb.asm.tree.InvokeDynamicInsnNode;
  67 import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
  68 
  69 /**
  70  * An extended {@link BasicInterpreter} that checks that bytecode instructions
  71  * are correctly used.
  72  *
  73  * @author Eric Bruneton
  74  * @author Bing Ran
  75  */
  76 public class BasicVerifier extends BasicInterpreter {
  77 
  78     public BasicVerifier() {
  79         super(ASM6);
  80     }
  81 
  82     protected BasicVerifier(final int api) {
  83         super(api);
  84     }
  85 
  86     @Override
  87     public BasicValue copyOperation(final AbstractInsnNode insn,
  88             final BasicValue value) throws AnalyzerException {
  89         Value expected;
  90         switch (insn.getOpcode()) {
  91         case ILOAD:
  92         case ISTORE:
  93             expected = BasicValue.INT_VALUE;
  94             break;
  95         case FLOAD:
  96         case FSTORE:
  97             expected = BasicValue.FLOAT_VALUE;
  98             break;
  99         case LLOAD:


< prev index next >