Mailing List Archive

[master] 0bea9b1b5 vcc: retire the now unused procprivhead facility
commit 0bea9b1b5867aec3bfcaea26404601e385d5b603
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Wed Feb 28 11:55:27 2024 +0100

vcc: retire the now unused procprivhead facility

We no longer need to mark used vmods in subroutines (see previous
commit)

diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index f3f9a2d70..082205a89 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -156,8 +156,6 @@ vcc_NewProc(struct vcc *tl, struct symbol *sym)
AN(p);
VTAILQ_INIT(&p->calls);
VTAILQ_INIT(&p->uses);
- VTAILQ_INIT(&p->priv_tasks);
- VTAILQ_INIT(&p->priv_tops);
VTAILQ_INSERT_TAIL(&tl->procs, p, list);
p->prologue = VSB_new_auto();
AN(p->prologue);
diff --git a/lib/libvcc/vcc_compile.h b/lib/libvcc/vcc_compile.h
index acd997281..93fb613c8 100644
--- a/lib/libvcc/vcc_compile.h
+++ b/lib/libvcc/vcc_compile.h
@@ -207,7 +207,6 @@ struct symbol {
};

VTAILQ_HEAD(tokenhead, token);
-VTAILQ_HEAD(procprivhead, procpriv);

struct proc {
unsigned magic;
@@ -215,8 +214,6 @@ struct proc {
const struct method *method;
VTAILQ_HEAD(,proccall) calls;
VTAILQ_HEAD(,procuse) uses;
- struct procprivhead priv_tasks;
- struct procprivhead priv_tops;
VTAILQ_ENTRY(proc) list;
struct token *name;
unsigned ret_bitmap;
@@ -483,8 +480,6 @@ extern const struct xrefuse XREF_ACTION[1];
void vcc_AddUses(struct vcc *, const struct token *, const struct token *,
const struct symbol *sym, const struct xrefuse *use);
int vcc_CheckUses(struct vcc *tl);
-const char *vcc_MarkPriv(struct vcc *, struct procprivhead *,
- const char *);

#define ERRCHK(tl) do { if ((tl)->err) return; } while (0)
#define ErrInternal(tl) vcc__ErrInternal(tl, __func__, __LINE__)
diff --git a/lib/libvcc/vcc_xref.c b/lib/libvcc/vcc_xref.c
index 035c42cfb..6f72576a0 100644
--- a/lib/libvcc/vcc_xref.c
+++ b/lib/libvcc/vcc_xref.c
@@ -63,11 +63,6 @@ struct procuse {
struct proc *fm;
};

-struct procpriv {
- VTAILQ_ENTRY(procpriv) list;
- const char *vmod;
-};
-
/*--------------------------------------------------------------------*/

static void
@@ -467,28 +462,3 @@ VCC_XrefTable(struct vcc *tl)
Fc(tl, 0, "*/\n\n");
#include "vcc_namespace.h"
}
-
-/*---------------------------------------------------------------------
- * mark vmod as referenced, return NULL if not yet marked, vmod if marked
- */
-
-const char *
-vcc_MarkPriv(struct vcc *tl, struct procprivhead *head,
- const char *vmod)
-{
- struct procpriv *pp;
-
- AN(vmod);
-
- VTAILQ_FOREACH(pp, head, list) {
- if (pp->vmod == vmod)
- return (vmod);
- AN(strcmp(pp->vmod, vmod));
- }
-
- pp = TlAlloc(tl, sizeof *pp);
- assert(pp != NULL);
- pp->vmod = vmod;
- VTAILQ_INSERT_TAIL(head, pp, list);
- return (NULL);
-}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit