List of usage examples for org.objectweb.asm Opcodes MULTIANEWARRAY
int MULTIANEWARRAY
To view the source code for org.objectweb.asm Opcodes MULTIANEWARRAY.
Click Source Link
From source file:com.codename1.tools.translator.bytecodes.MultiArray.java
License:Open Source License
public MultiArray(String desc, int dims) { super(Opcodes.MULTIANEWARRAY); this.desc = desc; this.dims = dims; }
From source file:com.gargoylesoftware.js.nashorn.internal.ir.debug.NashornTextifier.java
License:Open Source License
@Override public void visitMultiANewArrayInsn(final String desc, final int dims) { final StringBuilder sb = new StringBuilder(); appendOpcode(sb, Opcodes.MULTIANEWARRAY).append(' '); appendDescriptor(sb, FIELD_DESCRIPTOR, desc); sb.append(' ').append(dims).append('\n'); addText(sb);/*from w w w . ja v a 2 s . co m*/ }
From source file:com.mebigfatguy.baremetal4j.Sourcifier.java
License:Apache License
public void visitMultiANewArrayInsn(String desc, int dims) { lines.add("\t\tBCO = " + String.format("%05d", byteOffset) + "; // " + Printer.OPCODES[Opcodes.MULTIANEWARRAY] + " " + desc + ", " + dims); byteOffset += 4;//from w w w . j ava 2 s . co m }
From source file:com.trigersoft.jaque.expression.ExpressionMethodVisitor.java
License:Apache License
@Override public void visitMultiANewArrayInsn(String desc, int dims) { throw notLambda(Opcodes.MULTIANEWARRAY); }
From source file:de.loskutov.bco.asm.CommentedASMifierClassVisitor.java
License:Open Source License
@Override public void visitMultiANewArrayInsn(final String desc, final int dims) { addIndex(Opcodes.MULTIANEWARRAY); super.visitMultiANewArrayInsn(desc, dims); }
From source file:de.tuberlin.uebb.jbop.optimizer.array.LocalArrayLengthInliner.java
License:Open Source License
/** * Registers values for local arrays that are created via NEWARRAY / ANEWARRAY or MULTIANEWARRAY. * //from w ww . j a va 2 s. com * @param currentNode * the current node * @param knownArrays * the known arrays * @return true, if successful */ @Override protected int registerAdditionalValues(final AbstractInsnNode currentNode, // final Map<Integer, Object> knownArrays) { final int opcode = currentNode.getOpcode(); if (!((opcode == Opcodes.NEWARRAY) || (opcode == Opcodes.ANEWARRAY) || (opcode == Opcodes.MULTIANEWARRAY))) { return 0; } int dims = 1; if (currentNode.getOpcode() == Opcodes.MULTIANEWARRAY) { final MultiANewArrayInsnNode node = (MultiANewArrayInsnNode) currentNode; dims = node.dims; } final int sizes[] = new int[dims]; AbstractInsnNode previous = currentNode; for (int i = 0; i < dims; ++i) { previous = NodeHelper.getPrevious(previous); if (!NodeHelper.isIntNode(previous)) { return 0; } try { final int value = NodeHelper.getNumberValue(previous).intValue(); sizes[i] = value; } catch (final NotANumberException nane) { return 0; } } final AbstractInsnNode next = NodeHelper.getNext(currentNode); if (!(next instanceof VarInsnNode)) { return 0; } final int index = ((VarInsnNode) next).var; knownArrays.put(Integer.valueOf(index), Array.newInstance(Object.class, sizes)); return 2; }
From source file:de.tuberlin.uebb.jbop.optimizer.methodsplitter.Block.java
License:Open Source License
/** * Objects that are not parameters and not written before * these can be:// w w w . j a v a 2s . c o m * getField * getStatic * new * new array * new multi array * return type of method call */ private Type resolveType(final AbstractInsnNode node) { int arrayCount = 0; AbstractInsnNode currentNode = NodeHelper.getPrevious(node); while (currentNode != null) { final int opcode2 = currentNode.getOpcode(); if (opcode2 == Opcodes.NEWARRAY) { final int operand = ((IntInsnNode) currentNode).operand; return getObjectType(operand); } else if (opcode2 == Opcodes.ANEWARRAY) { return getObjectType(((TypeInsnNode) currentNode).desc); } else if (opcode2 == Opcodes.MULTIANEWARRAY) { return getObjectType(((MultiANewArrayInsnNode) currentNode).desc); } else if (opcode2 == Opcodes.NEW) { final String desc = ((TypeInsnNode) currentNode).desc; return getObjectType(desc); } else if ((opcode2 >= Opcodes.IALOAD) && (opcode2 <= Opcodes.AALOAD)) { arrayCount++; } else if ((opcode2 == Opcodes.GETFIELD) || (opcode2 == Opcodes.GETSTATIC)) { final String desc = ((FieldInsnNode) currentNode).desc; return getObjectType(removeArrayType(desc, arrayCount)); } else if ((opcode2 == Opcodes.ALOAD)) { final Type type2 = readers.getFirstVar(((VarInsnNode) currentNode).var).getParameterType(); return getObjectType(removeArrayType(type2.getDescriptor(), arrayCount)); } else if ((opcode2 >= Opcodes.INVOKEVIRTUAL) && (opcode2 <= Opcodes.INVOKEDYNAMIC)) { return Type.getReturnType(((MethodInsnNode) currentNode).desc); } currentNode = NodeHelper.getPrevious(currentNode); } return Type.VOID_TYPE; }
From source file:de.unisb.cs.st.javaslicer.common.classRepresentation.instructions.MultiANewArrayInstruction.java
License:Open Source License
public MultiANewArrayInstruction(final ReadMethod readMethod, final int lineNumber, final String desc, final int dims, int numNewObjIdSeqIndex, int newObjIdSeqIndex) { super(readMethod, Opcodes.MULTIANEWARRAY, lineNumber); this.typeDesc = desc; this.dims = dims; this.numNewObjectIdentifiersSeqIndex = numNewObjIdSeqIndex; this.newObjectIdentifierSeqIndex = newObjIdSeqIndex; }
From source file:de.unisb.cs.st.javaslicer.common.classRepresentation.instructions.MultiANewArrayInstruction.java
License:Open Source License
private MultiANewArrayInstruction(final ReadMethod readMethod, final String desc, final int dims, final int lineNumber, final int index, int numNewObjIdSeqIndex, int newObjIdSeqIndex) { super(readMethod, Opcodes.MULTIANEWARRAY, lineNumber, index); this.typeDesc = desc; this.dims = dims; this.numNewObjectIdentifiersSeqIndex = numNewObjIdSeqIndex; this.newObjectIdentifierSeqIndex = newObjIdSeqIndex; }
From source file:de.unisb.cs.st.javaslicer.common.classRepresentation.instructions.MultiANewArrayInstruction2.java
License:Open Source License
public MultiANewArrayInstruction2(final ReadMethod readMethod, final int lineNumber, final String desc, final int dims, long[] newobjectidentifiers) { super(readMethod, Opcodes.MULTIANEWARRAY, lineNumber); this.typeDesc = desc; this.dims = dims; this.newObjectIdentifiers = newobjectidentifiers; }