pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:420:    if(cumulative_parse_error) {   #else    size_t e=0, s=0;    count_memory_in_node_ss(&e, &s);    if(e) {   #endif    WALK_NONFREE_BLOCKS(node_s, tmp, tmp->token != USHRT_MAX, {   #ifdef PIKE_DEBUG    if(!cumulative_parse_error)    { -  fprintf(stderr,"Free node at %p, (%s:%d) (token=%d).\n", -  (void *)tmp, tmp->current_file->str, tmp->line_number, +  fprintf(stderr,"Free node at %p, (%s:%ld) (token=%d).\n", +  (void *)tmp, +  tmp->current_file->str, (long)tmp->line_number,    tmp->token);       debug_malloc_dump_references(tmp,0,2,0);       if(tmp->token==F_CONSTANT)    print_tree(tmp);    }    /* else */   #endif    {
pike.git/src/las.c:1137: Inside #if defined(PIKE_DEBUG)
   check_type_string(id->type);    check_string(id->name);    }   #endif       /* Mark the identifier reference as used. */    PTR_FROM_INT(parent_prog, i)->id_flags |= ID_USED;       copy_pike_type(res->type, id->type);    -  /* FIXME */ +  /* FIXME: The IDENTIFIER_IS_ALIAS case isn't handled! */    if(IDENTIFIER_IS_CONSTANT(id->identifier_flags))    {    if (!(PTR_FROM_INT(parent_prog, i)->id_flags & ID_LOCAL)) {    /* It's possible to overload the identifier. */    res->node_info = OPT_EXTERNAL_DEPEND;    } else if (id->func.const_info.offset != -1) { -  struct svalue *s = &parent_prog->constants[id->func.const_info.offset].sval; +  struct program *p = PROG_FROM_INT(parent_prog, i); +  struct svalue *s = &p->constants[id->func.const_info.offset].sval;    if ((TYPEOF(*s) == T_PROGRAM) &&    (s->u.program->flags & PROGRAM_USES_PARENT)) {    /* The constant program refers to its parent, so we need as well. */    res->node_info = OPT_EXTERNAL_DEPEND;    }    }    }else{    res->node_info = OPT_NOT_CONST;    if (IDENTIFIER_IS_VARIABLE(id->identifier_flags) &&    (id->run_time_type == PIKE_T_GET_SET)) {
pike.git/src/las.c:3527:    INT32 args;      #ifdef NEW_ARG_CHECK       args = 0;       name = get_name_of_function(CAR(n));      #ifdef PIKE_DEBUG    if (l_flag>2) -  safe_pike_fprintf (stderr, "Checking call to %S at %S:%d.\n", name, -  n->current_file, n->line_number); +  safe_pike_fprintf (stderr, "Checking call to %S at %S:%ld.\n", name, +  n->current_file, (long)n->line_number);   #endif /* PIKE_DEBUG */       /* NOTE: new_check_call() steals a reference from f! */    copy_pike_type(f, CAR(n)->type);    f = debug_malloc_pass(new_check_call(name, f, CDR(n), &args, 0));       if (!f) {    /* Errors have been generated. */    copy_pike_type(n->type, mixed_type_string);    break;
pike.git/src/las.c:5032: Inside #if defined(SHARED_NODES)
   return n2;   }   #endif /* SHARED_NODES */      static void optimize(node *n)   {    node *tmp1, *tmp2, *tmp3;    struct compilation *c = THIS_COMPILATION;    struct pike_string *save_file =    dmalloc_touch(struct pike_string *, c->lex.current_file); -  INT32 save_line = c->lex.current_line; +  INT_TYPE save_line = c->lex.current_line;       do    {    if(car_is_node(n) && !(CAR(n)->node_info & OPT_OPTIMIZED))    {    CAR(n)->parent = n;    n = CAR(n);    continue;    }    if(cdr_is_node(n) && !(CDR(n)->node_info & OPT_OPTIMIZED))
pike.git/src/las.c:5554:    {    tmp.c_fun=foo->u.efun->function;    if(tmp.c_fun != f_destruct &&    tmp.c_fun != f_this_object &&    tmp.c_fun != f_backtrace)    {   #ifdef PIKE_DEBUG    struct compilation *c = THIS_COMPILATION;       if(a_flag > 1) -  fprintf(stderr,"%s:%d: IDENTIFIER OPTIMIZATION %s == %s\n", +  fprintf(stderr,"%s:%ld: IDENTIFIER OPTIMIZATION %s == %s\n",    c->lex.current_file->str, -  c->lex.current_line, +  (long)c->lex.current_line,    name->str,    foo->u.efun->name->str);   #endif    ret=define_function(name,    type,    (unsigned INT16)modifiers,    (unsigned INT8)(IDENTIFIER_C_FUNCTION |    IDENTIFIER_HAS_BODY |    vargs),    &tmp,