pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:2439:    src = ret->locals;    while(src) {    struct scope_info *tmp = src->next;    free(src);    src = tmp;    }    free(ret);    Pike_error("Out of memory in copy_vars.\n");    return NULL; /* Make sure that the optimizer knows we exit here. */    } -  MEMCPY(*dst, src, sizeof(struct scope_info)); +  memcpy(*dst, src, sizeof(struct scope_info));    src = src->next;    dst = &((*dst)->next);    *dst = NULL;    }    src = a->externals;    dst = &(ret->externals);    *dst = NULL;    while (src) {    *dst = malloc(sizeof(struct scope_info));    if (!*dst) {
pike.git/src/las.c:2466:    src = ret->externals;    while(src) {    struct scope_info *tmp = src->next;    free(src);    src = tmp;    }    free(ret);    Pike_error("Out of memory in copy_vars.\n");    return NULL; /* Make sure that the optimizer knows we exit here. */    } -  MEMCPY(*dst, src, sizeof(struct scope_info)); +  memcpy(*dst, src, sizeof(struct scope_info));    src = src->next;    dst = &((*dst)->next);    *dst = NULL;    }       ret->err = a->err;    ret->ext_flags = a->ext_flags;    return ret;   }   
pike.git/src/las.c:3974: Inside #if defined(SHARED_NODES) && 0
   find_usage(CADAR(n), usage, switch_u, cont_u, break_u, catch_u);    }    return;    }       case F_CATCH:    {    unsigned char catch_usage[MAX_LOCAL];    int i;    -  MEMCPY(catch_usage, usage, MAX_LOCAL); +  memcpy(catch_usage, usage, MAX_LOCAL);    find_usage(CAR(n), usage, switch_u, cont_u, catch_usage, catch_usage);    for(i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_usage[i];    }    return;    }       case F_AUTO_MAP:    case F_APPLY:    {
pike.git/src/las.c:4010: Inside #if defined(SHARED_NODES) && 0
   usage[CAR(n)->u.integer.a] = 0;    }    }    return;       case F_ARRAY_LVALUE:    find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;       case F_CONTINUE: -  MEMCPY(usage, cont_u, MAX_LOCAL); +  memcpy(usage, cont_u, MAX_LOCAL);    return;       case F_BREAK: -  MEMCPY(usage, break_u, MAX_LOCAL); +  memcpy(usage, break_u, MAX_LOCAL);    return;       case F_DEFAULT:    case F_CASE:    case F_CASE_RANGE:    {    int i;       find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);    find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);
pike.git/src/las.c:4038: Inside #if defined(SHARED_NODES) && 0
   return;    }       case F_SWITCH:    {    unsigned char break_usage[MAX_LOCAL];    unsigned char switch_usage[MAX_LOCAL];    int i;       memset(switch_usage, 0, MAX_LOCAL); -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       find_usage(CDR(n), usage, switch_usage, cont_u, break_usage, catch_u);       for(i = 0; i < MAX_LOCAL; i++) {    usage[i] |= switch_usage[i];    }       find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;    }
