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

INVOKESPECIAL.java

00001 package gov.nasa.arc.ase.jpf.jvm.bytecode;
00002 
00003 import de.fub.bytecode.Constants;
00004 import gov.nasa.arc.ase.jpf.*;
00005 import gov.nasa.arc.ase.jpf.jvm.*;
00006 import de.fub.bytecode.generic.ConstantPoolGen;
00007 import de.fub.bytecode.generic.Type;
00008 import de.fub.bytecode.generic.InstructionHandle;
00009 import gov.nasa.arc.ase.util.Debug;
00010 
00011 public class INVOKESPECIAL extends AbstractInstruction {
00012   private de.fub.bytecode.generic.INVOKESPECIAL peer;
00013 
00014   public boolean examine(SystemState ss, KernelState ks, ThreadInfo th) {
00015     ConstantPoolGen cpg = th.getCPG();
00016 
00017     String methodName = peer.getMethodName(cpg);
00018     String sig        = peer.getSignature(cpg);
00019     String className  = peer.getClassName(cpg);
00020 
00021     ClassInfo ci = JPFVM.getJPFVM().getClass(className);
00022     return !ci.isMethodDeterministic(ss, ks, th, methodName+sig);
00023   }  
00024   public InstructionHandle execute(SystemState ss, KernelState ks, ThreadInfo th) {
00025     ConstantPoolGen cpg = th.getCPG();
00026 
00027     String methodName = peer.getMethodName(cpg);
00028     String sig        = peer.getSignature(cpg);
00029     String className  = peer.getClassName(cpg);
00030 
00031     ClassInfo ci = JPFVM.getJPFVM().getClass(className);
00032     return ci.executeMethod(ss, ks, th, methodName+sig);
00033   }  
00034   public boolean isExecutable(SystemState ss, KernelState ks, ThreadInfo th) {
00035     ConstantPoolGen cpg = th.getCPG();
00036 
00037     String methodName = peer.getMethodName(cpg);
00038     String sig        = peer.getSignature(cpg);
00039     String className  = peer.getClassName(cpg);
00040 
00041     ClassInfo ci = JPFVM.getJPFVM().getClass(className);
00042     return ci.isMethodExecutable(ss, ks, th, methodName+sig);
00043   }  
00044   public void setPeer(de.fub.bytecode.generic.Instruction i) {
00045     peer = (de.fub.bytecode.generic.INVOKESPECIAL)i;
00046   }  
00047 }

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