From 79ac11bd40e580ebd07f3a059422f024a2b6da38 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 2 Sep 1988 13:55:54 +0000 Subject: [PATCH] Made to compile with DEBUG off --- util/ego/share/debug.c | 2 +- util/ego/share/debug.h | 2 +- util/ego/share/get.c | 2 +- util/ego/share/get.h | 8 ++++++++ util/ego/share/go.c | 2 ++ util/ego/share/locals.c | 2 +- util/ego/share/locals.h | 5 +++++ util/ego/share/put.c | 2 +- util/ego/share/put.h | 4 +++- 9 files changed, 23 insertions(+), 6 deletions(-) diff --git a/util/ego/share/debug.c b/util/ego/share/debug.c index 90c666f23..40ed452fc 100644 --- a/util/ego/share/debug.c +++ b/util/ego/share/debug.c @@ -70,7 +70,6 @@ badassertion(file,line) char *file; unsigned line; { fprintf(stderr,"assertion failed file %s, line %u\n",file,line); error("assertion"); } -#endif /* Valid Address */ VA(a) short *a; { @@ -148,3 +147,4 @@ VP(p) proc_p p; { error("VP: unlikely p_nrlabels: %d", nrlabs); } } +#endif diff --git a/util/ego/share/debug.h b/util/ego/share/debug.h index cf2a2c096..4ab499b74 100644 --- a/util/ego/share/debug.h +++ b/util/ego/share/debug.h @@ -6,7 +6,7 @@ /* D E B U G G I N G T O O L S */ /* TEMPORARY: */ -#define DEBUG +/* #define DEBUG */ extern int linecount; /* # lines in this file */ extern bool verbose_flag; /* generate verbose output ? */ diff --git a/util/ego/share/get.c b/util/ego/share/get.c index 4886efc42..755e22a04 100644 --- a/util/ego/share/get.c +++ b/util/ego/share/get.c @@ -427,7 +427,7 @@ line_p read_line(p_out) } -STATIC message(lnp) +message(lnp) line_p lnp; { /* See if lnp is some useful message. diff --git a/util/ego/share/get.h b/util/ego/share/get.h index df7cf03fa..8f3fdb433 100644 --- a/util/ego/share/get.h +++ b/util/ego/share/get.h @@ -56,3 +56,11 @@ extern bool getunit(); /* (FILE *gf,*lf; short kind_out; * variable 'mesregs'. The proc read * is returned in p_out. */ +extern message(); /* (line_p lnp) + * See if lnp is some useful message. + * (e.g. a message telling that a + * certain local variable will never be + * referenced indirectly, so it may be + * put in a register. + * If so, add it to the mesregs set.) + */ diff --git a/util/ego/share/go.c b/util/ego/share/go.c index e4407233d..826b66f94 100644 --- a/util/ego/share/go.c +++ b/util/ego/share/go.c @@ -140,9 +140,11 @@ no_action() { } core_usage() { +#ifdef DEBUG if (core_flag) { coreusage(); } +#endif } report(s,n) diff --git a/util/ego/share/locals.c b/util/ego/share/locals.c index 705d9966b..03542c7bd 100644 --- a/util/ego/share/locals.c +++ b/util/ego/share/locals.c @@ -182,7 +182,7 @@ make_localtab(p) -STATIC find_local(off,nr_out,found_out) +find_local(off,nr_out,found_out) offset off; short *nr_out; bool *found_out; diff --git a/util/ego/share/locals.h b/util/ego/share/locals.h index fd9db003a..91cde39bf 100644 --- a/util/ego/share/locals.h +++ b/util/ego/share/locals.h @@ -21,6 +21,11 @@ extern var_nr(); /* (line_p l; short *nr_out;bool *found_out) * Compute the 'variable number' of the * variable referenced by EM instruction l. */ +extern find_local(); /* (offset off; short *nr_out; bool *found_out) + * Try to find the local variable at the given + * offset. Return its local-number. + */ + /* Every global variable for which ud-info is maintained has * a 'global variable number' (o_globnr). Every useful local diff --git a/util/ego/share/put.c b/util/ego/share/put.c index f3767a2a0..f4a66b13c 100644 --- a/util/ego/share/put.c +++ b/util/ego/share/put.c @@ -124,7 +124,7 @@ STATIC outobject(obj) obj_p obj; { } -STATIC outproc(p) proc_p p; { +outproc(p) proc_p p; { outshort((short) p->p_id); } diff --git a/util/ego/share/put.h b/util/ego/share/put.h index 91f9dc48a..ed1c65fbd 100644 --- a/util/ego/share/put.h +++ b/util/ego/share/put.h @@ -15,7 +15,9 @@ extern outshort(); /* (short i) extern outoff(); /* (offset off) * Write an offset to curoutp */ - +extern outproc(); /* (proc_p p) + * Write a procid to curoutp + */ extern putdtable(); /* (dblock_p head, FILE *df) * Write the data block table to file df, * preceded by its length. -- 2.34.1