VM_Type lhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(lhsTib,TIB_TYPE_INDEX)); VM_Type rhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(rhsTib,TIB_TYPE_INDEX));
VM_Type lhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(lhsTib,Offset.fromIntZeroExtend(TIB_TYPE_INDEX<<LOG_BYTES_IN_ADDRESS))); VM_Type rhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(rhsTib,Offset.fromIntZeroExtend(TIB_TYPE_INDEX<<LOG_BYTES_IN_ADDRESS)));
  static void checkcastFinal(Object object, int targetTibOffset) throws UninterruptiblePragma {    if (object == null) return; // null can be cast to any type    Object lhsTib= VM_Magic.getObjectAtOffset(VM_Magic.getJTOC(), targetTibOffset);    Object rhsTib= VM_ObjectModel.getTIB(object);    if (lhsTib != rhsTib) {      VM_Type lhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(lhsTib,TIB_TYPE_INDEX));      VM_Type rhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset(rhsTib,TIB_TYPE_INDEX));      raiseCheckcastException(lhsType, rhsType);    }  }