pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.631 2007/11/15 17:41:52 grubba Exp $ + || $Id: program.c,v 1.632 2007/12/28 13:38:15 nilsson Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:2219:    break;    }       program_live_obj_set:;    }       if(Pike_compiler->flags & COMPILATION_CHECK_FINAL)    {    for(i=0;i<(int)p->num_identifier_references;i++)    { -  if((p->identifier_references[i].id_flags & (ID_NOMASK|ID_HIDDEN)) == -  ID_NOMASK) +  if((p->identifier_references[i].id_flags & (ID_FINAL|ID_HIDDEN)) == +  ID_FINAL)    {    struct pike_string *name=ID_FROM_INT(p, i)->name;       e=find_shared_string_identifier(name,p);    if(e == -1)    e=really_low_find_shared_string_identifier(name, p,    SEE_STATIC|SEE_PRIVATE);       if((e != i) && (e != -1))    {
pike.git/src/program.c:4304:    for (e=0; e < (int)p->num_identifier_references; e++)    {    struct reference fun;    struct pike_string *name;       fun = p->identifier_references[e]; /* Make a copy */       name=ID_FROM_PTR(p,&fun)->name;    fun.inherit_offset += inherit_offset;    -  if (fun.id_flags & ID_NOMASK) +  if (fun.id_flags & ID_FINAL)    {    Pike_compiler->flags |= COMPILATION_CHECK_FINAL;    }       if(fun.id_flags & ID_PRIVATE) fun.id_flags|=ID_HIDDEN;       if (fun.id_flags & ID_PUBLIC)    fun.id_flags |= flags & ~ID_PRIVATE;    else    fun.id_flags |= flags;
pike.git/src/program.c:4602:    my_yyerror("Identifier %S defined twice.",name);    return n;    }    if (flags & ID_EXTERN) {    /* FIXME: Check type */    return n;    }    }       if (!(IDENTIFIERP(n)->id_flags & ID_EXTERN)) { -  if (IDENTIFIERP(n)->id_flags & ID_NOMASK) -  my_yyerror("Illegal to redefine 'nomask/final' " +  if (IDENTIFIERP(n)->id_flags & ID_FINAL) +  my_yyerror("Illegal to redefine 'final' "    "variable/functions %S", name);       /* FIXME: More. */    }    }       return low_define_alias(name, type, flags, depth, refno);   }      /* argument must be a shared string */
pike.git/src/program.c:4777:    my_yyerror("Identifier %S defined twice.",name);    return n;    }    if (flags & ID_EXTERN) {    /* FIXME: Check type */    return n;    }    }       if (!(IDENTIFIERP(n)->id_flags & ID_EXTERN)) { -  if (IDENTIFIERP(n)->id_flags & ID_NOMASK) -  my_yyerror("Illegal to redefine 'nomask/final' " +  if (IDENTIFIERP(n)->id_flags & ID_FINAL) +  my_yyerror("Illegal to redefine 'final' "    "variable/functions %S", name);       if(!(IDENTIFIERP(n)->id_flags & ID_INLINE) ||    Pike_compiler->compiler_pass!=1)    {    int n2;       if(ID_FROM_INT(Pike_compiler->new_program, n)->type != type &&    !pike_types_le(type,    ID_FROM_INT(Pike_compiler->new_program, n)->type)) {
pike.git/src/program.c:5068: Inside #if defined(PROFILING)
   dummy.num_calls=0;    dummy.total_time=0;   #endif       debug_add_to_identifiers(dummy);       if(n != -1)    {    int overridden;    -  if(IDENTIFIERP(n)->id_flags & ID_NOMASK) -  my_yyerror("Illegal to redefine 'nomask' identifier %S", name); +  if(IDENTIFIERP(n)->id_flags & ID_FINAL) +  my_yyerror("Illegal to redefine 'final' identifier %S", name);       if(!TEST_COMPAT(7,2) &&    IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program,    n)->identifier_flags))    {    my_yyerror("Illegal to redefine variable %S as constant.", name);    }       /* not inherited */    if(Pike_compiler->new_program->identifier_references[n].inherit_offset == 0)
pike.git/src/program.c:5488:    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",    compilation_depth, " ");   #endif    -  if((ref.id_flags & ID_NOMASK) +  if((ref.id_flags & ID_FINAL)   #if 0    && !(funp->func.offset == -1)   #endif    )    { -  my_yyerror("Illegal to redefine 'nomask' function %S.", name); +  my_yyerror("Illegal to redefine 'final' function %S.", name);    }          if(ref.id_flags & ID_INLINE)    {   #ifdef PROGRAM_BUILD_DEBUG    fprintf(stderr, "%.*sidentifier is local\n",    compilation_depth, " ");   #endif