pike.git/src/program.c:110:
}
void free_all_program_blocks(void) {
ba_destroy(&program_allocator);
}
/* #define COMPILER_DEBUG */
/* #define PROGRAM_BUILD_DEBUG */
#ifdef COMPILER_DEBUG
- #define CDFPRINTF(X) fprintf X
+ #define CDFPRINTF(...) fprintf(stderr, __VA_ARGS__)
#ifndef PIKE_THREADS
/* The CDFPRINTF lines wants to print lock_depth, so fake one of those */
static const int lock_depth = 1;
#endif
#else /* !COMPILER_DEBUG */
- #define CDFPRINTF(X)
+ #define CDFPRINTF(...)
#endif /* COMPILER_DEBUG */
/*
* These two values should probably be fine-tuned, but doing so
* more or less requires running a predictable 'typical' application
* and testing different hashsizes and tresholds. I tried to do it
* mathematically by measuring the extremes (no cache hits, 100%
* cache hits etc.) but it seems that the processor cache becomes
* exhausted in some of my measurements, which renders my mathematical
* model useless.
pike.git/src/program.c:2929:
}
if (pass == 1) {
if(c->compilation_depth >= 1) {
add_ref(p->parent = Pike_compiler->new_program);
debug_malloc_touch (p);
}
}
p->flags &=~ PROGRAM_VIRGIN;
if(idp) *idp=id;
- CDFPRINTF((stderr, "th(%ld) %p low_start_new_program() %s "
+ CDFPRINTF("th(%ld) %p low_start_new_program() %s "
"pass=%d: lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), p, name ? name->str : "-",
Pike_compiler->compiler_pass,
- lock_depth, c->compilation_depth));
+ lock_depth, c->compilation_depth);
init_type_stack();
#define PUSH
#include "compilation.h"
ba_init(&Pike_compiler->node_allocator, sizeof(struct node_s), 512);
Pike_compiler->parent_identifier=id;
Pike_compiler->compiler_pass = pass;
pike.git/src/program.c:3157:
{ /* Trim off the leading path of the compilation environment. */
const char *p = DEFINETOSTR(PIKE_SRC_ROOT), *f = file;
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(%ld, %s): "
+ CDFPRINTF("th(%ld) start_new_program(%ld, %s): "
"lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), (long)line, file,
- lock_depth, c->compilation_depth));
+ lock_depth, 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:3986:
if (prog->identifier_references[e].inherit_offset) continue;
if (!is_variant_dispatcher(prog, e)) continue;
/* Found a dispatcher. */
id = ID_FROM_INT(prog, e);
name = id->name;
type = NULL;
id_flags = 0;
opt_flags = 0;
- CDFPRINTF((stderr, "Collecting variants of \"%s\"...\n", name->str));
+ CDFPRINTF("Collecting variants of \"%s\"...\n", name->str);
/* Collect the variants of the function. */
j = prog->num_identifier_references;
while ((j = really_low_find_variant_identifier(name, prog, NULL, j,
SEE_PROTECTED|SEE_PRIVATE)) >= 0) {
struct reference *ref = prog->identifier_references + j;
id = ID_FROM_INT(prog, j);
id_flags |= ref->id_flags;
opt_flags |= id->opt_flags;
/* NB: The dispatcher needs the variant references to
pike.git/src/program.c:4106:
* __INIT() is just a prototype or not.
*/
e=-1;
}
Pike_compiler->new_program->lfuns[LFUN___INIT]=e;
pop_compiler_frame(); /* Pop __INIT local variables */
if(Pike_compiler->num_parse_error > 0)
{
- CDFPRINTF((stderr, "th(%ld) %p Compilation errors (%d).\n",
+ CDFPRINTF("th(%ld) %p Compilation errors (%d).\n",
(long)th_self(), Pike_compiler->new_program,
- Pike_compiler->num_parse_error));
+ Pike_compiler->num_parse_error);
prog=0;
}else{
prog=Pike_compiler->new_program;
add_ref(prog);
Pike_compiler->new_program->flags |= PROGRAM_PASS_1_DONE;
if(finish)
{
if(Pike_compiler->new_program->flags & PROGRAM_USES_PARENT)
pike.git/src/program.c:4170: Inside #if defined(PROGRAM_BUILD_DEBUG)
#ifdef PROGRAM_BUILD_DEBUG
fprintf (stderr, "%.*sfinishing program %d (pass=%d)\n",
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(): "
+ CDFPRINTF("th(%ld) end_first_pass(): "
"%p compilation_depth:%d, Pike_compiler->compiler_pass:%d\n",
(long)th_self(), prog,
- c->compilation_depth, Pike_compiler->compiler_pass));
+ c->compilation_depth, Pike_compiler->compiler_pass);
#endif
if(!Pike_compiler->compiler_frame && (Pike_compiler->compiler_pass==2 || !prog) && c->resolve_cache)
{
free_mapping(dmalloc_touch(struct mapping *, c->resolve_cache));
c->resolve_cache=0;
}
#ifdef SHARED_NODES
/* free(node_hash.table); */
#endif /* SHARED_NODES */
#define POP
#include "compilation.h"
exit_type_stack();
- CDFPRINTF((stderr,
- "th(%ld) %p end_first_pass(%d): "
+ CDFPRINTF("th(%ld) %p end_first_pass(%d): "
"lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), prog, finish,
- lock_depth, c->compilation_depth));
+ lock_depth, c->compilation_depth);
c->compilation_depth--;
unlock_pike_compiler();
#if 0
#ifdef PIKE_USE_MACHINE_CODE
if (prog &&
(((unsigned long long *)prog->program)[-1] != 0xdeadfeedf00dfaddLL)) {
Pike_fatal("Bad mexec magic!\n");
pike.git/src/program.c:4769: Inside #if 0
fprintf(stderr,"%p low_inherit(pid=%d, parent=%p, parid=%d, "
"paroff=%d, flags=0x%x, name=%s);\n",
Pike_compiler->new_program,
p ? p->id : 0,
parent,
parent_identifier,
parent_offset,
flags,
name? name->str : "");
#endif
- CDFPRINTF((stderr, "th(%ld) %p inherit %p\n",
- (long) th_self(), Pike_compiler->new_program, p));
+ CDFPRINTF("th(%ld) %p inherit %p\n",
+ (long) th_self(), Pike_compiler->new_program, p);
if(!p)
{
yyerror("Illegal program pointer.");
return;
}
if (Pike_compiler->compiler_pass == 2) {
struct program *old_p =
Pike_compiler->new_program->inherits[Pike_compiler->num_inherits+1].prog;
pike.git/src/program.c:6686:
*/
PMOD_EXPORT int really_low_find_shared_string_identifier(struct pike_string *name,
const struct program *prog,
int flags)
{
struct reference *funp;
struct identifier *fun;
int id, i, depth, last_inh;
#if 0
- CDFPRINTF((stderr,"th(%ld) %p Trying to find %s flags=%d\n",
- (long)th_self(), prog, name->str, flags));
+ CDFPRINTF("th(%ld) %p Trying to find %s flags=%d\n",
+ (long)th_self(), prog, name->str, flags);
#endif
#ifdef PIKE_DEBUG
if (!prog) {
Pike_fatal("really_low_find_shared_string_identifier(\"%s\", NULL, %d)\n"
"prog is NULL!\n", name->str, flags);
}
#endif /* PIKE_DEBUG */
id = -1;
pike.git/src/program.c:6825:
}
/* Found new identifier on the path from the old identifier to
* the root.
*/
}
last_inh = funp->inherit_offset;
depth = inh->inherit_level;
id = i;
}
} else {
- CDFPRINTF((stderr, "Found %d\n", i));
+ CDFPRINTF("Found %d\n", i);
return i;
}
}
- CDFPRINTF((stderr, "Found %d\n", id));
+ CDFPRINTF("Found %d\n", id);
return id;
}
/**
* This is the dispatcher function for variant functions.
*
* cf end_first_pass().
*/
static void f_dispatch_variant(INT32 args)
{
pike.git/src/program.c:8421:
}
}
#else
#define verify_supporters();
#endif
void init_supporter(struct Supporter *s,
supporter_callback *fun,
void *data)
{
- CDFPRINTF((stderr, "th(%ld) init_supporter() supporter=%p data=%p.\n",
- (long) th_self(), s, data));
+ CDFPRINTF("th(%ld) init_supporter() supporter=%p data=%p.\n",
+ (long) th_self(), s, data);
verify_supporters();
#ifdef PIKE_DEBUG
s->magic = 0x500b0127;
#endif
s->previous=current_supporter;
current_supporter=s;
s->depends_on=0;
s->dependants=0;
s->next_dependant=0;
pike.git/src/program.c:8459: Inside #if defined(PIKE_DEBUG)
{
#ifdef PIKE_DEBUG
struct Supporter *s;
for (s = c->depends_on->dependants; s; s = s->next_dependant)
if (s == c) Pike_fatal("Dependant already linked in.\n");
#endif
ret++;
c->next_dependant = c->depends_on->dependants;
c->depends_on->dependants=c;
add_ref(c->self);
- CDFPRINTF((stderr, "th(%ld) unlink_current_supporter() "
+ CDFPRINTF("th(%ld) unlink_current_supporter() "
"supporter=%p (prog %p) depends on %p (prog %p).\n",
(long) th_self(), c, c->prog,
- c->depends_on, c->depends_on->prog));
+ c->depends_on, c->depends_on->prog);
}
current_supporter=c->previous;
verify_supporters();
return ret;
}
void free_supporter(struct Supporter *c)
{
verify_supporters();
if (c->depends_on) {
pike.git/src/program.c:8485:
if (*s == c) {*s = c->next_dependant; break;}
c->depends_on = 0;
}
verify_supporters();
}
int call_dependants(struct Supporter *s, int finish)
{
int ok = 1;
struct Supporter *tmp;
- CDFPRINTF((stderr, "th(%ld) call_dependants() supporter=%p (prog %p) "
- "finish=%d.\n", (long) th_self(), s, s->prog, finish));
+ CDFPRINTF("th(%ld) call_dependants() supporter=%p (prog %p) "
+ "finish=%d.\n", (long) th_self(), s, s->prog, finish);
verify_supporters();
while((tmp=s->dependants))
{
- CDFPRINTF((stderr, "th(%ld) dependant: %p (prog %p) (data:%p).\n",
- (long) th_self(), tmp, tmp->prog, tmp->data));
+ CDFPRINTF("th(%ld) dependant: %p (prog %p) (data:%p).\n",
+ (long) th_self(), tmp, tmp->prog, tmp->data);
s->dependants=tmp->next_dependant;
#ifdef PIKE_DEBUG
tmp->next_dependant=0;
#endif
verify_supporters();
if (!tmp->fun(tmp->data, finish)) ok = 0;
verify_supporters();
free_object(tmp->self);
}
return ok;
pike.git/src/program.c:8514:
int report_compiler_dependency(struct program *p)
{
int ret=0;
struct Supporter *c,*cc;
if (p == Pike_compiler->new_program) {
/* Depends on self... */
return 0;
}
- CDFPRINTF((stderr, "th(%ld) compiler dependency on %p from %p\n",
- (long)th_self(), p, Pike_compiler->new_program));
+ CDFPRINTF("th(%ld) compiler dependency on %p from %p\n",
+ (long)th_self(), p, Pike_compiler->new_program);
verify_supporters();
if (Pike_compiler->flags & COMPILATION_FORCE_RESOLVE)
return 0;
for(cc=current_supporter;cc;cc=cc->previous)
{
if(cc->prog &&
!(cc->prog->flags & PROGRAM_PASS_1_DONE))
{
c=cc->depends_on;
if(!c) c=cc->previous;
for(;c;c=c->previous)
{
if(c->prog == p)
{
cc->depends_on=c;
- CDFPRINTF ((stderr, "th(%ld) supporter %p (prog %p) "
+ CDFPRINTF("th(%ld) supporter %p (prog %p) "
"now depends on %p (prog %p)\n",
- (long) th_self(), cc, cc->prog, c, c->prog));
+ (long) th_self(), cc, cc->prog, c, c->prog);
verify_supporters();
ret++; /* dependency registred */
}
}
}
}
verify_supporters();
return ret;
}
pike.git/src/program.c:9109:
/* 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(), c->compilation_depth));
+ CDFPRINTF("th(%ld) compile() starting compilation_depth=%d\n",
+ (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: "
+ CDFPRINTF("th(%ld) %p run_pass1() start: "
"lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), Pike_compiler->new_program,
- lock_depth, c->compilation_depth));
+ lock_depth, 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);
}else{
free_program(c->placeholder->prog);
add_ref(c->placeholder->prog=Pike_compiler->new_program);
debug_malloc_touch(c->placeholder);
}
}
#if 0
- CDFPRINTF((stderr, "th(%ld) %p compile(): First pass\n",
- (long)th_self(), Pike_compiler->new_program));
+ CDFPRINTF("th(%ld) %p compile(): First pass\n",
+ (long)th_self(), Pike_compiler->new_program);
#endif
do_yyparse(); /* Parse da program */
if (!Pike_compiler->new_program->num_linenumbers) {
/* The lexer didn't write an initial entry. */
store_linenumber(0, c->lex.current_file);
#ifdef DEBUG_MALLOC
if(strcmp(c->lex.current_file->str,"-"))
debug_malloc_name(Pike_compiler->new_program, c->lex.current_file->str, 0);
#endif
}
- CDFPRINTF((stderr, "th(%ld) %p run_pass1() done for %s\n",
+ CDFPRINTF("th(%ld) %p run_pass1() done for %s\n",
(long)th_self(), Pike_compiler->new_program,
- c->lex.current_file->str));
+ c->lex.current_file->str);
ret=unlink_current_supporter(& c->supporter);
c->p=debug_malloc_pass(end_first_pass(0));
run_exit(c);
if(c->placeholder)
{
if(!c->p || (c->placeholder->storage))
pike.git/src/program.c:9216:
return;
}
run_init(c);
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: "
+ CDFPRINTF("th(%ld) %p run_pass2() start: "
"lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), Pike_compiler->new_program,
- lock_depth, c->compilation_depth));
+ lock_depth, c->compilation_depth);
verify_supporters();
do_yyparse(); /* Parse da program */
- CDFPRINTF((stderr, "th(%ld) %p run_pass2() done for %s\n",
+ CDFPRINTF("th(%ld) %p run_pass2() done for %s\n",
(long)th_self(), Pike_compiler->new_program,
- c->lex.current_file->str));
+ c->lex.current_file->str);
verify_supporters();
c->p=debug_malloc_pass(end_program());
run_exit(c);
}
static void run_cleanup(struct compilation *c, int delayed)
{
pike.git/src/program.c:9252: Inside #if 0 /* FIXME */ and #if defined(PIKE_THREADS)
#ifdef PIKE_THREADS
if (lock_depth != c->saved_lock_depth) {
Pike_fatal("compile(): lock_depth:%d saved_lock_depth:%d\n",
lock_depth, c->saved_lock_depth);
}
#endif
#endif /* PIKE_DEBUG */
unlock_pike_compiler();
- CDFPRINTF((stderr,
- "th(%ld) %p run_cleanup(): "
+ CDFPRINTF("th(%ld) %p run_cleanup(): "
"lock_depth:%d, compilation_depth:%d\n",
(long)th_self(), c->target,
- lock_depth, c->compilation_depth));
+ lock_depth, 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:9285:
free_svalue(&p->constants[i].sval);
SET_SVAL(p->constants[i].sval, T_INT, NUMBER_NUMBER,
integer, 0);
}
}
/* We have to notify the master object that
* a previous compile() actually failed, even
* if we did not know it at the time
*/
- CDFPRINTF((stderr, "th(%ld) %p unregistering failed delayed compile.\n",
- (long) th_self(), p));
+ CDFPRINTF("th(%ld) %p unregistering failed delayed compile.\n",
+ (long) th_self(), p);
ref_push_program(p);
/* FIXME: Shouldn't the compilation handler be used here? */
SAFE_APPLY_MASTER("unregister",1);
pop_stack();
{
#ifdef PIKE_DEBUG
int refs = p->refs;
#endif
pike.git/src/program.c:9360:
c->flags |= COMPILER_DONE;
}
static int call_delayed_pass2(struct compilation *cc, int finish)
{
int ok = 0;
debug_malloc_touch(cc);
debug_malloc_touch(cc->p);
- CDFPRINTF((stderr, "th(%ld) %p %s delayed compile.\n",
- (long) th_self(), cc->p, finish ? "continuing" : "cleaning up"));
+ CDFPRINTF("th(%ld) %p %s delayed compile.\n",
+ (long) th_self(), cc->p, finish ? "continuing" : "cleaning up");
/* Reenter the delayed compilation. */
add_ref(cc->supporter.self);
low_enter_compiler(cc->supporter.self, cc->compilation_inherit);
if(finish && cc->p) run_pass2(cc);
run_cleanup(cc,1);
exit_compiler();
pike.git/src/program.c:9384: Inside #if defined(PIKE_DEBUG)
#ifdef PIKE_DEBUG
if(cc->supporter.dependants)
Pike_fatal("Que???\n");
#endif
if(cc->p) {
ok = finish;
free_program(cc->p); /* later */
cc->p = NULL;
}
- CDFPRINTF((stderr, "th(%ld) %p delayed compile %s.\n",
- (long) th_self(), cc->target, ok ? "done" : "failed"));
+ CDFPRINTF("th(%ld) %p delayed compile %s.\n",
+ (long) th_self(), cc->target, ok ? "done" : "failed");
verify_supporters();
return ok;
}
static void compilation_event_handler(int e)
{
struct compilation *c = THIS_COMPILATION;
switch (e) {
case PROG_EVENT_INIT:
- CDFPRINTF((stderr, "th(%ld) compilation: INIT(%p).\n",
- (long) th_self(), c));
+ CDFPRINTF("th(%ld) compilation: INIT(%p).\n", (long) th_self(), c);
memset(c, 0, sizeof(*c));
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);
SET_SVAL(c->default_module, T_MAPPING, 0, mapping, get_builtin_constants());
add_ref(c->default_module.u.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));
+ CDFPRINTF("th(%ld) compilation: EXIT(%p).\n", (long) th_self(), c);
toss_buffer(&c->used_modules);
free_compilation(c);
break;
}
}
/*! @decl void report(SeverityLevel severity, @
*! string filename, int linenumber, @
*! string subsystem, @
*! string message, mixed ... extra_args)
pike.git/src/program.c:9615:
&aprog, &ahandler,
&amajor, &aminor,
&atarget, &aplaceholder);
if (args == 3) {
SIMPLE_BAD_ARG_ERROR("create", 4, "int");
}
check_c_stack(65536);
- CDFPRINTF((stderr, "th(%ld) %p compilation create() enter, placeholder=%p\n",
- (long) th_self(), atarget, aplaceholder));
+ CDFPRINTF("th(%ld) %p compilation create() enter, placeholder=%p\n",
+ (long) th_self(), atarget, aplaceholder);
debug_malloc_touch(c);
verify_supporters();
c->flags &= ~COMPILER_DONE;
if (c->p) free_program(c->p);
c->p = NULL;
pike.git/src/program.c:9676:
struct compilation *c = THIS_COMPILATION;
if (c->flags & COMPILER_BUSY) {
Pike_error("PikeCompiler in use.\n");
}
get_all_args("compile", args, "");
check_c_stack(65536);
- CDFPRINTF((stderr, "th(%ld) %p f_compilation_compile() enter, "
- "placeholder=%p\n", (long) th_self(), c->target, c->placeholder));
+ CDFPRINTF("th(%ld) %p f_compilation_compile() enter, "
+ "placeholder=%p\n", (long) th_self(), c->target, c->placeholder);
debug_malloc_touch(c);
verify_supporters();
if (c->flags & COMPILER_DONE) {
/* Already compiled. */
pop_n_elems(args);
if (c->p) ref_push_program(c->p);
else push_int(0);
pike.git/src/program.c:9725:
delay=run_pass1(c);
dependants_ok = call_dependants(& c->supporter, !!c->p );
#ifdef PIKE_DEBUG
/* FIXME */
UNSET_ONERROR(tmp);
#endif
if(delay)
{
- CDFPRINTF((stderr, "th(%ld) %p f_compilation_compile() finish later, "
+ CDFPRINTF("th(%ld) %p f_compilation_compile() finish later, "
"placeholder=%p.\n",
- (long) th_self(), c->target, c->placeholder));
+ (long) th_self(), c->target, c->placeholder);
/* finish later */
verify_supporters();
/* We're hanging in the supporter. */
ret = debug_malloc_pass(c->p);
}else{
- CDFPRINTF((stderr, "th(%ld) %p f_compilation_compile() finish now.\n",
- (long) th_self(), c->target));
+ CDFPRINTF("th(%ld) %p f_compilation_compile() finish now.\n",
+ (long) th_self(), c->target);
/* finish now */
run_pass2(c);
debug_malloc_touch(c);
run_cleanup(c,0);
ret = debug_malloc_pass(c->p);
debug_malloc_touch(c);
if (!dependants_ok) {
- CDFPRINTF((stderr, "th(%ld) %p f_compilation_compile() reporting failure "
+ CDFPRINTF("th(%ld) %p f_compilation_compile() reporting failure "
"since a dependant failed.\n",
- (long) th_self(), c->target));
+ (long) th_self(), c->target);
throw_error_object(fast_clone_object(compilation_error_program), 0, 0, 0,
"Compilation failed.\n");
}
if(!ret) {
- CDFPRINTF((stderr, "th(%ld) %p f_compilation_compile() failed.\n",
- (long) th_self(), c->target));
+ CDFPRINTF("th(%ld) %p f_compilation_compile() failed.\n",
+ (long) th_self(), c->target);
throw_error_object(fast_clone_object(compilation_error_program), 0, 0, 0,
"Compilation failed.\n");
}
debug_malloc_touch(ret);
#ifdef PIKE_DEBUG
if (a_flag > 2) {
dump_program_tables(ret, 0);
}
#endif /* PIKE_DEBUG */
verify_supporters();
pike.git/src/program.c:10630: Inside #if defined(PIKE_DEBUG)
#ifdef PIKE_DEBUG
ONERROR tmp;
#endif
struct object *ce;
struct compilation *c;
/* FIXME! */
Pike_fatal("Old C-level compile() function called!\n");
- CDFPRINTF((stderr, "th(%ld) %p compile() enter, placeholder=%p\n",
- (long) th_self(), atarget, aplaceholder));
+ CDFPRINTF("th(%ld) %p compile() enter, placeholder=%p\n",
+ (long) th_self(), atarget, aplaceholder);
ce = clone_object(compilation_program, 0);
c = (struct compilation *)ce->storage;
debug_malloc_touch(c);
verify_supporters();
c->p = NULL;
add_ref(c->prog=aprog);
pike.git/src/program.c:10689:
delay=run_pass1(c);
dependants_ok = call_dependants(& c->supporter, !!c->p );
#ifdef PIKE_DEBUG
/* FIXME */
UNSET_ONERROR(tmp);
#endif
if(delay)
{
- CDFPRINTF((stderr, "th(%ld) %p compile() finish later, placeholder=%p.\n",
- (long) th_self(), c->target, c->placeholder));
+ CDFPRINTF("th(%ld) %p compile() finish later, placeholder=%p.\n",
+ (long) th_self(), c->target, c->placeholder);
/* finish later */
add_ref(c->p);
verify_supporters();
return c->p; /* freed later */
}else{
- CDFPRINTF((stderr, "th(%ld) %p compile() finish now\n",
- (long) th_self(), c->target));
+ CDFPRINTF("th(%ld) %p compile() finish now\n",
+ (long) th_self(), c->target);
/* finish now */
if(c->p) run_pass2(c);
debug_malloc_touch(c);
run_cleanup(c,0);
ret=c->p;
/* FIXME: Looks like ret should get an extra ref here, but I'm not
* sure. Besides, this function isn't used anymore. /mast */
debug_malloc_touch(c);
free_object(ce);
if (!dependants_ok) {
- CDFPRINTF((stderr, "th(%ld) %p compile() reporting failure "
+ CDFPRINTF("th(%ld) %p compile() reporting failure "
"since a dependant failed.\n",
- (long) th_self(), c->target));
+ (long) th_self(), c->target);
if (ret) free_program(ret);
throw_error_object(fast_clone_object(compilation_error_program), 0, 0, 0,
"Compilation failed.\n");
}
if(!ret) {
- CDFPRINTF((stderr, "th(%ld) %p compile() failed.\n",
- (long) th_self(), c->target));
+ CDFPRINTF("th(%ld) %p compile() failed.\n",
+ (long) th_self(), c->target);
throw_error_object(fast_clone_object(compilation_error_program), 0, 0, 0,
"Compilation failed.\n");
}
debug_malloc_touch(ret);
#ifdef PIKE_DEBUG
if (a_flag > 2) {
dump_program_tables(ret, 0);
}
#endif /* PIKE_DEBUG */
verify_supporters();