pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:672:         /* here starts routines to make nodes */   static node *debug_mkemptynode(void)   {    node *res=alloc_node_s();       CHECK_COMPILER();      #ifdef __CHECKER__ -  MEMSET(res, 0, sizeof(node)); +  memset(res, 0, sizeof(node));   #endif /* __CHECKER__ */       res->refs = 0;    add_ref(res); /* For DMALLOC... */    res->token=0;    res->line_number=THIS_COMPILATION->lex.current_line;    copy_shared_string(res->current_file, THIS_COMPILATION->lex.current_file);    res->type=0;    res->name=0;    res->node_info=0;
pike.git/src/las.c:2507:    }   #endif /* PIKE_DEBUG */    return (*a)->vars + num;    }   #ifdef PIKE_DEBUG    if (l_flag > 4) {    fputs("Creating new scope.\n", stderr);    }   #endif /* PIKE_DEBUG */    new = (struct scope_info *)xalloc(sizeof(struct scope_info)); -  MEMSET(new, VAR_UNUSED, sizeof(struct scope_info)); +  memset(new, VAR_UNUSED, sizeof(struct scope_info));    new->next = *a;    new->scope_id = scope_id;    *a = new;    return new->vars + num;   }      /* FIXME: Ought to use parent pointer to avoid recursion. */   /* Find the variables that are used in the tree n. */   /* noblock: Don't mark unused variables that are written to as blocked.    * overwrite: n is an lvalue that is overwritten.
pike.git/src/las.c:4037: 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); +  memset(switch_usage, 0, 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;    }       case F_RETURN: -  MEMSET(usage, 0, MAX_LOCAL); +  memset(usage, 0, MAX_LOCAL);    /* FIXME: The function arguments should be marked "used", since    * they are seen in backtraces.    */    return;       case F_LOR:    case F_LAND:    {    unsigned char trail_usage[MAX_LOCAL];    int i;
pike.git/src/las.c:4124: Inside #if defined(SHARED_NODES) && 0
   unsigned char continue_usage[MAX_LOCAL];    int i;       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); +  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);       find_usage(CADR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);
pike.git/src/las.c:4156: Inside #if defined(SHARED_NODES) && 0
   {    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);       /* Find the usage from the loop */    -  MEMSET(loop_usage, 0, MAX_LOCAL); +  memset(loop_usage, 0, 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) {
pike.git/src/las.c:4350: 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); +  memset(switch_usage, 0, 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);    }       case F_RETURN: -  MEMSET(usage, 0, MAX_LOCAL); +  memset(usage, 0, MAX_LOCAL);    /* FIXME: The function arguments should be marked "used", since    * they are seen in backtraces.    */    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];
pike.git/src/las.c:4472: Inside #if defined(SHARED_NODES) && 0
   * C    * } while (a A|B);    * A    * }    * break:    * A    */       /* Find the usage from the loop. */    -  MEMSET(loop_usage, 0, MAX_LOCAL); +  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);       find_usage(CADR(n), loop_usage, switch_u, continue_usage, break_usage,    catch_u);
pike.git/src/las.c:4546: Inside #if defined(SHARED_NODES) && 0
   * C    * body;    * continue:    * A|B    * }    * break:    * A    */       /* Find the usage from the loop */ -  MEMSET(loop_usage, 0, MAX_LOCAL); +  memset(loop_usage, 0, 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) {
pike.git/src/las.c:4620: Inside #if defined(SHARED_NODES) && 0
     static node *localopt(node *n)   {    unsigned char usage[MAX_LOCAL];    unsigned char b_usage[MAX_LOCAL];    unsigned char c_usage[MAX_LOCAL];    unsigned char s_usage[MAX_LOCAL];    unsigned char catch_usage[MAX_LOCAL];    node *n2;    -  MEMSET(usage, 0, MAX_LOCAL); -  MEMSET(b_usage, 0, MAX_LOCAL); -  MEMSET(c_usage, 0, MAX_LOCAL); -  MEMSET(s_usage, 0, MAX_LOCAL); -  MEMSET(catch_usage, 0, MAX_LOCAL); +  memset(usage, 0, MAX_LOCAL); +  memset(b_usage, 0, MAX_LOCAL); +  memset(c_usage, 0, MAX_LOCAL); +  memset(s_usage, 0, MAX_LOCAL); +  memset(catch_usage, 0, MAX_LOCAL);       n2 = low_localopt(n, usage, s_usage, c_usage, b_usage, catch_usage);      #ifdef PIKE_DEBUG    if (l_flag > 0) {    if ((n2 != n) || (l_flag > 4)) {    fputs("\nBefore localopt: ", stderr);    print_tree(n);       fputs("After localopt: ", stderr);