Class CodeBlock
java.lang.Object
me.qmx.jitescript.CodeBlock
- All Implemented Interfaces:
org.objectweb.asm.Opcodes
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<VisibleAnnotation> private intprivate final org.objectweb.asm.tree.InsnListprivate final List<org.objectweb.asm.tree.LocalVariableNode> private booleanprivate final List<org.objectweb.asm.tree.TryCatchBlockNode> Fields inherited from interface org.objectweb.asm.Opcodes
AALOAD, AASTORE, ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_DEPRECATED, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_MANDATED, ACC_MODULE, ACC_NATIVE, ACC_OPEN, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_RECORD, ACC_STATIC, ACC_STATIC_PHASE, ACC_STRICT, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_TRANSITIVE, ACC_VARARGS, ACC_VOLATILE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASM10_EXPERIMENTAL, ASM4, ASM5, ASM6, ASM7, ASM8, ASM9, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DOUBLE, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F_APPEND, F_CHOP, F_FULL, F_NEW, F_SAME, F_SAME1, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, FLOAT, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, H_GETFIELD, H_GETSTATIC, H_INVOKEINTERFACE, H_INVOKESPECIAL, H_INVOKESTATIC, H_INVOKEVIRTUAL, H_NEWINVOKESPECIAL, H_PUTFIELD, H_PUTSTATIC, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INTEGER, INVOKEDYNAMIC, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDIV, LLOAD, LMUL, LNEG, LONG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, NULL, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SOURCE_DEPRECATED, SOURCE_MASK, SWAP, T_BOOLEAN, T_BYTE, T_CHAR, T_DOUBLE, T_FLOAT, T_INT, T_LONG, T_SHORT, TABLESWITCH, TOP, UNINITIALIZED_THIS, V_PREVIEW, V1_1, V1_2, V1_3, V1_4, V1_5, V1_6, V1_7, V1_8, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V9 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaaload()aastore()addAll(org.objectweb.asm.tree.InsnList insnList) addAnnotation(VisibleAnnotation annotation) aload(int index) aloadMany(int... indices) Short-hand for specifying a set of aloadsannotation(Class<?> type) aprintln()areturn()intarity()astore(int index) athrow()baload()bastore()bipush(int byteValue) caload()castore()d2f()d2i()d2l()dadd()daload()dastore()dcmpg()dcmpl()ddiv()dload(int index) dmul()dneg()drem()dreturn()dstore(int index) dsub()dup()dup_x1()dup_x2()dup2()dup2_x1()dup2_x2()f2d()f2i()f2l()fadd()faload()fastore()fcmpg()fcmpl()fdiv()fload(int index) fmul()fneg()frame_same(Object... stackArguments) adds a compressed frame to the stackfrem()freturn()fstore(int index) fsub()org.objectweb.asm.tree.InsnListList<org.objectweb.asm.tree.LocalVariableNode> List<org.objectweb.asm.tree.TryCatchBlockNode> go_to(org.objectweb.asm.tree.LabelNode label) i2b()i2c()i2d()i2f()i2l()i2s()iadd()iaload()iand()iastore()iconst_0()iconst_1()iconst_2()iconst_3()iconst_4()iconst_5()idiv()if_acmpeq(org.objectweb.asm.tree.LabelNode jumpLabel) if_acmpne(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmpeq(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmpge(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmpgt(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmple(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmplt(org.objectweb.asm.tree.LabelNode jumpLabel) if_icmpne(org.objectweb.asm.tree.LabelNode jumpLabel) ifeq(org.objectweb.asm.tree.LabelNode jumpLabel) iffalse(org.objectweb.asm.tree.LabelNode jumpLabel) ifge(org.objectweb.asm.tree.LabelNode jumpLabel) ifgt(org.objectweb.asm.tree.LabelNode jumpLabel) ifle(org.objectweb.asm.tree.LabelNode jumpLabel) iflt(org.objectweb.asm.tree.LabelNode jumpLabel) ifne(org.objectweb.asm.tree.LabelNode jumpLabel) ifnonnull(org.objectweb.asm.tree.LabelNode jumpLabel) ifnull(org.objectweb.asm.tree.LabelNode jumpLabel) iftrue(org.objectweb.asm.tree.LabelNode jumpLabel) iinc(int varIndex, int increment) iload(int index) imul()ineg()instance_of(String typeDesc) invokedynamic(String name, String descriptor, org.objectweb.asm.Handle bootstrapMethod, Object... bootstrapArguments) invokeinterface(String className, String methodName, String methodDesc) invokespecial(String className, String methodName, String methodDesc) invokestatic(String className, String methodName, String methodDesc) invokevirtual(String className, String methodName, String methodDesc) ior()iprintln()irem()ireturn()ishl()ishr()istore(int index) isub()iushr()ixor()jsr(org.objectweb.asm.tree.LabelNode branch) l2d()l2f()l2i()label(org.objectweb.asm.tree.LabelNode labelNode) ladd()laload()land()lastore()lcmp()lconst_0()ldiv()line(int line) line(int line, org.objectweb.asm.tree.LabelNode label) lload(int index) lmul()lneg()lookupswitch(org.objectweb.asm.tree.LabelNode defaultHandler, int[] keys, org.objectweb.asm.tree.LabelNode[] handlers) lor()lrem()lreturn()lshl()lshr()lstore(int index) lsub()lushr()lxor()multianewarray(String arrayDesc, int dims) newarray(int size) static CodeBlockstatic CodeBlocknewCodeBlock(int arity) static CodeBlocknewCodeBlock(CodeBlock block) nop()pop()pop2()pushBoolean(boolean bool) pushInt(int value) ret(int value) booleanreturns()saload()sastore()sipush(int shortValue) swap()swap2()tableswitch(int min, int max, org.objectweb.asm.tree.LabelNode defaultLabel, org.objectweb.asm.tree.LabelNode[] cases) trycatch(org.objectweb.asm.tree.LabelNode scopeStart, org.objectweb.asm.tree.LabelNode scopeEnd, org.objectweb.asm.tree.LabelNode handler, String exceptionType) visitFieldInsn(int opcode, String className, String fieldName, String fieldDesc) visitFrame(int opcode, int nrLocals, Object[] localTypes, int nrStackElements, Object[] stackElements) visitIincInsn(int varIndex, int increment) visitInsn(int opcode) visitInsnNode(int opcode, int operand) visitIntInsn(int opcode, int operand) visitInvokeDynamicInsn(String name, String desc, org.objectweb.asm.Handle bootstrapMethod, Object... bootstrapArguments) visitJumpInsn(int opcode, org.objectweb.asm.tree.LabelNode node) visitLabel(org.objectweb.asm.Label label) visitLdcInsn(Object value) visitLineNumber(int lineNumber, org.objectweb.asm.tree.LabelNode start) visitLocalVariable(String varName, String varDesc, String signature, org.objectweb.asm.tree.LabelNode scopeStart, org.objectweb.asm.tree.LabelNode scopeEnd, int varIndex) visitLookupSwitchInsn(org.objectweb.asm.tree.LabelNode defaultHandler, int[] keys, org.objectweb.asm.tree.LabelNode[] handlers) visitMethodInsn(int opcode, String className, String methodName, String methodDesc) visitMultiANewArrayInsn(String desc, int dims) visitTableSwitchInsn(int min, int max, org.objectweb.asm.tree.LabelNode defaultHandler, org.objectweb.asm.tree.LabelNode[] handlers) visitTryCatchBlock(org.objectweb.asm.tree.LabelNode scopeStart, org.objectweb.asm.tree.LabelNode scopeEnd, org.objectweb.asm.tree.LabelNode handler, String exceptionType) visitTypeInsn(int opcode, String desc)
-
Field Details
-
instructionList
private final org.objectweb.asm.tree.InsnList instructionList -
tryCatchBlockList
-
localVariableList
-
annotations
-
arity
private int arity -
returns
private boolean returns
-
-
Constructor Details
-
CodeBlock
public CodeBlock() -
CodeBlock
-
CodeBlock
public CodeBlock(int arity)
-
-
Method Details
-
newCodeBlock
-
newCodeBlock
-
newCodeBlock
-
aloadMany
Short-hand for specifying a set of aloads- Parameters:
indices- list of aloads you want
-
aload
-
iload
-
lload
-
fload
-
dload
-
astore
-
istore
-
lstore
-
fstore
-
dstore
-
ldc
-
bipush
-
sipush
-
pushInt
-
pushBoolean
-
invokestatic
-
invokespecial
-
invokevirtual
-
invokeinterface
-
invokedynamic
-
aprintln
-
iprintln
-
areturn
-
ireturn
-
freturn
-
lreturn
-
dreturn
-
newobj
-
dup
-
swap
-
swap2
-
getstatic
-
putstatic
-
getfield
-
putfield
-
voidreturn
-
anewarray
-
multianewarray
-
newarray
-
iconst_m1
-
iconst_0
-
iconst_1
-
iconst_2
-
iconst_3
-
iconst_4
-
iconst_5
-
lconst_0
-
aconst_null
-
label
-
nop
-
pop
-
pop2
-
arrayload
-
arraystore
-
iarrayload
-
barrayload
-
barraystore
-
aaload
-
aastore
-
iaload
-
iastore
-
laload
-
lastore
-
baload
-
bastore
-
saload
-
sastore
-
caload
-
castore
-
faload
-
fastore
-
daload
-
dastore
-
fcmpl
-
fcmpg
-
dcmpl
-
dcmpg
-
dup_x2
-
dup_x1
-
dup2_x2
-
dup2_x1
-
dup2
-
trycatch
-
trycatch
-
go_to
-
lookupswitch
public CodeBlock lookupswitch(org.objectweb.asm.tree.LabelNode defaultHandler, int[] keys, org.objectweb.asm.tree.LabelNode[] handlers) -
athrow
-
instance_of
-
ifeq
-
iffalse
-
ifne
-
iftrue
-
if_acmpne
-
if_acmpeq
-
if_icmple
-
if_icmpgt
-
if_icmplt
-
if_icmpne
-
if_icmpeq
-
if_icmpge
-
checkcast
-
line
-
line
-
ifnonnull
-
ifnull
-
iflt
-
ifle
-
ifgt
-
ifge
-
arraylength
-
ishr
-
ishl
-
iushr
-
lshr
-
lshl
-
lushr
-
lcmp
-
iand
-
ior
-
ixor
-
land
-
lor
-
lxor
-
iadd
-
ladd
-
fadd
-
dadd
-
isub
-
lsub
-
fsub
-
dsub
-
idiv
-
irem
-
ineg
-
i2d
-
i2l
-
i2f
-
i2s
-
i2c
-
i2b
-
ldiv
-
lrem
-
lneg
-
l2d
-
l2i
-
l2f
-
fdiv
-
frem
-
fneg
-
f2d
-
f2i
-
f2l
-
ddiv
-
drem
-
dneg
-
d2f
-
d2i
-
d2l
-
imul
-
lmul
-
fmul
-
dmul
-
iinc
-
monitorenter
-
monitorexit
-
jsr
-
ret
-
visitInsn
-
visitIntInsn
-
visitInsnNode
-
visitTypeInsn
-
visitFieldInsn
-
visitMethodInsn
-
visitInvokeDynamicInsn
-
visitJumpInsn
-
visitLabel
-
visitLdcInsn
-
visitIincInsn
-
visitTableSwitchInsn
public CodeBlock visitTableSwitchInsn(int min, int max, org.objectweb.asm.tree.LabelNode defaultHandler, org.objectweb.asm.tree.LabelNode[] handlers) -
visitLookupSwitchInsn
public CodeBlock visitLookupSwitchInsn(org.objectweb.asm.tree.LabelNode defaultHandler, int[] keys, org.objectweb.asm.tree.LabelNode[] handlers) -
visitMultiANewArrayInsn
-
visitTryCatchBlock
-
visitLocalVariable
-
visitLineNumber
-
tableswitch
public CodeBlock tableswitch(int min, int max, org.objectweb.asm.tree.LabelNode defaultLabel, org.objectweb.asm.tree.LabelNode[] cases) -
visitFrame
-
getInstructionList
public org.objectweb.asm.tree.InsnList getInstructionList() -
getTryCatchBlockList
-
getLocalVariableList
-
getAnnotations
-
frame_same
-
prepend
-
append
-
annotation
-
addAnnotation
-
addAll
-
arity
public int arity() -
returns
public boolean returns()
-