pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4930:    * the shifts for the minterms in enum pt_binop.    *    * bounds[] and ab[] are created with insert sort.    */    bound = CAR_TO_INT(a);    for (i = nbounds; i-- && bounds[i] > bound;) {    ab[i] |= 2;    }    if (bounds[i] < bound) {    /* We need to insert a bound. */ -  i++; +     memmove(bounds + i + 1, bounds + i,    sizeof(bounds[i]) * (nbounds - i)); -  +  memmove(ab + i + 1, +  ab + i, sizeof(ab[i]) * (nbounds - i)); +  i++;    nbounds++;    bounds[i] = bound; -  +  ab[i] |= 2;    } else if (bounds[i] == bound) {    ab[i] |= 2;    }       bound = CDR_TO_INT(a);    if (bound < MAX_INT32) {    bound++;    for (i = nbounds; i-- && bounds[i] > bound;) {    ab[i] &= ~2;    }    if (bounds[i] < bound) {    /* We need to insert a bound. */ -  i++; +     memmove(bounds + i + 1, bounds + i,    sizeof(bounds[i]) * (nbounds - i)); -  +  memmove(ab + i + 1, +  ab + i, sizeof(ab[i]) * (nbounds - i)); +  i++;    nbounds++;    bounds[i] = bound; -  +  ab[i] &= ~2;    } else if (bounds[i] == bound) {    ab[i] &= ~2;    }    }       bound = CAR_TO_INT(b);    for (i = nbounds; i-- && bounds[i] > bound;) {    ab[i] |= 1;    }    if (bounds[i] < bound) {    /* We need to insert a bound. */ -  i++; +     memmove(bounds + i + 1,    bounds + i, sizeof(bounds[i]) * (nbounds - i)); -  +  memmove(ab + i + 1, +  ab + i, sizeof(ab[i]) * (nbounds - i)); +  i++;    nbounds++;    bounds[i] = bound; -  +  ab[i] |= 1;    } else if (bounds[i] == bound) {    ab[i] |= 1;    }       bound = CDR_TO_INT(b);    if (bound < MAX_INT32) {    bound++;    for (i = nbounds; i-- && bounds[i] > bound;) {    ab[i] &= ~1;    }    if (bounds[i] < bound) {    /* We need to insert a bound. */ -  i++; +     memmove(bounds + i + 1, bounds + i,    sizeof(bounds[i]) * (nbounds - i)); -  +  memmove(ab + i + 1, +  ab + i, sizeof(ab[i]) * (nbounds - i)); +  i++;    nbounds++;    bounds[i] = bound; -  +  ab[i] &= ~1;    } else if (bounds[i] == bound) {    ab[i] &= ~1;    }    }       type_stack_mark();       for (i = 0; i < nbounds;) {    bound = MAX_INT32; -  for (i = 0; i < nbounds; i++) { +  for (;i < nbounds; i++) {    if ((PT_BINOP_NOR >> ab[i]) & op) {    /* Found start of range. */    bound = bounds[i]; -  +  break;    }    }    if (i == nbounds) break;    for (; i < nbounds; i++) {    if (!((PT_BINOP_NOR >> ab[i]) & op)) {    /* Found end of range. */    break;    }    }    if (i < nbounds) {