private static byte objarrayStoreCheck(OPT_Instruction s){
private static DefUseEffect objarrayStoreCheck(OPT_Instruction s){
  private static byte objarrayStoreCheck(OPT_Instruction s){    OPT_Operand val = StoreCheck.getVal(s);    if (val.isNullConstant()) {      // Writing null into an array is trivially safe      Move.mutate(s, GUARD_MOVE, StoreCheck.getClearGuardResult(s), StoreCheck.getClearGuard(s));      return MOVE_REDUCED;    }    else {      OPT_Operand ref = StoreCheck.getRef(s);      VM_TypeReference arrayTypeRef = ref.getType();      VM_Type typeOfIMElem = arrayTypeRef.getInnermostElementType().peekResolvedType();      if (typeOfIMElem != null) {        VM_Type typeOfVal = val.getType().peekResolvedType();        if ((typeOfIMElem == typeOfVal) &&            (typeOfIMElem.isPrimitiveType() ||             typeOfIMElem.asClass().isFinal())) {          // Writing something of a final type to an array of that          // final type is safe          Move.mutate(s, GUARD_MOVE, StoreCheck.getClearGuardResult(s),                      StoreCheck.getClearGuard(s));          return MOVE_REDUCED;        }      }      if (ref.isConstant() && (arrayTypeRef == VM_TypeReference.JavaLangObjectArray)) {        // We know this to be an array of objects so any store must        // be safe        Move.mutate(s, GUARD_MOVE, StoreCheck.getClearGuardResult(s),                    StoreCheck.getClearGuard(s));        return MOVE_REDUCED;                }      if (val.isConstant() && ref.isConstant()) {        // writing a constant value into a constant array        byte ans = OPT_ClassLoaderProxy.includesType(arrayTypeRef.getArrayElementType(), val.getType());        if (ans == OPT_Constants.YES) {          // all stores should succeed          Move.mutate(s, GUARD_MOVE, StoreCheck.getClearGuardResult(s), StoreCheck.getClearGuard(s));          return MOVE_REDUCED;        }        else if (ans == OPT_Constants.NO) {          // all stores will fail          Trap.mutate(s, TRAP, StoreCheck.getClearGuardResult(s), OPT_TrapCodeOperand.StoreCheck());          return TRAP_REDUCED;        }      }      return UNCHANGED;    }  }