本文整理汇总了Java中org.objectweb.asm.Opcodes.IREM属性的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.IREM属性的具体用法?Java Opcodes.IREM怎么用?Java Opcodes.IREM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.objectweb.asm.Opcodes
的用法示例。
在下文中一共展示了Opcodes.IREM属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: opType
private static Type opType(int opcode) {
switch (opcode) {
case Opcodes.IADD:
case Opcodes.ISUB:
case Opcodes.IMUL:
case Opcodes.IDIV:
case Opcodes.IREM:
case Opcodes.INEG:
case Opcodes.ISHL:
case Opcodes.ISHR:
case Opcodes.IUSHR:
return Type.INT_TYPE;
case Opcodes.LADD:
case Opcodes.LSUB:
case Opcodes.LMUL:
case Opcodes.LDIV:
case Opcodes.LREM:
case Opcodes.LNEG:
case Opcodes.LSHL:
case Opcodes.LSHR:
case Opcodes.LUSHR:
return Type.LONG_TYPE;
case Opcodes.FADD:
case Opcodes.FSUB:
case Opcodes.FMUL:
case Opcodes.FDIV:
case Opcodes.FREM:
case Opcodes.FNEG:
return Type.FLOAT_TYPE;
case Opcodes.DADD:
case Opcodes.DSUB:
case Opcodes.DMUL:
case Opcodes.DDIV:
case Opcodes.DREM:
case Opcodes.DNEG:
return Type.DOUBLE_TYPE;
default:
throw new Unreachable("Unexpected opcode " + opcode);
}
}
示例2: canThrow
private boolean canThrow(AbstractInsnNode insn) {
switch (insn.getOpcode()) {
case Opcodes.AALOAD:
case Opcodes.AASTORE:
case Opcodes.ANEWARRAY:
// ARETURN does not throw in its dex image.
case Opcodes.ARRAYLENGTH:
case Opcodes.ATHROW:
case Opcodes.BALOAD:
case Opcodes.BASTORE:
case Opcodes.CALOAD:
case Opcodes.CASTORE:
case Opcodes.CHECKCAST:
case Opcodes.DALOAD:
case Opcodes.DASTORE:
// DRETURN does not throw in its dex image.
case Opcodes.FALOAD:
case Opcodes.FASTORE:
// FRETURN does not throw in its dex image.
case Opcodes.GETFIELD:
case Opcodes.GETSTATIC:
case Opcodes.IALOAD:
case Opcodes.IASTORE:
case Opcodes.IDIV:
case Opcodes.INSTANCEOF:
case Opcodes.INVOKEDYNAMIC:
case Opcodes.INVOKEINTERFACE:
case Opcodes.INVOKESPECIAL:
case Opcodes.INVOKESTATIC:
case Opcodes.INVOKEVIRTUAL:
case Opcodes.IREM:
// IRETURN does not throw in its dex image.
case Opcodes.LALOAD:
case Opcodes.LASTORE:
case Opcodes.LDIV:
case Opcodes.LREM:
// LRETURN does not throw in its dex image.
case Opcodes.MONITORENTER:
case Opcodes.MONITOREXIT:
case Opcodes.MULTIANEWARRAY:
case Opcodes.NEW:
case Opcodes.NEWARRAY:
case Opcodes.PUTFIELD:
case Opcodes.PUTSTATIC:
// RETURN does not throw in its dex image.
case Opcodes.SALOAD:
case Opcodes.SASTORE:
return true;
case Opcodes.LDC: {
// const-class and const-string* may throw in dex.
LdcInsnNode ldc = (LdcInsnNode) insn;
return ldc.cst instanceof String || ldc.cst instanceof Type;
}
default:
return false;
}
}