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.678 2008/04/26 16:08:13 grubba Exp $
+ || $Id: program.c,v 1.679 2008/04/26 19:04:26 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:1220:
struct program *null_program=0;
struct program *compilation_program = 0;
struct program *compilation_env_program = 0;
struct object *compilation_environment = NULL;
struct program *gc_internal_program = 0;
static struct program *gc_mark_program_pos = 0;
- int compilation_depth=-1;
+
static struct mapping *resolve_cache=0;
#ifdef PIKE_DEBUG
#define CHECK_FILE_ENTRY(PROG, POS, LEN, SHIFT) \
do { \
if (SHIFT < 0 || SHIFT > 2 || \
POS + (LEN << SHIFT) > PROG->linenumbers + PROG->num_linenumbers) \
Pike_fatal ("Invalid file entry in linenumber info.\n"); \
} while (0)
#else
pike.git/src/program.c:1555:
{
struct compilation *c = THIS_COMPILATION;
struct node_s *ret;
struct svalue *modules=(struct svalue *)
(c->used_modules.s.str + c->used_modules.s.len);
{
struct program_state *p=Pike_compiler;
int n;
- for(n=0;n<=compilation_depth;n++,p=p->previous)
+ for(n=0;n<=c->compilation_depth;n++,p=p->previous)
{
int i;
if(see_inherit)
{
i=really_low_find_shared_string_identifier(ident,
p->new_program,
SEE_STATIC|SEE_PRIVATE);
if(i!=-1)
{
return p == Pike_compiler ?
pike.git/src/program.c:1758:
mknewintnode(state_depth));
}
}
return NULL;
}
/* Fixme: allow level=0 to return the current level */
struct program *parent_compilation(int level)
{
+ struct compilation *c = THIS_COMPILATION;
int n;
struct program_state *p=Pike_compiler->previous;
for(n=0;n<level;n++)
{
- if(n>=compilation_depth) return 0;
+ if(n>=c->compilation_depth) return 0;
p=p->previous;
if(!p) return 0;
}
return p->new_program;
}
#define ID_TO_PROGRAM_CACHE_SIZE 512
struct program *id_to_program_cache[ID_TO_PROGRAM_CACHE_SIZE];
struct program *id_to_program(INT32 id)
pike.git/src/program.c:2000:
/* 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;
#ifdef PROGRAM_BUILD_DEBUG
fprintf(stderr, "%.*soverloaded reference %d (id_flags:0x%04x)\n",
- compilation_depth, " ", cur_id, ref->id_flags);
+ 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;
yywarning("Attempt to override a non local variable %S "
"with a non-variable.", name);
continue;
pike.git/src/program.c:2364: Inside #if defined(WITH_FACETS)
p->facet_index = -1;
p->facet_group = NULL;
}
#endif
/* We don't want to change thread, but we don't want to
* wait for the other threads to complete either.
*/
low_init_threads_disable();
- compilation_depth++;
+ c->compilation_depth++;
if (!Pike_compiler->compiler_frame) {
new_node_s_context();
}
tmp.type=T_PROGRAM;
if(!p)
{
p=low_allocate_program();
if(name)
{
tmp.u.program=p;
id=add_constant(name, &tmp, flags & ~ID_EXTERN);
#if 0
- fprintf(stderr,"Compiling class %s, depth=%d\n",name->str,compilation_depth);
+ fprintf(stderr,"Compiling class %s, depth=%d\n",
+ name->str, c->compilation_depth);
}else{
fprintf(stderr,"Compiling file %s, depth=%d\n",
c->lex.current_file ? c->lex.current_file->str : "-",
- compilation_depth);
+ c->compilation_depth);
#endif
}
}else{
tmp.u.program=p;
add_ref(p);
if((pass == 2) && name)
{
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 (pass == 1) {
- if(compilation_depth >= 1)
+ if(c->compilation_depth >= 1)
add_ref(p->parent = Pike_compiler->new_program);
}
p->flags &=~ PROGRAM_VIRGIN;
if(idp) *idp=id;
CDFPRINTF((stderr, "th(%ld) %p low_start_new_program() %s "
"pass=%d: threads_disabled:%d, compilation_depth:%d\n",
(long)th_self(), p, name ? name->str : "-",
Pike_compiler->compiler_pass,
- threads_disabled, compilation_depth));
+ threads_disabled, c->compilation_depth));
init_type_stack();
#define PUSH
#include "compilation.h"
Pike_compiler->parent_identifier=id;
Pike_compiler->compiler_pass = pass;
Pike_compiler->num_used_modules=0; /* FIXME: Duplicate? */
pike.git/src/program.c:2483:
((struct parent_info *)Pike_compiler->fake_object->storage)->parent=0;
((struct parent_info *)Pike_compiler->fake_object->storage)->parent_identifier=0;
}
}
Pike_compiler->new_program=p;
#ifdef PROGRAM_BUILD_DEBUG
if (name) {
fprintf (stderr, "%.*sstarting program %d (pass=%d): ",
- compilation_depth, " ", Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
+ c->compilation_depth, "",
+ Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
push_string (name);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);
}
else
fprintf (stderr, "%.*sstarting program %d (pass=%d)\n",
- compilation_depth, " ", Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
+ c->compilation_depth, "",
+ Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
#endif
- if (compilation_depth >= 1) {
+ if (c->compilation_depth >= 1) {
if(TEST_COMPAT(7,2) || (c->lex.pragmas & ID_SAVE_PARENT))
{
p->flags |= PROGRAM_USES_PARENT;
}else if (!(c->lex.pragmas & ID_DONT_SAVE_PARENT)) {
struct pike_string *tmp=findstring("__pragma_save_parent__");
if(tmp)
{
struct node_s *n=find_module_identifier(tmp, 0);
if(n)
{
pike.git/src/program.c:2630:
while (*p && *p == *f) p++, f++;
while (*f == '/' || *f == '\\') f++;
c->lex.current_file = make_shared_string(f);
c->lex.current_line = line;
}
CDFPRINTF((stderr,
"th(%ld) start_new_program(%d, %s): "
"threads_disabled:%d, compilation_depth:%d\n",
- (long)th_self(), line, file, threads_disabled, compilation_depth));
+ (long)th_self(), line, file,
+ threads_disabled, c->compilation_depth));
low_start_new_program(0,1,0,0,0);
store_linenumber(line,c->lex.current_file);
debug_malloc_name(Pike_compiler->new_program, file, line);
free_string(c->lex.current_file);
c->lex.current_file = dmalloc_touch(struct pike_string *, save_file);
c->lex.current_line = save_line;
}
pike.git/src/program.c:3390:
/* Note: This function is misnamed, since it's run after both passes. /mast */
/* finish-states:
*
* 0: First pass.
* 1: Last pass.
* 2: Called from decode_value().
*/
struct program *end_first_pass(int finish)
{
+ struct compilation *c = THIS_COMPILATION;
int e;
struct program *prog;
struct pike_string *s;
debug_malloc_touch(Pike_compiler->fake_object);
debug_malloc_touch(Pike_compiler->fake_object->storage);
MAKE_CONST_STRING(s,"__INIT");
pike.git/src/program.c:3488: Inside #if defined(PIKE_DEBUG)
if (prog) {
check_program(prog);
if(l_flag)
dump_program_desc(prog);
}
#endif
}
#ifdef PROGRAM_BUILD_DEBUG
fprintf (stderr, "%.*sfinishing program %d (pass=%d)\n",
- compilation_depth, " ", Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
+ c->compilation_depth, "",
+ Pike_compiler->new_program->id, Pike_compiler->compiler_pass);
#endif
toss_compilation_resources();
#if 0
CDFPRINTF((stderr,
"th(%ld) end_first_pass(): "
"compilation_depth:%d, Pike_compiler->compiler_pass:%d\n",
- (long)th_self(), compilation_depth, Pike_compiler->compiler_pass));
+ (long)th_self(),
+ c->compilation_depth, Pike_compiler->compiler_pass));
#endif
if(!Pike_compiler->compiler_frame && (Pike_compiler->compiler_pass==2 || !prog) && resolve_cache)
{
free_mapping(dmalloc_touch(struct mapping *, resolve_cache));
resolve_cache=0;
}
#ifdef SHARED_NODES
/* free(node_hash.table); */
pike.git/src/program.c:3521:
#include "compilation.h"
exit_type_stack();
free_all_nodes();
CDFPRINTF((stderr,
"th(%ld) %p end_first_pass(%d): "
"threads_disabled:%d, compilation_depth:%d\n",
(long)th_self(), prog, finish,
- threads_disabled, compilation_depth));
+ threads_disabled, c->compilation_depth));
- compilation_depth--;
+ c->compilation_depth--;
exit_threads_disable(NULL);
#if 0
#ifdef PIKE_USE_MACHINE_CODE
if (prog &&
(((unsigned long long *)prog->program)[-1] != 0xdeadfeedf00dfaddLL)) {
Pike_fatal("Bad mexec magic!\n");
}
#endif /* PIKE_USE_MACHINE_CODE */
pike.git/src/program.c:3908:
if (p->inherits[e].inherit_level > 1) continue;
if (name == p->inherits[e].name) return e;
}
return 0;
}
node *reference_inherited_identifier(struct pike_string *super_name,
struct pike_string *function_name)
{
int n,e,id;
+ struct compilation *c = THIS_COMPILATION;
struct program_state *state=Pike_compiler->previous;
struct program *p;
#ifdef PIKE_DEBUG
if(function_name!=debug_findstring(function_name))
Pike_fatal("reference_inherited_function on nonshared string.\n");
#endif
pike.git/src/program.c:3961:
return mknode(F_MAGIC_INDICES,mknewintnode(e),mknewintnode(0));
}
if(ISCONSTSTR(function_name,"_values"))
{
return mknode(F_MAGIC_VALUES,mknewintnode(e),mknewintnode(0));
}
}
- for(n=0;n<compilation_depth;n++,state=state->previous)
+ for(n=0;n<c->compilation_depth;n++,state=state->previous)
{
struct program *p=state->new_program;
for(e=p->num_inherits-1;e>0;e--)
{
if(p->inherits[e].inherit_level!=1) continue;
if(!p->inherits[e].name) continue;
if(super_name)
if(super_name != p->inherits[e].name)
pike.git/src/program.c:4195:
{
yyerror("Parent pointer lost, cannot inherit!");
/* We inherit it anyway, to avoid causing more errors */
}
#if 0
/* FIXME: we don't really need to set this flag on ALL
* previous compilations, but I'm too lazy to figure out
* exactly how deep down we need to go...
*/
- for(e=0;e<compilation_depth;e++,state=state->previous)
+ for(e=0;e<c->compilation_depth;e++,state=state->previous)
state->new_program->flags |= PROGRAM_USES_PARENT;
#endif
}
/* parent offset was increased by 42 for above test.. */
if(parent_offset)
parent_offset-=42;
if(!(p->flags & (PROGRAM_FINISHED | PROGRAM_PASS_1_DONE)))
pike.git/src/program.c:4744:
const char *type,
INT32 flags,
size_t offset,
INT32 run_time_type)
{
int ret;
struct pike_string *n;
struct pike_type *t;
#ifdef PROGRAM_BUILD_DEBUG
+ struct compilation *c = THIS_COMPILATION;
fprintf (stderr, "%.*sdefining variable (pass=%d): %s %s\n",
- compilation_depth, " ", Pike_compiler->compiler_pass, type, name);
+ c->compilation_depth, "",
+ Pike_compiler->compiler_pass, type, name);
#endif
n=make_shared_string(name);
t=parse_type(type);
ret=low_define_variable(n,t,flags|ID_USED,offset,run_time_type);
free_string(n);
free_type(t);
return ret;
}
pike.git/src/program.c:4773:
{
int ret;
struct pike_string *n;
struct pike_type *t;
n = make_shared_binary_string(name, name_length);
t = make_pike_type(type);
#ifdef PROGRAM_BUILD_DEBUG
{
+ struct compilation *c = THIS_COMPILATION;
struct pike_string *d = describe_type (t);
fprintf (stderr, "%.*sdefining variable (pass=%d): %s ",
- compilation_depth, " ", Pike_compiler->compiler_pass, d->str);
+ c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);
free_string (d);
push_string (n);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);
}
#endif
ret=low_define_variable(n,t,flags|ID_USED,offset,run_time_type);
free_string(n);
free_type(t);
pike.git/src/program.c:4803:
{
int n, run_time_type;
#ifdef PIKE_DEBUG
if(name!=debug_findstring(name))
Pike_fatal("define_variable on nonshared string.\n");
#endif
#ifdef PROGRAM_BUILD_DEBUG
{
+ struct compilation *c = THIS_COMPILATION;
struct pike_string *d = describe_type (type);
fprintf (stderr, "%.*sdefining variable (pass=%d): %s ",
- compilation_depth, " ", Pike_compiler->compiler_pass, d->str);
+ c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);
free_string (d);
push_string (name);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);
}
#endif
if(type == void_type_string)
yyerror("Variables can't be of type void");
pike.git/src/program.c:4954:
PMOD_EXPORT int add_constant(struct pike_string *name,
struct svalue *c,
INT32 flags)
{
int n;
struct identifier dummy;
struct reference ref;
struct svalue zero;
#ifdef PROGRAM_BUILD_DEBUG
+ struct compilation *cc = THIS_COMPILATION;
{
if (c) {
struct pike_type *t = get_type_of_svalue(c);
struct pike_string *d = describe_type (t);
fprintf (stderr, "%.*sdefining constant (pass=%d): %s ",
- compilation_depth, " ",
+ cc->compilation_depth, "",
Pike_compiler->compiler_pass, d->str);
free_type(t);
free_string (d);
push_string (name);
print_svalue (stderr, --Pike_sp);
fputs (" = ", stderr);
print_svalue (stderr, c);
}
else {
fprintf (stderr, "%.*sdeclaring constant (pass=%d): ",
- compilation_depth, " ",
+ cc->compilation_depth, "",
Pike_compiler->compiler_pass);
push_string (name);
print_svalue (stderr, --Pike_sp);
}
putc ('\n', stderr);
}
#endif
#if 0
if (!c) {
pike.git/src/program.c:5089: Inside #if 1
if (!c) Pike_fatal("Can't declare constant during second compiler pass\n");
#endif
#endif
free_type(id->type);
id->type = get_type_of_svalue(c);
id->run_time_type = c->type;
id->func.offset = store_constant(c, 0, 0);
}
#ifdef PROGRAM_BUILD_DEBUG
fprintf (stderr, "%.*sstored constant #%d at %d\n",
- compilation_depth, " ",
+ cc->compilation_depth, "",
n, id->func.offset);
#endif
return n;
}
}
#ifdef PIKE_DEBUG
if(Pike_compiler->new_program->flags & (PROGRAM_FIXED | PROGRAM_OPTIMIZED))
Pike_fatal("Attempting to add constant to fixed program\n");
pike.git/src/program.c:5359:
int run_time_type = T_FUNCTION;
INT32 i;
INT32 getter_setter_offset = -1;
CHECK_COMPILER();
#ifdef PROGRAM_BUILD_DEBUG
{
struct pike_string *d = describe_type (type);
fprintf (stderr, "%.*sdefining function (pass=%d): %s ",
- compilation_depth, " ", Pike_compiler->compiler_pass, d->str);
+ c->compilation_depth, "", Pike_compiler->compiler_pass, d->str);
free_string (d);
push_string (name);
print_svalue (stderr, --Pike_sp);
putc ('\n', stderr);
}
#endif
#ifdef PROFILING
fun.self_time=0;
fun.num_calls=0;
pike.git/src/program.c:5505:
i=isidentifier(name);
if(i >= 0)
{
int overridden;
/* already defined */
#ifdef PROGRAM_BUILD_DEBUG
fprintf(stderr, "%.*sexisted as identifier #%d\n",
- compilation_depth, " ", i);
+ c->compilation_depth, "", i);
#endif
funp=ID_FROM_INT(Pike_compiler->new_program, i);
ref=Pike_compiler->new_program->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 */
pike.git/src/program.c:5562:
funp->identifier_flags=function_flags;
funp->run_time_type = run_time_type;
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, " ");
+ c->compilation_depth, "");
#endif
if((ref.id_flags & ID_FINAL)
#if 0
&& !(funp->func.offset == -1)
#endif
)
{
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, " ");
+ c->compilation_depth, "");
#endif
goto make_a_new_def;
}
/* Otherwise we alter the existing definition */
#ifdef PROGRAM_BUILD_DEBUG
fprintf(stderr, "%.*saltering the existing definition\n",
- compilation_depth, " ");
+ c->compilation_depth, "");
#endif
copy_shared_string(fun.name, name);
copy_pike_type(fun.type, type);
fun.run_time_type = run_time_type;
fun.identifier_flags=function_flags;
if(func)
pike.git/src/program.c:5693:
ref.inherit_offset = 0;
}
/* Add the reference. */
i=Pike_compiler->new_program->num_identifier_references;
add_to_identifier_references(ref);
#ifdef PROGRAM_BUILD_DEBUG
fprintf(stderr, "%.*sadded new definition #%d\n",
- compilation_depth, " ", i);
+ c->compilation_depth, "", i);
#endif
if (getter_setter_offset >= 0) {
INT32 old_i = (INT32)read_pointer(getter_setter_offset);
if (old_i >= 0) {
my_yyerror("Multiple definitions for %S.", name);
}
upd_pointer(getter_setter_offset, i);
}
pike.git/src/program.c:7382:
}
free_svalue(& c->default_module);
c->default_module.type = T_INT;
free_supporter(&c->supporter);
verify_supporters();
}
static void run_init(struct compilation *c)
{
debug_malloc_touch(c);
- c->save_depth=compilation_depth;
- compilation_depth=-1;
+
if (c->compat_handler) free_object(c->compat_handler);
c->compat_handler=0;
c->resolve_cache_save = resolve_cache;
resolve_cache = 0;
c->lex.current_line=1;
free_string(c->lex.current_file);
c->lex.current_file=make_shared_string("-");
pike.git/src/program.c:7451:
static void run_exit(struct compilation *c)
{
debug_malloc_touch(c);
#ifdef PIKE_DEBUG
if(c->num_used_modules)
Pike_fatal("Failed to pop modules properly.\n");
#endif
#ifdef PIKE_DEBUG
- if (compilation_depth != -1) {
+ if (c->compilation_depth != -1) {
fprintf(stderr, "compile(): compilation_depth is %d\n",
- compilation_depth);
+ c->compilation_depth);
}
#endif /* PIKE_DEBUG */
- compilation_depth=c->save_depth;
+
if (resolve_cache)
free_mapping(resolve_cache);
resolve_cache = c->resolve_cache_save;
verify_supporters();
}
static void zap_placeholder(struct compilation *c)
{
pike.git/src/program.c:7501:
/* NOTE: Must not throw errors! */
static int run_pass1(struct compilation *c)
{
int ret=0;
debug_malloc_touch(c);
run_init(c);
#if 0
CDFPRINTF((stderr, "th(%ld) compile() starting compilation_depth=%d\n",
- (long)th_self(),compilation_depth));
+ (long)th_self(),c->compilation_depth));
#endif
if(c->placeholder && c->placeholder->prog != null_program) {
yyerror("Placeholder object is not a null_program clone!");
return 0;
}
debug_malloc_touch(c->placeholder);
if(c->target && !(c->target->flags & PROGRAM_VIRGIN)) {
yyerror("Placeholder program is not virgin!");
return 0;
}
low_start_new_program(c->target,1,0,0,0);
c->supporter.prog = Pike_compiler->new_program;
CDFPRINTF((stderr,
"th(%ld) %p run_pass1() start: "
"threads_disabled:%d, compilation_depth:%d\n",
(long)th_self(), Pike_compiler->new_program,
- threads_disabled, compilation_depth));
+ threads_disabled, c->compilation_depth));
run_init2(c);
if(c->placeholder)
{
if(c->placeholder->prog != null_program)
{
yyerror("Placeholder argument is not a null_program clone!");
c->placeholder=0;
debug_malloc_touch(c->placeholder);
pike.git/src/program.c:7611:
low_start_new_program(c->p,2,0,0,0);
free_program(c->p);
c->p=0;
run_init2(c);
CDFPRINTF((stderr,
"th(%ld) %p run_pass2() start: "
"threads_disabled:%d, compilation_depth:%d\n",
(long)th_self(), Pike_compiler->new_program,
- threads_disabled, compilation_depth));
+ threads_disabled, c->compilation_depth));
verify_supporters();
do_yyparse(); /* Parse da program */
CDFPRINTF((stderr, "th(%ld) %p run_pass2() done for %s\n",
(long)th_self(), Pike_compiler->new_program,
c->lex.current_file->str));
verify_supporters();
pike.git/src/program.c:7642: Inside #if 0 /* FIXME */
#if 0 /* FIXME */
if (threads_disabled != c->saved_threads_disabled) {
Pike_fatal("compile(): threads_disabled:%d saved_threads_disabled:%d\n",
threads_disabled, c->saved_threads_disabled);
}
#endif /* PIKE_DEBUG */
exit_threads_disable(NULL);
CDFPRINTF((stderr,
- "th(%ld) %p run_cleanup(): threads_disabled:%d, compilation_depth:%d\n",
- (long)th_self(), c->target, threads_disabled, compilation_depth));
+ "th(%ld) %p run_cleanup(): "
+ "threads_disabled:%d, compilation_depth:%d\n",
+ (long)th_self(), c->target,
+ threads_disabled, c->compilation_depth));
if (!c->p)
{
/* fprintf(stderr, "Destructing placeholder.\n"); */
if(c->placeholder) {
debug_malloc_touch(c->placeholder);
zap_placeholder(c);
}
if(delayed && c->target)
{
pike.git/src/program.c:7784:
c->supporter.self = Pike_fp->current_object; /* NOTE: Not ref-counted! */
c->compilation_inherit =
Pike_fp->context - Pike_fp->current_object->prog->inherits;
initialize_buf(&c->used_modules);
add_ref(c->default_module.u.mapping = get_builtin_constants());
c->default_module.type = T_MAPPING;
c->major = -1;
c->minor = -1;
c->lex.current_line = 1;
c->lex.current_file = make_shared_string("-");
+ c->compilation_depth = -1;
break;
case PROG_EVENT_EXIT:
CDFPRINTF((stderr, "th(%ld) compilation: EXIT(%p).\n",
(long) th_self(), c));
toss_buffer(&c->used_modules);
free_compilation(c);
break;
}
}