From 977d93dc6728c890b502bf45ad4bd854a5df2d65 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 1 Feb 1991 10:21:39 +0000 Subject: [PATCH] reduce memory usage (again) --- util/opt/line.h | 1 - util/opt/process.c | 6 +++--- util/opt/tes.c | 7 ++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/util/opt/line.h b/util/opt/line.h index f282e9e4b..502467b25 100644 --- a/util/opt/line.h +++ b/util/opt/line.h @@ -70,7 +70,6 @@ typedef union { struct line { line_p l_next; /* maintains linked list */ - line_p l_prev; /* for back referencing loc's */ byte l_instr; /* instruction number */ byte l_optyp; /* specifies what follows */ un_l_a l_a; diff --git a/util/opt/process.c b/util/opt/process.c index 9f860f0d9..ce3a6282f 100644 --- a/util/opt/process.c +++ b/util/opt/process.c @@ -191,14 +191,14 @@ symvalue() { do_tes() { - register line_p insptr = instrs, oldlin = NULL; + register line_p insptr = instrs, oldlin = NULL, oldlin2 = NULL; init_state(); tes_pseudos(); while (insptr != NULL) { - insptr->l_prev = oldlin; + tes_instr(insptr, oldlin, oldlin2); + oldlin2 = oldlin; oldlin = insptr; - tes_instr(insptr); insptr = insptr->l_next; } } diff --git a/util/opt/tes.c b/util/opt/tes.c index 355042a51..6e484f0bd 100644 --- a/util/opt/tes.c +++ b/util/opt/tes.c @@ -30,7 +30,6 @@ extern char flow_tab[]; #define INSTR(lnp) (lnp->l_instr & BMASK) #define TYPE(lnp) lnp->l_optyp -#define PREV(lnp) lnp->l_prev #define SHORT(lnp) lnp->l_a.la_short #define MINI(lnp) ((lnp->l_optyp & BMASK) - Z_OPMINI) @@ -69,14 +68,12 @@ tes_pseudos() } } -tes_instr(lnp) -line_p lnp; +tes_instr(lnp, x, y) +line_p lnp, x, y; { char *s; register instr = INSTR(lnp); register int arg, argdef; - line_p x = PREV(lnp); - line_p y = (x == (line_p) 0 ? (line_p) 0 : PREV(x)); int neg = 0; if (instr == op_lab) { -- 2.34.1