Available Methods
- ASM5 ( )
- ASM7 ( )
- ACC_STATIC
- ACC_PUBLIC
- ACC_PRIVATE
- ASM6 ( )
- INVOKESTATIC
- ACC_ABSTRACT
- ASM4 ( )
- ACC_PROTECTED
- ACC_INTERFACE
- ACC_SYNTHETIC
- ACC_FINAL
- RETURN
- INVOKEVIRTUAL
- ASM8 ( )
- INVOKEINTERFACE
- INVOKESPECIAL
- IRETURN
- ICONST_0 ( )
- PUTFIELD
- GETSTATIC
- GETFIELD
- DLOAD
- ACC_NATIVE
- ALOAD
- SIPUSH
- ICONST_2 ( )
- ILOAD
- ICONST_3 ( )
- LSTORE
- IFNONNULL
- ISTORE
- ICONST_4 ( )
- F_NEW
- ICONST_1 ( )
- DRETURN
- ACC_ENUM
- IF_ICMPEQ
- DCONST_1 ( )
- DCONST_0 ( )
- BIPUSH
- LMUL
- PUTSTATIC
- FSTORE
- DSTORE
- FRETURN
- DADD
- SALOAD
- ICONST_5 ( )
- DUP
- LLOAD
- ATHROW
- FLOAD
- F_SAME
- DASTORE
- ACC_DEPRECATED
- GOTO
- ASTORE
- DUP2 ( )
- ACC_BRIDGE
- T_BOOLEAN
- LRETURN
- IOR
- ACC_VOLATILE
- DALOAD
- LXOR
- NEWARRAY
- DNEG
- T_BYTE
- MULTIANEWARRAY
- T_CHAR
- IFEQ
- NOP
- I2S ( )
- IF_ICMPGE
- LREM
- INEG
- ARETURN
- T_INT
- T_FLOAT
- FCONST_1 ( )
- F_SAME1 ( )
- NEW
- LCMP
- FNEG
- LCONST_1 ( )
- LOR
- POP2 ( )
- IMUL
- FCONST_2 ( )
- DCMPL
- FCONST_0 ( )
- DUP_X1 ( )
- LDC
- F_APPEND
- ICONST_M1 ( )
- LSHR
- IF_ICMPLE
- LALOAD
- FREM
- ACC_ANNOTATION
- IF_ACMPEQ
- BALOAD
- ACC_SYNCHRONIZED
- BASTORE
- FALOAD
- AALOAD
- LSHL
- T_SHORT
- ISUB
- LOOKUPSWITCH
- IFNE
- IALOAD
- H_INVOKEINTERFACE
- LDIV
- ISHR
- ACC_STRICT
- LONG
- IF_ICMPLT
- LADD
- CHECKCAST
- IFLT
- LAND
- FMUL
- IF_ICMPGT
- LCONST_0 ( )
- T_DOUBLE
- FADD
- F_CHOP
- IFLE
- H_PUTSTATIC
- DCMPG
- F2L ( )
- IDIV
- POP
- ARRAYLENGTH
- DUP2_X1 ( )
- DDIV
- L2D ( )
- FCMPL
- ANEWARRAY
- FASTORE
- MONITOREXIT
- F_FULL
- IF_ICMPNE
- LSUB
- FSUB
- ISHL
- H_INVOKEVIRTUAL
- IXOR
- ACC_VARARGS
- MONITORENTER
- IAND
- DMUL
- F2I ( )
- DREM
- DSUB
- V1_7 ( )
- DUP2_X2 ( )
- T_LONG
- IREM
- ACC_SUPER
- ACONST_NULL
- V1_8 ( )
- H_GETFIELD
- FCMPG
- IFNULL
- ACC_TRANSIENT
- H_INVOKESTATIC
- IADD
- IASTORE
- D2I ( )
- AASTORE
- UNINITIALIZED_THIS
- LUSHR
- SWAP
- H_GETSTATIC
- INTEGER
- TOP
- ACC_TRANSITIVE
- D2F ( )
- LNEG
- IFGE
- CASTORE
- CALOAD
- JSR
- F2D ( )
- L2F ( )
- D2L ( )
- LASTORE
- I2C ( )
- H_NEWINVOKESPECIAL
- IFGT
- NULL
- I2F ( )
- L2I ( )
- INVOKEDYNAMIC
- V1_5 ( )
- IUSHR
- DUP_X2 ( )
- SASTORE
- SOURCE_DEPRECATED
- V1_6 ( )
- FDIV
- IINC
- ACC_MODULE
- TABLESWITCH
- RET
- IF_ACMPNE
- H_INVOKESPECIAL
- I2L ( )
- V1_3 ( )
- V1_1 ( )
- DOUBLE
- H_PUTFIELD
- V1_2 ( )
- INSTANCEOF
- I2B ( )
- ACC_MANDATED
- V1_4 ( )
- V11 ( )
- SOURCE_MASK
Related Classes
- java.util.Arrays
- java.io.File
- java.util.Collections
- java.io.InputStream
- java.util.Iterator
- java.lang.reflect.Method
- java.util.LinkedList
- java.util.concurrent.atomic.AtomicInteger
- java.lang.reflect.Modifier
- com.google.common.collect.ImmutableList
- java.util.ListIterator
- java.util.jar.JarEntry
- org.objectweb.asm.ClassReader
- org.objectweb.asm.MethodVisitor
- org.objectweb.asm.ClassWriter
- org.apache.commons.lang3.Validate
- org.objectweb.asm.Type
- org.objectweb.asm.ClassVisitor
- org.objectweb.asm.Label
- org.objectweb.asm.FieldVisitor
- org.objectweb.asm.tree.ClassNode
- org.objectweb.asm.tree.MethodNode
- org.objectweb.asm.AnnotationVisitor
- org.objectweb.asm.tree.AbstractInsnNode
- org.objectweb.asm.tree.MethodInsnNode
Java Code Examples for org.objectweb.asm.Opcodes#DUP_X1
The following examples show how to use
org.objectweb.asm.Opcodes#DUP_X1 .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AllocationMethodAdapter.java From allocation-instrumenter with Apache License 2.0 | 6 votes |
private void invokeRecordAllocation(String typeName) { Matcher matcher = namePattern.matcher(typeName); if (matcher.find()) { typeName = matcher.group(1); } // stack: ... count newobj super.visitInsn(Opcodes.DUP_X1); // -> stack: ... newobj count newobj super.visitLdcInsn(typeName); // -> stack: ... newobj count newobj typename super.visitInsn(Opcodes.SWAP); // -> stack: ... newobj count typename newobj super.visitMethodInsn( Opcodes.INVOKESTATIC, recorderClass, recorderMethod, RECORDER_SIGNATURE, false); // -> stack: ... newobj }
Example 2
Source File: TypeUtils.java From maple-ir with GNU General Public License v3.0 | 5 votes |
public static int getDupXOpcode(Type dType, Type bType) { if (dType.getSize() == 1 && bType.getSize() == 1) { return Opcodes.DUP_X1; } else if (dType.getSize() == 1 && bType.getSize() == 2) { return Opcodes.DUP_X2; } else if (dType.getSize() == 2 && bType.getSize() == 1) { return Opcodes.DUP2_X1; } else if (dType.getSize() == 2 && bType.getSize() == 2) { return Opcodes.DUP2_X2; } else { throw new IllegalArgumentException(dType.toString() + " " + bType.toString()); } }
Example 3
Source File: AllocationMethodAdapter.java From allocation-instrumenter with Apache License 2.0 | 4 votes |
void calculateArrayLengthAndDispatch(String typeName, int dimCount) { // Since the dimensions of the array are not known at instrumentation // time, we take the created multi-dimensional array and peel off nesting // levels from the left. For each nesting layer we probe the array length // and accumulate a partial product which we can then feed the recording // function. // below we note the partial product of dimensions 1 to X-1 as productToX // (so productTo1 == 1 == no dimensions yet). We denote by aref0 the // array reference at the current nesting level (the containing aref's [0] // element). If we hit a level whose arraylength is 0 or whose // reference is null, there's no point continuing, so we shortcut // out. // This approach works pretty well when you create a new array with the // newarray bytecodes. You can also create a new array by cloning an // existing array; an existing multidimensional array might have had some // of its [0] elements nulled out. We currently deal with this by bailing // out, but arguably we should do something more principled (like calculate // the size of the multidimensional array from scratch if you are using // clone()). // TODO(java-platform-team): Do something about modified multidimensional // arrays and clone(). Label zeroDimension = new Label(); super.visitInsn(Opcodes.DUP); // -> stack: ... origaref aref0 super.visitLdcInsn(1); // -> stack: ... origaref aref0 productTo1 for (int i = 0; i < dimCount; ++i) { // pre: stack: ... origaref aref0 productToI super.visitInsn(Opcodes.SWAP); // -> stack: ... origaref productToI aref super.visitInsn(Opcodes.DUP); Label nonNullDimension = new Label(); // -> stack: ... origaref productToI aref aref super.visitJumpInsn(Opcodes.IFNONNULL, nonNullDimension); // -> stack: ... origaref productToI aref super.visitInsn(Opcodes.SWAP); // -> stack: ... origaref aref productToI super.visitJumpInsn(Opcodes.GOTO, zeroDimension); super.visitLabel(nonNullDimension); // -> stack: ... origaref productToI aref super.visitInsn(Opcodes.DUP_X1); // -> stack: ... origaref aref0 productToI aref super.visitInsn(Opcodes.ARRAYLENGTH); // -> stack: ... origaref aref0 productToI dimI Label nonZeroDimension = new Label(); super.visitInsn(Opcodes.DUP); // -> stack: ... origaref aref0 productToI dimI dimI super.visitJumpInsn(Opcodes.IFNE, nonZeroDimension); // -> stack: ... origaref aref0 productToI dimI super.visitInsn(Opcodes.POP); // -> stack: ... origaref aref0 productToI super.visitJumpInsn(Opcodes.GOTO, zeroDimension); super.visitLabel(nonZeroDimension); // -> stack: ... origaref aref0 productToI max(dimI,1) super.visitInsn(Opcodes.IMUL); // -> stack: ... origaref aref0 productTo{I+1} if (i < dimCount - 1) { super.visitInsn(Opcodes.SWAP); // -> stack: ... origaref productTo{I+1} aref0 super.visitInsn(Opcodes.ICONST_0); // -> stack: ... origaref productTo{I+1} aref0 0 super.visitInsn(Opcodes.AALOAD); // -> stack: ... origaref productTo{I+1} aref0' super.visitInsn(Opcodes.SWAP); } // post: stack: ... origaref aref0 productTo{I+1} } super.visitLabel(zeroDimension); super.visitInsn(Opcodes.SWAP); // -> stack: ... origaref product aref0 super.visitInsn(Opcodes.POP); // -> stack: ... origaref product super.visitInsn(Opcodes.SWAP); // -> stack: ... product origaref invokeRecordAllocation(typeName); }