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

IASTORE.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.generic.InstructionHandle;
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 IASTORE extends AbstractInstruction {
00012   private de.fub.bytecode.generic.IASTORE peer;
00013 
00014 //#endif RACE
00015 // ifdef RACE
00016   private void ANALYZE_execute(ThreadInfo th, int arrayref,
00017       DynamicArea da, int index, long value){
00018     if (Analyze.on()){
00019       LockStatus lock_status = da.getLockStatus(arrayref);
00020       Analyze.debugPreAccess(th, "Object[]", Integer.toString(index),
00021       new ObjRef(arrayref), "IASTORE", value, lock_status);      
00022       lock_status.checkWriteArray(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;
00028 
00029     int value = th.pop();
00030     int index = th.pop();
00031     int arrayref = th.pop();
00032 
00033     da.setValue(arrayref, index, value);
00034 
00035 // ifdef RACE
00036     ANALYZE_execute(th, arrayref, da, index, value);
00037 //#endif RACE
00038 
00039     return th.getPC().getNext();
00040   }  
00041   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00042     peer = (de.fub.bytecode.generic.IASTORE)i;
00043   }  
00044 }

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