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

FRETURN.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 FRETURN extends AbstractInstruction {
00009   private de.fub.bytecode.generic.FRETURN peer;
00010 
00011   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00012     // if the method is synchronized I need to release the lock
00013     MethodInfo mi = th.getCurrentMethod();
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     float value = Types.intToFloat(th.pop());
00023 
00024     // removes the top frame
00025     th.popFrame();
00026     th.removeArguments(mi);
00027 
00028     // push the return value in the caller's stack frame
00029     th.push(Types.floatToInt(value));
00030 
00031     return th.getPC().getNext();
00032   }  
00033   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00034     peer = (de.fub.bytecode.generic.FRETURN)i;
00035   }  
00036 }

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