本文整理汇总了Java中jdk.internal.org.objectweb.asm.Opcodes.T_LONG属性的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.T_LONG属性的具体用法?Java Opcodes.T_LONG怎么用?Java Opcodes.T_LONG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jdk.internal.org.objectweb.asm.Opcodes
的用法示例。
在下文中一共展示了Opcodes.T_LONG属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitIntInsn
@Override
public void visitIntInsn(final int opcode, final int operand) {
checkStartCode();
checkEndCode();
checkOpcode(opcode, 1);
switch (opcode) {
case Opcodes.BIPUSH:
checkSignedByte(operand, "Invalid operand");
break;
case Opcodes.SIPUSH:
checkSignedShort(operand, "Invalid operand");
break;
// case Constants.NEWARRAY:
default:
if (operand < Opcodes.T_BOOLEAN || operand > Opcodes.T_LONG) {
throw new IllegalArgumentException(
"Invalid operand (must be an array type code T_...): "
+ operand);
}
}
super.visitIntInsn(opcode, operand);
++insnCount;
}
示例2: arrayInsnOpcode
private int arrayInsnOpcode(byte tcode, int aaop) throws InternalError {
assert(aaop == Opcodes.AASTORE || aaop == Opcodes.AALOAD);
int xas;
switch (tcode) {
case Opcodes.T_BOOLEAN: xas = Opcodes.BASTORE; break;
case Opcodes.T_BYTE: xas = Opcodes.BASTORE; break;
case Opcodes.T_CHAR: xas = Opcodes.CASTORE; break;
case Opcodes.T_SHORT: xas = Opcodes.SASTORE; break;
case Opcodes.T_INT: xas = Opcodes.IASTORE; break;
case Opcodes.T_LONG: xas = Opcodes.LASTORE; break;
case Opcodes.T_FLOAT: xas = Opcodes.FASTORE; break;
case Opcodes.T_DOUBLE: xas = Opcodes.DASTORE; break;
case 0: xas = Opcodes.AASTORE; break;
default: throw new InternalError();
}
return xas - Opcodes.AASTORE + aaop;
}
示例3: newarray
public void newarray(final Type type) {
int typ;
switch (type.getSort()) {
case Type.BOOLEAN:
typ = Opcodes.T_BOOLEAN;
break;
case Type.CHAR:
typ = Opcodes.T_CHAR;
break;
case Type.BYTE:
typ = Opcodes.T_BYTE;
break;
case Type.SHORT:
typ = Opcodes.T_SHORT;
break;
case Type.INT:
typ = Opcodes.T_INT;
break;
case Type.FLOAT:
typ = Opcodes.T_FLOAT;
break;
case Type.LONG:
typ = Opcodes.T_LONG;
break;
case Type.DOUBLE:
typ = Opcodes.T_DOUBLE;
break;
default:
mv.visitTypeInsn(Opcodes.ANEWARRAY, type.getInternalName());
return;
}
mv.visitIntInsn(Opcodes.NEWARRAY, typ);
}
示例4: newArray
/**
* Generates the instruction to create a new array.
*
* @param type
* the type of the array elements.
*/
public void newArray(final Type type) {
int typ;
switch (type.getSort()) {
case Type.BOOLEAN:
typ = Opcodes.T_BOOLEAN;
break;
case Type.CHAR:
typ = Opcodes.T_CHAR;
break;
case Type.BYTE:
typ = Opcodes.T_BYTE;
break;
case Type.SHORT:
typ = Opcodes.T_SHORT;
break;
case Type.INT:
typ = Opcodes.T_INT;
break;
case Type.FLOAT:
typ = Opcodes.T_FLOAT;
break;
case Type.LONG:
typ = Opcodes.T_LONG;
break;
case Type.DOUBLE:
typ = Opcodes.T_DOUBLE;
break;
default:
typeInsn(Opcodes.ANEWARRAY, type);
return;
}
mv.visitIntInsn(Opcodes.NEWARRAY, typ);
}
示例5: arrayTypeCode
private byte arrayTypeCode(Wrapper elementType) {
switch (elementType) {
case BOOLEAN: return Opcodes.T_BOOLEAN;
case BYTE: return Opcodes.T_BYTE;
case CHAR: return Opcodes.T_CHAR;
case SHORT: return Opcodes.T_SHORT;
case INT: return Opcodes.T_INT;
case LONG: return Opcodes.T_LONG;
case FLOAT: return Opcodes.T_FLOAT;
case DOUBLE: return Opcodes.T_DOUBLE;
case OBJECT: return 0; // in place of Opcodes.T_OBJECT
default: throw new InternalError();
}
}
示例6: visitIntInsn
@Override
public void visitIntInsn(final int opcode, final int operand) {
switch (opcode) {
case Opcodes.BIPUSH:
iconst(operand);
break;
case Opcodes.SIPUSH:
iconst(operand);
break;
case Opcodes.NEWARRAY:
switch (operand) {
case Opcodes.T_BOOLEAN:
newarray(Type.BOOLEAN_TYPE);
break;
case Opcodes.T_CHAR:
newarray(Type.CHAR_TYPE);
break;
case Opcodes.T_BYTE:
newarray(Type.BYTE_TYPE);
break;
case Opcodes.T_SHORT:
newarray(Type.SHORT_TYPE);
break;
case Opcodes.T_INT:
newarray(Type.INT_TYPE);
break;
case Opcodes.T_FLOAT:
newarray(Type.FLOAT_TYPE);
break;
case Opcodes.T_LONG:
newarray(Type.LONG_TYPE);
break;
case Opcodes.T_DOUBLE:
newarray(Type.DOUBLE_TYPE);
break;
default:
throw new IllegalArgumentException();
}
break;
default:
throw new IllegalArgumentException();
}
}