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

DRETURN.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 DRETURN extends AbstractInstruction {
00009   private de.fub.bytecode.generic.DRETURN peer;
00010 
00011   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00012     // checks if we are returning from a synchronized method
00013     MethodInfo mi = th.getCurrentMethod();
00014     if (mi.getMethodGen().isSynchronized()) {
00015       // if so we have to realease the lock
00016       if (mi.getMethodGen().isStatic()) {
00017     ks.static_area.monitorUnlock(mi.getClassInfo().getClassName(), th);
00018       } else {
00019     ks.dynamic_area.monitorUnlock(th.getThis(), th);
00020       }
00021     }
00022 
00023     double value = Types.longToDouble(th.pop2());
00024 
00025     // removes a stack frame
00026     th.popFrame();
00027     th.removeArguments(mi);
00028 
00029     th.push2(Types.doubleToLong(value));
00030 
00031     return th.getPC().getNext();
00032   }  
00033   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00034     peer = (de.fub.bytecode.generic.DRETURN)i;
00035   }  
00036 }

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