pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:2694:    * since this makes it hard to identify in encode_value().    */    if((ref->id_flags & (ID_INLINE|ID_INHERITED)) == (ID_INLINE|ID_INHERITED)    || (ref->id_flags & new_ref->id_flags & ID_EXTERN)) {    /* But we still need to hide them, since we shadow them... */    ref->id_flags |= ID_HIDDEN;    continue;    }      #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*soverloaded reference %d (id_flags:0x%04x)\n", +  fprintf(stderr, "%*soverloaded reference %d (id_flags:0x%04x)\n",    c->compilation_depth, "", cur_id, ref->id_flags);   #endif       if (!new_is_variable && IDENTIFIER_IS_VARIABLE(i->identifier_flags)) {    /* Overloading a variable with a constant or a function.    * This is generally a bad idea.    */    ref->id_flags |= ID_INLINE|ID_HIDDEN;    yywarning("Attempt to override a non local variable %S "    "with a non-variable.", name);
pike.git/src/program.c:3217:    }else{    ((struct parent_info *)Pike_compiler->fake_object->storage)->parent=0;    ((struct parent_info *)Pike_compiler->fake_object->storage)->parent_identifier=0;    }    }       Pike_compiler->new_program=p;      #ifdef PROGRAM_BUILD_DEBUG    if (name) { -  fprintf (stderr, "%.*sstarting program %d (pass=%d): ", +  fprintf (stderr, "%*sstarting program %d (pass=%d): ",    c->compilation_depth, "",    Pike_compiler->new_program->id, Pike_compiler->compiler_pass);    push_string (name);    print_svalue (stderr, --Pike_sp);    putc ('\n', stderr);    }    else -  fprintf (stderr, "%.*sstarting program %d (pass=%d)\n", +  fprintf (stderr, "%*sstarting program %d (pass=%d)\n",    c->compilation_depth, "",    Pike_compiler->new_program->id, Pike_compiler->compiler_pass);   #endif       if (c->compilation_depth >= 1) {    if(c->lex.pragmas & ID_SAVE_PARENT)    {    p->flags |= PROGRAM_USES_PARENT;    } else if (!(c->lex.pragmas & ID_DONT_SAVE_PARENT)) {    struct pike_string *tmp=findstring("__pragma_save_parent__");
pike.git/src/program.c:4393: Inside #if defined(PIKE_DEBUG)
  #ifdef PIKE_DEBUG    if (prog) {    check_program(prog);    if(l_flag)    dump_program_desc(prog);    }   #endif    }      #ifdef PROGRAM_BUILD_DEBUG -  fprintf (stderr, "%.*sfinishing program %d (pass=%d)\n", +  fprintf (stderr, "%*sfinishing program %d (pass=%d)\n",    c->compilation_depth, "",    Pike_compiler->new_program->id, Pike_compiler->compiler_pass);   #endif       toss_compilation_resources();      #if 0    CDFPRINTF("th(%ld) end_first_pass(): "    "%p compilation_depth:%d, Pike_compiler->compiler_pass:%d\n",    (long)th_self(), prog,
pike.git/src/program.c:5722:    struct pike_string *n;    struct pike_type *t;       n = make_shared_binary_string(name, name_length);    t = make_pike_type(type);      #ifdef PROGRAM_BUILD_DEBUG    {    struct compilation *c = THIS_COMPILATION;    struct pike_string *d = describe_type (t); -  fprintf (stderr, "%.*sdefining variable (pass=%d): %s ", +  fprintf (stderr, "%*sdefining variable (pass=%d): %s ",    c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);    free_string (d);    push_string (n);    print_svalue (stderr, --Pike_sp);    putc ('\n', stderr);    }   #endif       ret=low_define_variable(n,t,flags|ID_USED,offset,run_time_type);    free_string(n);
pike.git/src/program.c:5775: Inside #if defined(PIKE_DEBUG)
   int no_this = 0;   #ifdef PIKE_DEBUG    if(name != debug_findstring(name))    Pike_fatal("define_variable on nonshared string.\n");   #endif      #ifdef PROGRAM_BUILD_DEBUG    {    struct compilation *c = THIS_COMPILATION;    struct pike_string *d = describe_type (type); -  fprintf (stderr, "%.*sdefining variable (pass=%d): %s ", +  fprintf (stderr, "%*sdefining variable (pass=%d): %s ",    c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);    free_string (d);    push_string (name);    print_svalue (stderr, --Pike_sp);    putc ('\n', stderr);    }   #endif       if(type == void_type_string)    yyerror("Variables can't be of type void.");