pike.git/src/las.c:4063: Inside #if defined(SHARED_NODES) && 0
   * they are seen in backtraces.    */    return;       case F_LOR:    case F_LAND:    {    unsigned char trail_usage[MAX_LOCAL];    int i;    -  MEMCPY(trail_usage, usage, MAX_LOCAL); +  memcpy(trail_usage, usage, MAX_LOCAL);       find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);       for(i=0; i < MAX_LOCAL; i++) {    usage[i] |= trail_usage[i];    }       find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;    }       case '?':    {    unsigned char cadr_usage[MAX_LOCAL];    unsigned char cddr_usage[MAX_LOCAL];    int i;    -  MEMCPY(cadr_usage, usage, MAX_LOCAL); -  MEMCPY(cddr_usage, usage, MAX_LOCAL); +  memcpy(cadr_usage, usage, MAX_LOCAL); +  memcpy(cddr_usage, usage, MAX_LOCAL);       find_usage(CADR(n), cadr_usage, switch_u, cont_u, break_u, catch_u);    find_usage(CDDR(n), cddr_usage, switch_u, cont_u, break_u, catch_u);       for (i=0; i < MAX_LOCAL; i++) {    usage[i] = cadr_usage[i] | cddr_usage[i];    }    find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;    }       case F_DO:    {    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       find_usage(CDR(n), usage, switch_u, cont_u, break_usage, catch_u);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       find_usage(CAR(n), usage, switch_u, break_usage, continue_usage,    catch_u);    return;    }       case F_FOR:    {    unsigned char loop_usage[MAX_LOCAL];    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    int i;    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       /* for(;a;b) c; is handled like:    *    * if (a) { do { c; b; } while(a); }    */       memset(loop_usage, 0, MAX_LOCAL);       find_usage(CAR(n), loop_usage, switch_u, cont_u, break_u, catch_u);    if (CDR(n)) {    find_usage(CDDR(n), loop_usage, switch_u, cont_u, break_usage,    catch_u);    -  MEMCPY(continue_usage, loop_usage, MAX_LOCAL); +  memcpy(continue_usage, loop_usage, MAX_LOCAL);       find_usage(CADR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);    }       for (i = 0; i < MAX_LOCAL; i++) {    usage[i] |= loop_usage[i];    }       find_usage(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return;    }       case F_FOREACH:    {    unsigned char loop_usage[MAX_LOCAL];    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    int i;    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       /* Find the usage from the loop */       memset(loop_usage, 0, MAX_LOCAL);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       find_usage(CDR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);    if (CDAR(n)->token == F_LOCAL) {    if (!(CDAR(n)->u.integer.b)) {    loop_usage[CDAR(n)->u.integer.a] = 0;    }    } else if (CDAR(n)->token == F_LVALUE_LIST) {    find_usage(CDAR(n), loop_usage, switch_u, cont_u, break_u, catch_u);    }
pike.git/src/las.c:4267: Inside #if defined(SHARED_NODES) && 0
   }    ADD_NODE_REF(n);    return n;    }       case F_CATCH:    {    unsigned char catch_usage[MAX_LOCAL];    int i;    -  MEMCPY(catch_usage, usage, MAX_LOCAL); +  memcpy(catch_usage, usage, MAX_LOCAL);    car = low_localopt(CAR(n), usage, switch_u, cont_u, catch_usage,    catch_usage);    for(i=0; i < MAX_LOCAL; i++) {    usage[i] |= catch_usage[i];    }    return mknode(F_CATCH, car, 0);    }    break;       case F_AUTO_MAP:
