1 package gov.nasa.jpf.jvm.bytecode; 20 21 import gov.nasa.jpf.jvm.*; 22 23 import org.apache.bcel.classfile.ConstantPool; 24 25 26 30 public class ANEWARRAY extends Instruction { 31 protected String type; 32 33 public void setPeer (org.apache.bcel.generic.Instruction i, ConstantPool cp) { 34 type = cp.constantToString(cp.getConstant( 35 ((org.apache.bcel.generic.ANEWARRAY) i).getIndex())); 36 37 if (!type.startsWith("[")) { 38 type = "L" + type + ";"; 39 } 40 } 41 42 public Instruction execute (SystemState ss, KernelState ks, ThreadInfo th) { 43 int size = th.pop(); 45 46 47 th.push(ks.da.newArray(type, size, th), true); 49 50 return getNext(th); 51 } 52 53 public int getByteCode () { 54 return 0xBD; 55 } 56 } 57 | Popular Tags |