pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:1276:
#define RELOCATE_identifier_cache(ORIG,NEW) #define RELOCATE_linenumbers(ORIG,NEW) #define RELOCATE_identifier_index(ORIG,NEW) #define RELOCATE_variable_index(ORIG,NEW) #define RELOCATE_identifier_references(ORIG,NEW) #define RELOCATE_strings(ORIG,NEW) #define RELOCATE_inherits(ORIG,NEW) #define RELOCATE_identifiers(ORIG,NEW) #define RELOCATE_constants(ORIG,NEW) #define RELOCATE_relocations(ORIG,NEW)
+
#define RELOCATE_static_storage(ORIG,NEW)
#if SIZEOF_LONG_LONG == 8 /* we have 8 byte ints, hopefully this constant works on all these systems */ #define MAXVARS(NUMTYPE) \ (NUMTYPE)(sizeof(NUMTYPE)==1?254: \ (sizeof(NUMTYPE)==2?65534: \ (sizeof(NUMTYPE)==4?4294967294U:18446744073709551614ULL))) #else #define MAXVARS(NUMTYPE) \ (NUMTYPE)(sizeof(NUMTYPE)==1?254: (sizeof(NUMTYPE)==2?65534:4294967294U))
pike.git/src/program.c:6304:
Pike_error("Lookup of identifier %s in destructed object.\n", name); } else { Pike_error("Lookup of long identifier in destructed object.\n"); } } n=findstring(name); if(!n) return -1; return find_shared_string_identifier(n,prog); }
+
int allocate_static_storage(int num_ints)
+
{
+
int ret = Pike_compiler->new_program->num_static_storage;
+
while (num_ints > 0) {
+
add_to_static_storage(0);
+
num_ints--;
+
}
+
return ret;
+
}
+
int store_prog_string(struct pike_string *str) { unsigned int i; for (i=0;i<Pike_compiler->new_program->num_strings;i++) if (Pike_compiler->new_program->strings[i] == str) return i; reference_shared_string(str); add_to_strings(str);