pike.git/src/las.c:4321: Inside #if defined(SHARED_NODES) && 0
      case F_CAST:    return mkcastnode(n->type, low_localopt(CAR(n), usage, switch_u, cont_u,    break_u, catch_u));       case F_SOFT_CAST:    return mksoftcastnode(n->type, low_localopt(CAR(n), usage, switch_u,    cont_u, break_u, catch_u));       case F_CONTINUE: -  MEMCPY(usage, cont_u, MAX_LOCAL); +  memcpy(usage, cont_u, MAX_LOCAL);    ADD_NODE_REF(n);    return n;       case F_BREAK: -  MEMCPY(usage, break_u, MAX_LOCAL); +  memcpy(usage, break_u, MAX_LOCAL);    ADD_NODE_REF(n);    return n;       case F_DEFAULT:    case F_CASE:    case F_CASE_RANGE:    {    int i;       cdr = low_localopt(CDR(n), usage, switch_u, cont_u, break_u, catch_u);
pike.git/src/las.c:4351: Inside #if defined(SHARED_NODES) && 0
   return mknode(n->token, car, cdr);    }       case F_SWITCH:    {    unsigned char break_usage[MAX_LOCAL];    unsigned char switch_usage[MAX_LOCAL];    int i;       memset(switch_usage, 0, MAX_LOCAL); -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       cdr = low_localopt(CDR(n), usage, switch_usage, cont_u, break_usage,    catch_u);       for(i = 0; i < MAX_LOCAL; i++) {    usage[i] |= switch_usage[i];    }       car = low_localopt(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return mknode(F_SWITCH, car, cdr);
pike.git/src/las.c:4378: Inside #if defined(SHARED_NODES) && 0
   */    return mknode(F_RETURN, low_localopt(CAR(n), usage, switch_u, cont_u,    break_u, catch_u), 0);       case F_LOR:    case F_LAND:    {    unsigned char trail_usage[MAX_LOCAL];    int i;    -  MEMCPY(trail_usage, usage, MAX_LOCAL); +  memcpy(trail_usage, usage, MAX_LOCAL);       cdr = low_localopt(CDR(n), usage, switch_u, cont_u, break_u, catch_u);       for(i=0; i < MAX_LOCAL; i++) {    usage[i] |= trail_usage[i];    }       car = low_localopt(CAR(n), usage, switch_u, cont_u, break_u, catch_u);       return mknode(n->token, car, cdr);    }       case '?':    {    unsigned char cadr_usage[MAX_LOCAL];    unsigned char cddr_usage[MAX_LOCAL];    int i;    -  MEMCPY(cadr_usage, usage, MAX_LOCAL); -  MEMCPY(cddr_usage, usage, MAX_LOCAL); +  memcpy(cadr_usage, usage, MAX_LOCAL); +  memcpy(cddr_usage, usage, MAX_LOCAL);       car = low_localopt(CADR(n), cadr_usage, switch_u, cont_u, break_u,    catch_u);    cdr = low_localopt(CDDR(n), cddr_usage, switch_u, cont_u, break_u,    catch_u);       for (i=0; i < MAX_LOCAL; i++) {    usage[i] = cadr_usage[i] | cddr_usage[i];    }    cdr = mknode(':', car, cdr);    car = low_localopt(CAR(n), usage, switch_u, cont_u, break_u, catch_u);    return mknode('?', car, cdr);    }       case F_DO:    {    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    int i;    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       /* Find the usage from the loop */    find_usage(CDR(n), usage, switch_u, cont_u, break_u, catch_u);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       find_usage(CAR(n), usage, switch_u, continue_usage, break_usage,    catch_u);       for (i = 0; i < MAX_LOCAL; i++) {    usage[i] |= break_usage[i];    }       cdr = low_localopt(CDR(n), usage, switch_u, cont_u, break_usage,    catch_u);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       car = low_localopt(CAR(n), usage, switch_u, continue_usage, break_usage,    catch_u);       return mknode(F_DO, car, cdr);    }       case F_FOR:    {    unsigned char loop_usage[MAX_LOCAL];    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    int i;    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       /*    * if (a A|B) {    * B    * do {    * B    * c;    * continue:    * D    * b;
pike.git/src/las.c:4479: Inside #if defined(SHARED_NODES) && 0
      /* Find the usage from the loop. */       memset(loop_usage, 0, MAX_LOCAL);       find_usage(CAR(n), loop_usage, switch_u, cont_u, break_u, catch_u);    if (CDR(n)) {    find_usage(CDDR(n), loop_usage, switch_u, cont_u, break_usage,    catch_u);    -  MEMCPY(continue_usage, loop_usage, MAX_LOCAL); +  memcpy(continue_usage, loop_usage, MAX_LOCAL);       find_usage(CADR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);    }       for (i = 0; i < MAX_LOCAL; i++) {    usage[i] |= loop_usage[i];    }       /* The last thing to be evaluated is the conditional */    car = low_localopt(CAR(n), usage, switch_u, cont_u, break_u, catch_u);       if (CDR(n)) {    node *cadr, *cddr;       /* The incrementor */    cddr = low_localopt(CDDR(n), usage, switch_u, cont_u, break_usage,    catch_u);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       /* The body */    cadr = low_localopt(CADR(n), usage, switch_u, continue_usage,    break_usage, catch_u);    cdr = mknode(':', cadr, cddr);    } else {    cdr = 0;    }       for (i = 0; i < MAX_LOCAL; i++) {
pike.git/src/las.c:4526: Inside #if defined(SHARED_NODES) && 0
   return mknode(F_FOR, car, cdr);    }       case F_FOREACH:    {    unsigned char loop_usage[MAX_LOCAL];    unsigned char break_usage[MAX_LOCAL];    unsigned char continue_usage[MAX_LOCAL];    int i;    -  MEMCPY(break_usage, usage, MAX_LOCAL); +  memcpy(break_usage, usage, MAX_LOCAL);       /*    * D    * arr = copy_value(arr);    * int i = 0;    * A|B    * while (i < sizeof(arr)) {    * B    * loopvar = arr[i];    * C
pike.git/src/las.c:4548: Inside #if defined(SHARED_NODES) && 0
   * continue:    * A|B    * }    * break:    * A    */       /* Find the usage from the loop */    memset(loop_usage, 0, MAX_LOCAL);    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);       find_usage(CDR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);    if (CDAR(n)->token == F_LOCAL) {    if (!(CDAR(n)->u.integer.b)) {    loop_usage[CDAR(n)->u.integer.a] = 0;    }    } else if (CDAR(n)->token == F_LVALUE_LIST) {    find_usage(CDAR(n), loop_usage, switch_u, cont_u, break_u, catch_u);    }       for (i = 0; i < MAX_LOCAL; i++) {    usage[i] |= loop_usage[i];    }    -  MEMCPY(continue_usage, usage, MAX_LOCAL); +  memcpy(continue_usage, usage, MAX_LOCAL);    cdr = low_localopt(CDR(n), usage, switch_u, continue_usage, break_usage,    catch_u);    if (CDAR(n)->token == F_LOCAL) {    if (!(CDAR(n)->u.integer.b)) {    usage[CDAR(n)->u.integer.a] = 0;    }    } else if (CDAR(n)->token == F_LVALUE_LIST) {    find_usage(CDAR(n), usage, switch_u, cont_u, break_u, catch_u);    }