List of usage examples for org.objectweb.asm Opcodes IINC
int IINC
To view the source code for org.objectweb.asm Opcodes IINC.
Click Source Link
From source file:ch.eiafr.cojac.CojacCheckerMethodVisitor.java
License:Apache License
@Override public void visitIincInsn(int index, int value) { int opCode = Opcodes.IINC; IOpcodeInstrumenter instrumenter = factory.getInstrumenter(opCode); if (args.isOperationEnabled(Arg.IINC)) { visitVarInsn(ILOAD, index);/*from w ww . j a va 2s. c om*/ mv.visitLdcInsn(value); instrumenter.instrument(mv, opCode);//, classPath, methods, reaction, this); visitVarInsn(ISTORE, index); stats.incrementCounterValue(Opcodes.IINC); //Arg.IINC); } else { super.visitIincInsn(index, value); } }
From source file:com.codename1.tools.translator.bytecodes.IInc.java
License:Open Source License
public IInc(int var, int num) { super(Opcodes.IINC); this.var = var; this.num = num; }
From source file:com.gargoylesoftware.js.nashorn.internal.ir.debug.NashornTextifier.java
License:Open Source License
@Override public void visitIincInsn(final int var, final int increment) { final StringBuilder sb = new StringBuilder(); appendOpcode(sb, Opcodes.IINC).append(' '); sb.append(var).append(' ').append(increment).append('\n'); addText(sb);/*from w ww .j av a2 s . c om*/ }
From source file:com.mebigfatguy.baremetal4j.Sourcifier.java
License:Apache License
public void visitIincInsn(int var, int increment) { lines.add("\t\tBCO = " + String.format("%05d", byteOffset) + "; // " + Printer.OPCODES[Opcodes.IINC] + " " + var + ", increment"); byteOffset += 3;//from ww w. ja v a 2 s. c o m }
From source file:com.trigersoft.jaque.expression.ExpressionMethodVisitor.java
License:Apache License
@Override public void visitIincInsn(int arg0, int arg1) { throw notLambda(Opcodes.IINC); }
From source file:de.loskutov.bco.asm.CommentedASMifierClassVisitor.java
License:Open Source License
@Override public void visitIincInsn(final int var, final int increment) { addIndex(Opcodes.IINC); super.visitIincInsn(var, increment); }
From source file:de.tuberlin.uebb.jbop.optimizer.var.RemoveUnusedLocalVars.java
License:Open Source License
@Override public InsnList optimize(final InsnList original, final MethodNode methodNode) { optimized = false;//from www . j a v a 2s. c o m final List<VarInsnNode> stores = new ArrayList<>(); final List<VarInsnNode> users = new ArrayList<>(); final List<IincInsnNode> iincs = new ArrayList<>(); findNodes(original, stores, users, iincs); final List<AbstractInsnNode> toBeRemoved = new ArrayList<>(); for (final VarInsnNode node : stores) { if (!usersContains(users, node)) { toBeRemoved.add(node); toBeRemoved.addAll(iincsContains(iincs, node)); } } // final InsnList newList = new InsnList(); final Iterator<AbstractInsnNode> iterator = original.iterator(); while (iterator.hasNext()) { final AbstractInsnNode currentNode = iterator.next(); if (toBeRemoved.contains(currentNode)) { if (currentNode.getOpcode() == Opcodes.IINC) { original.remove(currentNode); optimized = true; continue; } final AbstractInsnNode firstOfStack = NodeHelper.getFirstOfStack(currentNode); if (firstOfStack != null) { optimized = true; AbstractInsnNode remove = firstOfStack; while (remove != currentNode) { final AbstractInsnNode toRemove = remove; remove = remove.getNext(); original.remove(toRemove); } original.remove(currentNode); } } } return original; }
From source file:de.tuberlin.uebb.jbop.optimizer.var.RemoveUnusedLocalVars.java
License:Open Source License
private void findNodes(final InsnList original, final List<VarInsnNode> stores, final List<VarInsnNode> users, // final List<IincInsnNode> iincs) { final Iterator<AbstractInsnNode> iterator = original.iterator(); while (iterator.hasNext()) { final AbstractInsnNode node = iterator.next(); if ((node.getOpcode() >= Opcodes.ISTORE) && (node.getOpcode() <= Opcodes.ASTORE)) { stores.add((VarInsnNode) node); } else if ((node.getOpcode() >= Opcodes.ILOAD) && (node.getOpcode() <= Opcodes.ALOAD)) { users.add((VarInsnNode) node); } else if (node.getOpcode() == Opcodes.IINC) { iincs.add((IincInsnNode) node); }//from w w w .j ava 2 s . c o m } }
From source file:de.unisb.cs.st.javaslicer.common.classRepresentation.instructions.IIncInstruction.java
License:Open Source License
public IIncInstruction(final ReadMethod readMethod, final int localVarIndex, final int increment, final int lineNumber) { super(readMethod, Opcodes.IINC, lineNumber); this.localVarIndex = localVarIndex; this.increment = increment; }
From source file:de.unisb.cs.st.javaslicer.common.classRepresentation.instructions.IIncInstruction.java
License:Open Source License
private IIncInstruction(final ReadMethod readMethod, final int localVarIndex, final int increment, final int lineNumber, final int index) { super(readMethod, Opcodes.IINC, lineNumber, index); this.localVarIndex = localVarIndex; this.increment = increment; }