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.classfile.ConstantPool;
00004 import de.fub.bytecode.generic.ConstantPoolGen;
00005 import gov.nasa.arc.ase.jpf.jvm.SystemState;
00006 import gov.nasa.arc.ase.jpf.jvm.KernelState;
00007 import gov.nasa.arc.ase.jpf.jvm.ThreadInfo;
00008 import gov.nasa.arc.ase.jpf.jvm.ClassInfo;
00009 import gov.nasa.arc.ase.jpf.jvm.Types;
00010 import gov.nasa.arc.ase.util.Debug;
00011 
00012 public class INVOKESPECIAL extends InvokeInstruction {
00013   public boolean examine(SystemState ss, KernelState ks, ThreadInfo th) {
00014     return !ClassInfo.getClassInfo(cname).isMethodDeterministic(th, mname);
00015   }  
00016   public Instruction execute(SystemState ss, KernelState ks, ThreadInfo th) {
00017     int objref = th.getCalleeThis(Types.getArgumentsSize(signature) + 1);
00018 
00019     if(objref == -1)
00020       return th.createAndThrowException("java.lang.NullPointerException");
00021 
00022     return ClassInfo.getClassInfo(cname).executeMethod(th, mname);
00023   }  
00024   public boolean isExecutable(SystemState ss, KernelState ks, ThreadInfo th) {
00025     return ClassInfo.getClassInfo(cname).isMethodExecutable(th, mname);
00026   }  
00027   public void setPeer(de.fub.bytecode.generic.Instruction i, ConstantPool cp) {
00028     cname = ((de.fub.bytecode.generic.INVOKESPECIAL)i).getClassName(new ConstantPoolGen(cp));
00029     signature = ((de.fub.bytecode.generic.INVOKESPECIAL)i).getSignature(new ConstantPoolGen(cp));
00030     mname = ((de.fub.bytecode.generic.INVOKESPECIAL)i).getMethodName(new ConstantPoolGen(cp)) +
00031       signature;
00032   }  
00033 }

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