Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

NEWARRAY.java

00001 package gov.nasa.arc.ase.jpf.jvm.bytecode;
00002 
00003 import gov.nasa.arc.ase.jpf.*;
00004 import gov.nasa.arc.ase.jpf.jvm.*;
00005 import de.fub.bytecode.Constants;
00006 import de.fub.bytecode.generic.ConstantPoolGen;
00007 import de.fub.bytecode.generic.InstructionHandle;
00008 import gov.nasa.arc.ase.util.Debug;
00009 
00010 public class NEWARRAY extends AbstractInstruction {
00011   private de.fub.bytecode.generic.NEWARRAY peer;
00012 
00013   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00014     int size = th.pop();
00015     int arrayref = ks.dynamic_area.newArrayObject(Constants.SHORT_TYPE_NAMES[peer.getTypecode()], size, th);
00016 
00017     // pushes onto the stack the reference to the newly created object
00018     th.push(arrayref);
00019 // ifdef MARK_N_SWEEP
00020     th.setOperandRef();
00021 //#endif MARK_N_SWEEP
00022 
00023     return th.getPC().getNext();
00024   }  
00025   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00026     peer = (de.fub.bytecode.generic.NEWARRAY)i;
00027   }  
00028 }

Generated at Thu Feb 7 06:50:38 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001