pike.git/src/program.c:5943:    int n;    struct compilation *cc = THIS_COMPILATION;    struct identifier dummy;    struct reference ref;      #ifdef PROGRAM_BUILD_DEBUG    {    if (c) {    struct pike_type *t = get_type_of_svalue(c);    struct pike_string *d = describe_type (t); -  fprintf (stderr, "%.*sdefining constant (pass=%d): %s ", +  fprintf (stderr, "%*sdefining constant (pass=%d): %s ",    cc->compilation_depth, "",    Pike_compiler->compiler_pass, d->str);    free_type(t);    free_string (d);    push_string (name);    print_svalue (stderr, --Pike_sp);    fputs (" = ", stderr);    print_svalue (stderr, c);    }    else { -  fprintf (stderr, "%.*sdeclaring constant (pass=%d): ", +  fprintf (stderr, "%*sdeclaring constant (pass=%d): ",    cc->compilation_depth, "",    Pike_compiler->compiler_pass);    push_string (name);    print_svalue (stderr, --Pike_sp);    }    putc ('\n', stderr);    }   #endif      #if 0
pike.git/src/program.c:6063:    } else {    id->run_time_type = (unsigned char) TYPEOF(*c);    id->func.const_info.offset = store_constant(c, 0, 0);    }    free_type(id->type);    if( !(flags & ID_INLINE) )    id->type = get_lax_type_of_svalue( c );    else    id->type = get_type_of_svalue( c );   #ifdef PROGRAM_BUILD_DEBUG -  fprintf (stderr, "%.*sstored constant #%d at %d\n", +  fprintf (stderr, "%*sstored constant #%d at %d\n",    cc->compilation_depth, "",    n, id->func.const_info.offset);   #endif    }    return n;    }      #ifdef PIKE_DEBUG    if(Pike_compiler->new_program->flags & (PROGRAM_FIXED | PROGRAM_OPTIMIZED))    Pike_fatal("Attempting to add constant to fixed program\n");
pike.git/src/program.c:6334:    int run_time_type = T_FUNCTION;    INT32 i;    int getter_setter = -1;    int is_setter = 0;       CHECK_COMPILER();      #ifdef PROGRAM_BUILD_DEBUG    {    struct pike_string *d = describe_type (type); -  fprintf (stderr, "%.*sdefining function (pass=%d): %s ", +  fprintf (stderr, "%*sdefining function (pass=%d): %s ",    c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);    free_string (d);    push_string (name);    print_svalue (stderr, --Pike_sp);    putc ('\n', stderr);    }   #endif      #ifdef PROFILING    fun.self_time=0;
pike.git/src/program.c:6556:    }    }       if(i >= 0)    {    int overridden;       /* already defined */      #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*sexisted as identifier #%d\n", +  fprintf(stderr, "%*sexisted as identifier #%d\n",    c->compilation_depth, "", i);   #endif       funp = ID_FROM_INT(prog, i);    ref = prog->identifier_references[i];       if (funp->identifier_flags & IDENTIFIER_HAS_BODY)    /* Keep this flag. */    function_flags |= IDENTIFIER_HAS_BODY;   
pike.git/src/program.c:6614:       funp->identifier_flags=function_flags;    funp->run_time_type = run_time_type;       funp->opt_flags &= opt_flags;       free_type(funp->type);    copy_pike_type(funp->type, type);    }else{   #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*sidentifier was inherited\n", +  fprintf(stderr, "%*sidentifier was inherited\n",    c->compilation_depth, "");   #endif       if((ref.id_flags & ID_FINAL)   #if 0    && !(funp->func.offset == -1)   #endif    )    {    my_yyerror("Illegal to redefine 'final' function %S.", name);
pike.git/src/program.c:6654:    my_yyerror("Overloading variant function %S with non-variant in same class.",    name);    }    prog->identifier_references[j].id_flags |= ID_HIDDEN;    }    }       if(ref.id_flags & ID_INLINE)    {   #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*sidentifier is local\n", +  fprintf(stderr, "%*sidentifier is local\n",    c->compilation_depth, "");   #endif    /* Hide the previous definition, and make a new definition. */    prog->identifier_references[i].id_flags |= ID_PROTECTED;    goto make_a_new_def;    }       /* Otherwise we alter the existing definition */   #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*saltering the existing definition\n", +  fprintf(stderr, "%*saltering the existing definition\n",    c->compilation_depth, "");   #endif       copy_shared_string(fun.name, name);    copy_pike_type(fun.type, type);    fun.filename_strno = store_prog_string(c->lex.current_file);    fun.linenumber = c->lex.current_line;       fun.run_time_type = run_time_type;   
pike.git/src/program.c:6787:    }       ref.run_time_type = PIKE_T_UNKNOWN;       /* Add the reference. */       i = prog->num_identifier_references;    add_to_identifier_references(ref);      #ifdef PROGRAM_BUILD_DEBUG -  fprintf(stderr, "%.*sadded new definition #%d\n", +  fprintf(stderr, "%*sadded new definition #%d\n",    c->compilation_depth, "", i);   #endif       if (getter_setter != -1) {    struct identifier *id = ID_FROM_INT(prog, getter_setter);    INT32 old_i = (&id->func.gs_info.getter)[is_setter];    if (old_i >= 0) {    my_yyerror("Multiple definitions for %S.", name);    }    (&id->func.gs_info.getter)[is_setter] = i;