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

IRETURN.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 
00008 public class IRETURN extends AbstractInstruction {
00009   private de.fub.bytecode.generic.IRETURN peer;
00010 
00011   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00012     MethodInfo mi = th.getCurrentMethod();
00013 
00014     if (mi.getMethodGen().isSynchronized()) {
00015       if (mi.getMethodGen().isStatic()) {
00016     ks.static_area.monitorUnlock(mi.getClassInfo().getClassName(), th);
00017       } else {
00018     ks.dynamic_area.monitorUnlock(th.getThis(), th);
00019       }
00020     }
00021 
00022     // pops the return value from the stack
00023     int value = th.pop();
00024 
00025     // removes the stack frame
00026     th.popFrame();
00027     th.removeArguments(mi);
00028 
00029     // push the return value on the caller stack
00030     th.push(value);
00031 
00032     return th.getPC().getNext();
00033   }  
00034   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00035     peer = (de.fub.bytecode.generic.IRETURN)i;
00036   }  
00037 }

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