pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:3251:    {    struct identifier *i;    id=isidentifier(name);    if (id < 0)    Pike_fatal("Program constant disappeared in second pass.\n");    i=ID_FROM_INT(Pike_compiler->new_program, id);    free_type(i->type);    i->type=get_type_of_svalue(&tmp);    }    + #if 0    /* Reset annotations so that they can be readded properly. */    for (e = 0; e < p->num_annotations; e++) {    do_free_array(p->annotations[e]);    p->annotations[e] = NULL;    }    for (e = 0; e < p->num_inherits; e++) {    struct inherit *inh = p->inherits + e;    if (inh->inherit_level > 1) continue;    if (!inh->annotations) continue;    free_array(inh->annotations);    inh->annotations = NULL;    } -  + #endif /* 0 */    }    if (pass == COMPILER_PASS_FIRST) {    if(c->compilation_depth >= 1) {    add_ref(p->parent = Pike_compiler->new_program);    debug_malloc_touch (p);    }    }    p->flags &=~ PROGRAM_VIRGIN;    if(idp) *idp=id;   
pike.git/src/program.c:5273:    Pike_compiler->new_program->    inherits[Pike_compiler->num_inherits+1].prog;    inherit_offset = Pike_compiler->num_inherits + 1;    Pike_compiler->num_inherits += old_p->num_inherits;       if (old_p != p) {    yyerror("Got different program for inherit in second pass "    "(resolver problem).");    }    + #if 0    /* Restore annotations (if any) to and from the inherited program. */    if (p->inherits->annotations) {    struct inherit *src_inh = p->inherits;    struct inherit *dst_inh =    Pike_compiler->new_program->inherits + inherit_offset;    struct array *annotations;    int found_inh = 0;    int e;       dst_inh->annotations = annotations = copy_array(src_inh->annotations);
pike.git/src/program.c:5331:    dst_inh->annotations = NULL;    } else {    ref_push_object(Inherited_annotation);    dst_inh->annotations =    subtract_array_svalue(annotations, Pike_sp - 1);    pop_stack();    free_array(annotations);    }    }    } while(0); + #endif /* 0 */       if (Pike_compiler->compiler_pass == COMPILER_PASS_EXTRA) {    return;    }       assert(Pike_compiler->compiler_pass == COMPILER_PASS_LAST);       if (!(p->flags & PROGRAM_FINISHED)) {    /* Require that the inherited program really is finished in pass    * 2. Otherwise we might not have all definitions when we
pike.git/src/program.c:6204:    n = isidentifier(name);       if(Pike_compiler->new_program->flags & PROGRAM_PASS_1_DONE)    {    if(n==-1)    yyerror("Pass2: Variable disappeared!");    else {    struct reference *ref = PTR_FROM_INT(Pike_compiler->new_program, n);    struct identifier *id = ID_FROM_PTR(Pike_compiler->new_program, ref);    + #if 0    if (Pike_compiler->current_annotations) {    compiler_add_annotations(ref->identifier_offset,    Pike_compiler->current_annotations);    /* Only annotate a single identifier. */    free_node(Pike_compiler->current_annotations);    Pike_compiler->current_annotations = NULL;    } -  + #endif /* 0 */       free_type(id->type);    copy_pike_type(id->type, type);    return n;    }    }      #ifdef PIKE_DEBUG    if(Pike_compiler->new_program->flags & (PROGRAM_FIXED | PROGRAM_OPTIMIZED))    Pike_fatal("Attempting to add variable to fixed program\n");
pike.git/src/program.c:6468: Inside #if 1
  #if 1    || !c   #endif    )    {    yyerror("Pass2: Constant disappeared!");    }else{    struct reference *ref = PTR_FROM_INT(Pike_compiler->new_program, n);    struct identifier *id = ID_FROM_PTR(Pike_compiler->new_program, ref);    + #if 0    if (Pike_compiler->current_annotations) {    compiler_add_annotations(ref->identifier_offset,    Pike_compiler->current_annotations);    /* Only annotate a single identifier. */    free_node(Pike_compiler->current_annotations);    Pike_compiler->current_annotations = NULL;    } -  + #endif /* 0 */       if (IDENTIFIER_IS_ALIAS(id->identifier_flags)) {    /* FIXME: We probably ought to do something here... */    } else if(id->func.const_info.offset>=0) {    /* Update the stored constant. */    assign_svalue (&PROG_FROM_INT(Pike_compiler->new_program,n)->    constants[id->func.const_info.offset].sval, c);    } else {    id->run_time_type = (unsigned char) TYPEOF(*c);    id->func.const_info.offset = store_constant(c, 0, 0);
pike.git/src/program.c:6991:       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;       if(!(ref.id_flags & ID_INHERITED)) /* not inherited */    { + #if 0    if (Pike_compiler->current_annotations) {    compiler_add_annotations(ref.identifier_offset,    Pike_compiler->current_annotations);    /* Only annotate a single identifier. */    free_node(Pike_compiler->current_annotations);    Pike_compiler->current_annotations = NULL;    } -  + #endif /* 0 */       if( !( IDENTIFIER_IS_FUNCTION(funp->identifier_flags) &&    ( (!func || func->offset == -1) || (funp->func.offset == -1))))    {    my_yyerror("Identifier %S defined twice.", name);       if (getter_setter != -1) {    struct identifier *id = ID_FROM_INT(prog, getter_setter);    (&id->func.gs_info.getter)[is_setter] = i;    }