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

AASTORE.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 AASTORE extends AbstractInstruction {
00012   private de.fub.bytecode.generic.AASTORE 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), "AASTORE", 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 // ifdef MARK_N_SWEEP
00030     int value = th.peek();
00031     int index = th.peek(1);
00032     int arrayref = th.peek(2);
00033 
00034     // sets the value into the array
00035     da.setValue(arrayref, index, value);
00036     th.pop(3);
00037 //#else MARK_N_SWEEP
00038 
00039 
00040 
00041 
00042 
00043 
00044 //#endif MARK_N_SWEEP
00045 
00046 // ifdef RACE
00047     ANALYZE_execute(th, arrayref, da, index, value);
00048 //#endif RACE
00049 
00050     return th.getPC().getNext();
00051   }  
00052   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00053     peer = (de.fub.bytecode.generic.AASTORE)i;
00054   }  
00055 }

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