List of usage examples for org.objectweb.asm Opcodes DUP_X1
int DUP_X1
To view the source code for org.objectweb.asm Opcodes DUP_X1.
Click Source Link
From source file:org.jacoco.core.runtime.AbstractRuntimeData.java
License:Open Source License
/** * Generates the code that calls a {@link ControlFlowRuntimeData} instance through the * JRE API method {@link Object#equals(Object)}. The code pops a * {@link Object} instance from the stack and pushes the probe array of type * <code>boolean[]</code> on the operand stack. The generated code requires * a stack size of 6./*from www .j a v a 2 s . c om*/ * * @param classid * class identifier * @param classname * VM class name * @param probecount * probe count for this class * @param mv * visitor to emit generated code */ public static void generateAccessCall(final long classid, final String classname, final int probecount, final MethodVisitor mv) { // stack[0]: Ljava/lang/Object; generateArgumentArray(classid, classname, probecount, mv); // stack[1]: [Ljava/lang/Object; // stack[0]: Ljava/lang/Object; mv.visitInsn(Opcodes.DUP_X1); // stack[2]: [Ljava/lang/Object; // stack[1]: Ljava/lang/Object; // stack[0]: [Ljava/lang/Object; mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z", false); mv.visitInsn(Opcodes.POP); // stack[0]: [Ljava/lang/Object; mv.visitInsn(Opcodes.ICONST_0); mv.visitInsn(Opcodes.AALOAD); // stack[0]: [Z mv.visitTypeInsn(Opcodes.CHECKCAST, InstrSupport.DATAFIELD_DESC); }
From source file:org.jacoco.core.runtime.ExecutionDataAccess.java
License:Open Source License
/** * Generates the code that calls the runtime data access through the JRE API * method {@link Object#equals(Object)}. The code pops a {@link Object} * instance from the stack and pushes the probe array of type * <code>boolean[]</code> on the operand stack. The generated code requires * a stack size of 6./* w w w . ja v a 2 s .co m*/ * * @param classid * @param classname * @param probecount * @param mv */ public static void generateAccessCall(final long classid, final String classname, final int probecount, final MethodVisitor mv) { // stack[0]: Ljava/lang/Object; generateArgumentArray(classid, classname, probecount, mv); // stack[1]: [Ljava/lang/Object; // stack[0]: Ljava/lang/Object; mv.visitInsn(Opcodes.DUP_X1); // stack[2]: [Ljava/lang/Object; // stack[1]: Ljava/lang/Object; // stack[0]: [Ljava/lang/Object; mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Object", "equals", "(Ljava/lang/Object;)Z"); mv.visitInsn(Opcodes.POP); // stack[0]: [Ljava/lang/Object; mv.visitInsn(Opcodes.ICONST_0); mv.visitInsn(Opcodes.AALOAD); // stack[0]: [Z mv.visitTypeInsn(Opcodes.CHECKCAST, InstrSupport.DATAFIELD_DESC); }
From source file:org.jboss.byteman.agent.adapter.RuleGeneratorAdapter.java
License:Open Source License
/** * Generates a DUP_X1 instruction. */ public void dupX1() { visitInsn(Opcodes.DUP_X1); }
From source file:org.jboss.byteman.rule.expression.ThrowExpression.java
License:Open Source License
public void compile(MethodVisitor mv, CompileContext compileContext) throws CompileException { // make sure we are at the right source line compileContext.notifySourceLine(line); int currentStack = compileContext.getStackCount(); int expected = 1; int extraParams = 0; // ok, we need to create the thrown exception instance and then // initialise it. // create the thrown exception instance -- adds 1 to stack String exceptionClassName = type.getInternalName(); mv.visitTypeInsn(Opcodes.NEW, exceptionClassName); compileContext.addStackCount(1);// ww w .j a v a 2 s . co m // copy the exception so we can init it mv.visitInsn(Opcodes.DUP); compileContext.addStackCount(1); int argCount = arguments.size(); // stack each of the arguments to the constructor for (int i = 0; i < argCount; i++) { Type argType = argumentTypes.get(i); Type paramType = paramTypes.get(i); int paramCount = (paramType.getNBytes() > 4 ? 2 : 1); // track extra storage used after type conversion extraParams += (paramCount); arguments.get(i).compile(mv, compileContext); compileTypeConversion(argType, paramType, mv, compileContext); } // construct the exception mv.visitMethodInsn(Opcodes.INVOKESPECIAL, exceptionClassName, "<init>", getDescriptor()); // modify the stack height to account for the removed exception and params compileContext.addStackCount(-(extraParams + 1)); if (compileContext.getStackCount() != currentStack + expected) { throw new CompileException("ThrowExpression.compile : invalid stack height " + compileContext.getStackCount() + " expecting " + (currentStack + expected)); } // now create a ThrowException to wrap the user exception // create the thrown exception instance -- adds 1 to stack [UE] --> [UE, THE] exceptionClassName = "org/jboss/byteman/rule/exception/ThrowException"; mv.visitTypeInsn(Opcodes.NEW, exceptionClassName); compileContext.addStackCount(1); // copy the ThrowException so we can init it [UE, THE] --> [THE, UE, THE] mv.visitInsn(Opcodes.DUP_X1); compileContext.addStackCount(1); // reverse the order of the top two words [THE, UE, THE] --> [THE, THE, UE] mv.visitInsn(Opcodes.SWAP); // construct the exception [THE, THE, UE] --> [UE] mv.visitMethodInsn(Opcodes.INVOKESPECIAL, exceptionClassName, "<init>", "(Ljava/lang/Throwable;)V"); // we should now have just the ThrowException on the stack compileContext.addStackCount(-2); if (compileContext.getStackCount() != currentStack + expected) { throw new CompileException("ThrowExpression.compile : invalid stack height " + compileContext.getStackCount() + " expecting " + (currentStack + expected)); } // now throw the exception and decrement the stack height mv.visitInsn(Opcodes.ATHROW); compileContext.addStackCount(-1); }
From source file:org.lambdamatic.analyzer.ast.LambdaExpressionReader.java
License:Open Source License
/** * Reads the current {@link InsnNode} instruction and returns a {@link Statement} or {@code null} * if the instruction is not a full statement (in that case, the instruction is stored in the * given Expression {@link Stack})./*from w ww . java 2 s . c om*/ * * @param insnNode the instruction to read * @param expressionStack the expression stack to put on or pop from. * @param localVariables the local variables * @return a {@link List} of {@link Statement} or empty list if no {@link Statement} was created * after reading the current instruction. * @see <a href="https://en.wikipedia.org/wiki/Java_bytecode_instruction_listings">Java bytcode * instruction listings on Wikipedia</a> */ private List<Statement> readInstruction(final InsnCursor insnCursor, final Stack<Expression> expressionStack, final List<CapturedArgument> capturedArguments, final LocalVariables localVariables) { final List<Statement> statements = new ArrayList<>(); final AbstractInsnNode insnNode = insnCursor.getCurrent(); switch (insnNode.getOpcode()) { // return a reference from a method case Opcodes.ARETURN: // return an integer from a method case Opcodes.IRETURN: statements.add(new ReturnStatement(expressionStack.pop())); break; // return void from method case Opcodes.RETURN: // wrap all pending expressions into ExpressionStatements while (!expressionStack.isEmpty()) { final Expression pendingExpression = expressionStack.pop(); statements.add(new ExpressionStatement(pendingExpression)); } break; // push a null reference onto the stack case Opcodes.ACONST_NULL: expressionStack.add(new NullLiteral()); break; // load the int value 0 onto the stack case Opcodes.ICONST_0: // applies for byte, short, int and boolean expressionStack.add(new NumberLiteral(0)); break; // load the int value 1 onto the stack case Opcodes.ICONST_1: // applies for byte, short, int and boolean expressionStack.add(new NumberLiteral(1)); break; // load the int value 2 onto the stack case Opcodes.ICONST_2: expressionStack.add(new NumberLiteral(2)); break; // load the int value 3 onto the stack case Opcodes.ICONST_3: expressionStack.add(new NumberLiteral(3)); break; // load the int value 4 onto the stack case Opcodes.ICONST_4: expressionStack.add(new NumberLiteral(4)); break; // load the int value 5 onto the stack case Opcodes.ICONST_5: expressionStack.add(new NumberLiteral(5)); break; // push the long 0 onto the stack case Opcodes.LCONST_0: expressionStack.add(new NumberLiteral(0L)); break; // push the long 1 onto the stack case Opcodes.LCONST_1: expressionStack.add(new NumberLiteral(1L)); break; // push the 0.0f onto the stack case Opcodes.FCONST_0: expressionStack.add(new NumberLiteral(0f)); break; // push the 1.0f onto the stack case Opcodes.FCONST_1: expressionStack.add(new NumberLiteral(1f)); break; // push the 2.0f onto the stack case Opcodes.FCONST_2: expressionStack.add(new NumberLiteral(2f)); break; // push the constant 0.0 onto the stack case Opcodes.DCONST_0: expressionStack.add(new NumberLiteral(0d)); break; // push the constant 1.0 onto the stack case Opcodes.DCONST_1: expressionStack.add(new NumberLiteral(1d)); break; // compare two longs values case Opcodes.LCMP: // compare two doubles case Opcodes.DCMPL: // compare two doubles case Opcodes.DCMPG: // compare two floats case Opcodes.FCMPL: // compare two floats case Opcodes.FCMPG: statements.addAll( readJumpInstruction(insnCursor.next(), expressionStack, capturedArguments, localVariables)); break; // add 2 ints case Opcodes.IADD: expressionStack.add(readOperation(Operator.ADD, expressionStack)); break; // int subtract case Opcodes.ISUB: expressionStack.add(readOperation(Operator.SUBTRACT, expressionStack)); break; // multiply 2 integers case Opcodes.IMUL: expressionStack.add(readOperation(Operator.MULTIPLY, expressionStack)); break; // divide 2 integers case Opcodes.IDIV: expressionStack.add(readOperation(Operator.DIVIDE, expressionStack)); break; // negate int case Opcodes.INEG: expressionStack.add(inverseInteger(expressionStack)); break; // discard the top value on the stack case Opcodes.POP: statements.add(new ExpressionStatement(expressionStack.pop())); break; // duplicate the value on top of the stack case Opcodes.DUP: expressionStack.push(expressionStack.peek()); break; // insert a copy of the top value into the stack two values from the top. case Opcodes.DUP_X1: expressionStack.add(expressionStack.size() - 2, expressionStack.peek()); break; // store into a reference in an array case Opcodes.AASTORE: readArrayStoreInstruction(insnNode, expressionStack); break; // converts Float to Double -> ignored. case Opcodes.F2D: break; default: throw new AnalyzeException( "Bytecode instruction with OpCode '" + insnNode.getOpcode() + "' is not supported."); } return statements; }
From source file:org.mbte.groovypp.compiler.bytecode.BytecodeExpr.java
License:Apache License
public static void dup_x1(ClassNode type, MethodVisitor mv) { if (type == double_TYPE || type == long_TYPE) mv.visitInsn(Opcodes.DUP2_X1);/*w ww .j a v a 2s .c o m*/ else mv.visitInsn(Opcodes.DUP_X1); }
From source file:org.mbte.groovypp.compiler.bytecode.ResolvedVarBytecodeExpr.java
License:Apache License
public ResolvedVarBytecodeExpr(ClassNode type, VariableExpression ve, CompilerTransformer compiler) { super(ve, type); this.ve = ve; var = compiler.compileStack.getRegister(ve.getName(), true); if (ve instanceof RecordingVariableExpression) { final RecordingVariableExpression recordingVariableExpression = (RecordingVariableExpression) ve; final Register rvar = compiler.compileStack .getRegister(recordingVariableExpression.getRecorder().getName(), true); record = new BytecodeExpr(ve, getType()) { @Override/*from www . jav a 2 s.c o m*/ protected void compile(MethodVisitor mv) { dup(ResolvedVarBytecodeExpr.this.getType(), mv); box(ResolvedVarBytecodeExpr.this.getType(), mv); load(rvar.getType(), rvar.getIndex(), mv); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(POP); mv.visitLdcInsn(recordingVariableExpression.getColumn()); mv.visitMethodInsn(INVOKEVIRTUAL, "org/mbte/groovypp/runtime/powerassert/ValueRecorder", "record", "(Ljava/lang/Object;I)Ljava/lang/Object;"); mv.visitInsn(POP); } }; } else { record = null; } }
From source file:org.openquark.cal.internal.javamodel.AsmJavaBytecodeGenerator.java
License:Open Source License
/** * @param type// ww w. j av a 2s.c o m * @return the DUP_X1 or DUP2_X1 instruction, depending on type. */ private static int getDupX1OpCode(JavaTypeName type) { switch (type.getTag()) { case JavaTypeName.BOOLEAN_TAG: case JavaTypeName.BYTE_TAG: case JavaTypeName.SHORT_TAG: case JavaTypeName.CHAR_TAG: case JavaTypeName.INT_TAG: case JavaTypeName.FLOAT_TAG: case JavaTypeName.ARRAY_TAG: case JavaTypeName.OBJECT_TAG: return Opcodes.DUP_X1; case JavaTypeName.LONG_TAG: case JavaTypeName.DOUBLE_TAG: return Opcodes.DUP2_X1; case JavaTypeName.VOID_TAG: default: { throw new IllegalArgumentException("invalid type: " + type); } } }
From source file:org.pitest.mutationtest.engine.gregor.mutators.experimental.extended.UOIMutator1.java
License:Apache License
@Override public void visitFieldInsn(int opcode, String owner, String name, String desc) { // GETFIELD I,F,L,D + B,S if ((opcode == Opcodes.GETFIELD)) { if (desc.equals("I")) { if (this.shouldMutate("Incremented (a++) integer field " + name)) { // Assuming we have the reference to [this] on the stack mv.visitInsn(Opcodes.DUP); // dup [this] mv.visitFieldInsn(opcode, owner, name, desc); // stack = [this] [this.field] mv.visitInsn(Opcodes.DUP_X1); // stack = [this.field] [this] [this.field] mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); // stack = [this.field] [this] [this.field +1] mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; }/*from w ww .j a va 2 s . c o m*/ } if (desc.equals("F")) { if (this.shouldMutate("Incremented (a++) float field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FADD); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("J")) { if (this.shouldMutate("Incremented (a++) long field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2_X1); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LADD); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("D")) { if (this.shouldMutate("Incremented (a++) double field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2_X1); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DADD); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("B")) { if (this.shouldMutate("Incremented (a++) byte field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); mv.visitInsn(Opcodes.I2B); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("S")) { if (this.shouldMutate("Incremented (a++) short field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); mv.visitInsn(Opcodes.I2S); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } } // GETSTATIC I,F,L,D + B,S if (opcode == Opcodes.GETSTATIC) { if (desc.equals("I")) { if (this.shouldMutate("Incremented (a++) static integer field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("F")) { if (this.shouldMutate("Incremented (a++) static float field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FADD); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("J")) { if (this.shouldMutate("Incremented (a++) static long field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LADD); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("D")) { if (this.shouldMutate("Incremented (a++) static double field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DADD); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("B")) { if (this.shouldMutate("Incremented (a++) static byte field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); mv.visitInsn(Opcodes.I2B); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("S")) { if (this.shouldMutate("Incremented (a++) static short field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.IADD); mv.visitInsn(Opcodes.I2S); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } } mv.visitFieldInsn(opcode, owner, name, desc); }
From source file:org.pitest.mutationtest.engine.gregor.mutators.experimental.extended.UOIMutator2.java
License:Apache License
@Override public void visitFieldInsn(int opcode, String owner, String name, String desc) { // GETFIELD I,F,L,D + B,S if ((opcode == Opcodes.GETFIELD)) { if (desc.equals("I")) { if (this.shouldMutate("Decremented (a--) integer field " + name)) { // stack = [this] mv.visitInsn(Opcodes.DUP); // stack = [this] [this] mv.visitFieldInsn(opcode, owner, name, desc); // stack = [this] [this.field] mv.visitInsn(Opcodes.DUP_X1); // stack = [this.field] [this] [this.field] mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; }/*from ww w. jav a2 s.c o m*/ } if (desc.equals("F")) { if (this.shouldMutate("Decremented (a--) float field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FSUB); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("J")) { if (this.shouldMutate("Decremented (a--) long field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2_X1); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LSUB); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("D")) { if (this.shouldMutate("Decremented (a--) double field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2_X1); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DSUB); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("B")) { if (this.shouldMutate("Decremented (a--) byte field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); mv.visitInsn(Opcodes.I2B); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } if (desc.equals("S")) { if (this.shouldMutate("Decremented (a--) short field " + name)) { mv.visitInsn(Opcodes.DUP); mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP_X1); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); mv.visitInsn(Opcodes.I2S); mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc); return; } } } // GETSTATIC I,F,L,D + B,S if (opcode == Opcodes.GETSTATIC) { if (desc.equals("I")) { if (this.shouldMutate("Decremented (a--) static integer field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); // stack = [this.sfield] mv.visitInsn(Opcodes.DUP); // stack = [this.sfield] [this.sfield] mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); // stack = [this.sfield] [this.sfield -1] mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("F")) { if (this.shouldMutate("Decremented (a--) static float field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.FCONST_1); mv.visitInsn(Opcodes.FSUB); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("J")) { if (this.shouldMutate("Decremented (a--) static long field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.LCONST_1); mv.visitInsn(Opcodes.LSUB); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("D")) { if (this.shouldMutate("Decremented (a--) static double field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP2); mv.visitInsn(Opcodes.DCONST_1); mv.visitInsn(Opcodes.DSUB); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("B")) { if (this.shouldMutate("Decremented (a--) static byte field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); mv.visitInsn(Opcodes.I2B); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } if (desc.equals("S")) { if (this.shouldMutate("Decremented (a--) static short field " + name)) { mv.visitFieldInsn(opcode, owner, name, desc); mv.visitInsn(Opcodes.DUP); mv.visitInsn(Opcodes.ICONST_1); mv.visitInsn(Opcodes.ISUB); mv.visitInsn(Opcodes.I2S); mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc); return; } } } mv.visitFieldInsn(opcode, owner, name, desc); }