00001 package gov.nasa.arc.ase.jpf.jvm.bytecode; 00002 00003 import de.fub.bytecode.Constants; 00004 import de.fub.bytecode.classfile.ConstantPool; 00005 import gov.nasa.arc.ase.jpf.jvm.SystemState; 00006 import gov.nasa.arc.ase.jpf.jvm.KernelState; 00007 import gov.nasa.arc.ase.jpf.jvm.ThreadInfo; 00008 import gov.nasa.arc.ase.util.Debug; 00009 00010 public class NEWARRAY extends Instruction { 00011 private String type; 00012 00013 public Instruction execute(SystemState ss, KernelState ks, ThreadInfo th) { 00014 int size = th.pop(); 00015 00016 th.push(ks.da.newArray(type, size, th), true); 00017 00018 return th.getPC().getNext(); 00019 } 00020 public void setPeer(de.fub.bytecode.generic.Instruction i, ConstantPool cp) { 00021 type = Constants.SHORT_TYPE_NAMES[((de.fub.bytecode.generic.NEWARRAY)i).getTypecode()]; 00022 } 00023 }