1 package gov.nasa.jpf.jvm.bytecode; 20 21 import gov.nasa.jpf.jvm.FieldInfo; 22 import gov.nasa.jpf.jvm.ClassInfo; 23 import gov.nasa.jpf.jvm.KernelState; 24 import gov.nasa.jpf.jvm.ThreadInfo; 25 26 29 public abstract class StaticFieldInstruction extends FieldInstruction { 30 31 public FieldInfo getFieldInfo () { 32 if (fi == null) { 33 ClassInfo ci = ClassInfo.getClassInfo(className); 34 if (ci != null) { 35 fi = ci.getStaticField(fname); 36 } 37 } 38 return fi; 39 } 40 41 boolean isSchedulingRelevant (KernelState ks, ThreadInfo ti) { 42 if (!ti.hasOtherRunnables()) { 43 return false; 44 } 45 46 if (ti.usePorSyncDetection()) { 47 if (isLockProtected(ks.sa.get(className), ti)) { 48 return false; 49 } 50 } 51 52 return true; 53 } 54 55 } 56 57 | Popular Tags |