pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
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.
753
2008/09/
04
11:
36
:
45
grubba Exp $
+
|| $Id: program.c,v 1.
754
2008/09/
14
11:
16
:
23
grubba 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:2018:
struct reference *ref = Pike_compiler->new_program->identifier_references + cur_id; struct identifier *i; /* No need to do anything for ourselves. */ if (ref == new_ref) continue; /* Do not zapp hidden identifiers */ if(ref->id_flags & ID_HIDDEN) continue;
-
/* Do not zapp inherited inline ('local') identifiers */
-
if((ref->id_flags & (ID_INLINE|ID_INHERITED)) == (ID_INLINE|ID_INHERITED))
-
continue;
-
+
/* Do not zapp functions with the wrong name... */ if((i = ID_FROM_PTR(Pike_compiler->new_program, ref))->name != name) continue;
-
+
/* Do not zapp inherited inline ('local') identifiers */
+
if((ref->id_flags & (ID_INLINE|ID_INHERITED)) == (ID_INLINE|ID_INHERITED)) {
+
/* 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", 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;