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

AALOAD.java

00001 package gov.nasa.arc.ase.jpf.jvm.bytecode;
00002 
00003 import de.fub.bytecode.generic.InstructionHandle;
00004 import gov.nasa.arc.ase.jpf.*;
00005 import gov.nasa.arc.ase.jpf.jvm.*;
00006 import gov.nasa.arc.ase.util.Debug;
00007 // ifdef RACE
00008 import gov.nasa.arc.ase.jpf.jvm.runtime.*;
00009 //#endif RACE
00010 
00011 public class AALOAD extends AbstractInstruction {
00012   private de.fub.bytecode.generic.AALOAD peer;
00013 
00014 //#endif RACE
00015 // ifdef RACE
00016   private void ANALYZE_execute(ThreadInfo th, int arrayref,
00017       DynamicArea da, int index){
00018     if (Analyze.on()) {
00019       LockStatus lock_status = da.getLockStatus(arrayref);
00020       Analyze.debugPreAccess(th, "Object[]", Integer.toString(index),
00021       new ObjRef(arrayref), "AALOAD", da.getValue(arrayref, index), lock_status);      
00022       lock_status.checkReadArray(th, index);
00023       Analyze.debugPostAccess(lock_status);
00024     }
00025   }  
00026   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00027     DynamicArea da = ks.dynamic_area;           // this is the dynamic area
00028 
00029     // reads the arguments from the stack
00030     int index = th.pop();
00031     int arrayref = th.pop();
00032 
00033     // transforms an index in the array into a value
00034     int value = (int)da.getValue(arrayref, index);
00035 
00036     // and pushes the value onto the stack
00037     th.push(value);
00038 // ifdef MARK_N_SWEEP
00039     th.setOperandRef();
00040 //#endif MARK_N_SWEEP
00041 
00042 // ifdef RACE
00043     ANALYZE_execute(th, arrayref, da, index);
00044 //#endif RACE
00045 
00046     return th.getPC().getNext();
00047   }  
00048   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00049     peer = (de.fub.bytecode.generic.AALOAD)i;
00050   }  
00051 }

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