pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:5746:
} /* argument must be a shared string */ int low_define_variable(struct pike_string *name, struct pike_type *type, INT32 flags, size_t offset, INT32 run_time_type) { struct compilation *c = THIS_COMPILATION;
+
unsigned int identifier_flags = IDENTIFIER_VARIABLE;
union idptr func; #ifdef PIKE_DEBUG if(Pike_compiler->new_program->flags & (PROGRAM_FIXED | PROGRAM_OPTIMIZED)) Pike_fatal("Attempting to add variable to fixed program\n"); if(Pike_compiler->compiler_pass == COMPILER_PASS_LAST) Pike_fatal("Internal error: Not allowed to add more identifiers during second compiler pass.\n" "Added identifier: \"%s\"\n", name->str); #endif func.offset = offset - Pike_compiler->new_program->inherits[0].storage_offset; if (run_time_type == PIKE_T_FREE) func.offset = -1;
-
+
if (run_time_type & PIKE_T_NO_REF_FLAG) {
+
run_time_type &= ~PIKE_T_NO_REF_FLAG;
+
identifier_flags |= IDENTIFIER_NO_THIS_REF;
+
}
+
if (flags & ID_PRIVATE) flags |= ID_LOCAL|ID_PROTECTED; return add_identifier(c, type, name,
-
flags,
IDENTIFIER
_
VARIABLE
, 0,
+
flags,
identifier
_
flags
, 0,
func, run_time_type); } /* type is a serialized tokenized type. */ PMOD_EXPORT int quick_map_variable(const char *name, int name_length, size_t offset, const char *type, int UNUSED(type_length),