diff options
| author | rillig <rillig@NetBSD.org> | 2020-11-28 19:16:53 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2020-11-28 19:16:53 +0000 |
| commit | 8266d24efaed0e5eea0111cbf4256f1497efd162 (patch) | |
| tree | 44031db008713fcfc35b036dd00a4822a5cc7282 /usr.bin/make | |
| parent | 999aef61111dcae32ba38cc335c289bf26a4e5b4 (diff) | |
make(1): reduce pointer indirection for GNode.order_pred and order_succ
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/make.c | 10 | ||||
| -rw-r--r-- | usr.bin/make/make.h | 6 | ||||
| -rw-r--r-- | usr.bin/make/parse.c | 8 | ||||
| -rw-r--r-- | usr.bin/make/suff.c | 6 | ||||
| -rw-r--r-- | usr.bin/make/targ.c | 16 |
5 files changed, 23 insertions, 23 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 19ddcc8e149..f7e3f57d61d 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.220 2020/11/28 19:12:28 rillig Exp $ */ +/* $NetBSD: make.c,v 1.221 2020/11/28 19:16:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -102,7 +102,7 @@ #include "job.h" /* "@(#)make.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: make.c,v 1.220 2020/11/28 19:12:28 rillig Exp $"); +MAKE_RCSID("$NetBSD: make.c,v 1.221 2020/11/28 19:16:53 rillig Exp $"); /* Sequence # to detect recursion. */ static unsigned int checked_seqno = 1; @@ -566,7 +566,7 @@ IsWaitingForOrder(GNode *gn) { GNodeListNode *ln; - for (ln = gn->order_pred->first; ln != NULL; ln = ln->next) { + for (ln = gn->order_pred.first; ln != NULL; ln = ln->next) { GNode *ogn = ln->datum; if (GNode_IsDone(ogn) || !(ogn->flags & REMAKE)) @@ -588,7 +588,7 @@ ScheduleOrderSuccessors(GNode *gn) GNodeListNode *toBeMadeNext = toBeMade->first; GNodeListNode *ln; - for (ln = gn->order_succ->first; ln != NULL; ln = ln->next) + for (ln = gn->order_succ.first; ln != NULL; ln = ln->next) if (MakeBuildParent(ln->datum, toBeMadeNext) != 0) break; } @@ -1026,7 +1026,7 @@ static void MakePrintStatusOrder(GNode *gn) { GNodeListNode *ln; - for (ln = gn->order_pred->first; ln != NULL; ln = ln->next) + for (ln = gn->order_pred.first; ln != NULL; ln = ln->next) MakePrintStatusOrderNode(ln->datum, gn); } diff --git a/usr.bin/make/make.h b/usr.bin/make/make.h index 55086a3f880..4c8cdd05c2c 100644 --- a/usr.bin/make/make.h +++ b/usr.bin/make/make.h @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.222 2020/11/28 19:12:28 rillig Exp $ */ +/* $NetBSD: make.h,v 1.223 2020/11/28 19:16:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -394,11 +394,11 @@ typedef struct GNode { /* .ORDER nodes we need made. The nodes that must be made (if they're * made) before this node can be made, but that do not enter into the * datedness of this node. */ - GNodeList *order_pred; + GNodeList order_pred; /* .ORDER nodes who need us. The nodes that must be made (if they're * made at all) after this node is made, but that do not depend on * this node, in the normal sense. */ - GNodeList *order_succ; + GNodeList order_succ; /* Other nodes of the same name, for the '::' dependency operator. */ GNodeList *cohorts; diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 697d4894834..7bdb961831e 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.455 2020/11/28 19:12:28 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.456 2020/11/28 19:16:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -117,7 +117,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.455 2020/11/28 19:12:28 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.456 2020/11/28 19:16:53 rillig Exp $"); /* types and constants */ @@ -927,8 +927,8 @@ ParseDoSrcOrder(const char *src) if (doing_depend) ParseMark(gn); if (order_pred != NULL) { - Lst_Append(order_pred->order_succ, gn); - Lst_Append(gn->order_pred, order_pred); + Lst_Append(&order_pred->order_succ, gn); + Lst_Append(&gn->order_pred, order_pred); if (DEBUG(PARSE)) { debug_printf("# %s: added Order dependency %s - %s\n", __func__, order_pred->name, gn->name); diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 1de90c4b72c..306c37ec92a 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.310 2020/11/28 19:12:28 rillig Exp $ */ +/* $NetBSD: suff.c,v 1.311 2020/11/28 19:16:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -114,7 +114,7 @@ #include "dir.h" /* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */ -MAKE_RCSID("$NetBSD: suff.c,v 1.310 2020/11/28 19:12:28 rillig Exp $"); +MAKE_RCSID("$NetBSD: suff.c,v 1.311 2020/11/28 19:16:53 rillig Exp $"); #define SUFF_DEBUG0(text) DEBUG0(SUFF, text) #define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1) @@ -1239,7 +1239,7 @@ ExpandChildren(GNodeListNode *cln, GNode *pgn) GNode *gn; /* New source 8) */ char *cp; /* Expanded value */ - if (!Lst_IsEmpty(cgn->order_pred) || !Lst_IsEmpty(cgn->order_succ)) + if (!Lst_IsEmpty(&cgn->order_pred) || !Lst_IsEmpty(&cgn->order_succ)) /* It is all too hard to process the result of .ORDER */ return; diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index da35cc1dec3..b99c05fbd23 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.143 2020/11/28 19:12:28 rillig Exp $ */ +/* $NetBSD: targ.c,v 1.144 2020/11/28 19:16:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -119,7 +119,7 @@ #include "dir.h" /* "@(#)targ.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: targ.c,v 1.143 2020/11/28 19:12:28 rillig Exp $"); +MAKE_RCSID("$NetBSD: targ.c,v 1.144 2020/11/28 19:16:53 rillig Exp $"); /* * All target nodes that appeared on the left-hand side of one of the @@ -204,8 +204,8 @@ GNode_New(const char *name) gn->implicitParents = Lst_New(); Lst_Init(&gn->parents); Lst_Init(&gn->children); - gn->order_pred = Lst_New(); - gn->order_succ = Lst_New(); + Lst_Init(&gn->order_pred); + Lst_Init(&gn->order_succ); gn->cohorts = Lst_New(); gn->cohort_num[0] = '\0'; gn->unmade_cohorts = 0; @@ -237,8 +237,8 @@ GNode_Free(void *gnp) Lst_Free(gn->implicitParents); /* Do not free the nodes themselves, */ Lst_Done(&gn->parents); /* as they are not owned by this node. */ Lst_Done(&gn->children); /* likewise */ - Lst_Free(gn->order_pred); /* likewise */ - Lst_Free(gn->order_succ); /* likewise */ + Lst_Done(&gn->order_pred); /* likewise */ + Lst_Done(&gn->order_succ); /* likewise */ Lst_Free(gn->cohorts); /* likewise */ HashTable_Done(&gn->vars); /* Do not free the variables themselves, * even though they are owned by this node. @@ -509,8 +509,8 @@ Targ_PrintNode(GNode *gn, int pass) debug_printf("# %d unmade children\n", gn->unmade); } PrintNodeNamesLine("parents", &gn->parents); - PrintNodeNamesLine("order_pred", gn->order_pred); - PrintNodeNamesLine("order_succ", gn->order_succ); + PrintNodeNamesLine("order_pred", &gn->order_pred); + PrintNodeNamesLine("order_succ", &gn->order_succ); debug_printf("%-16s%s", gn->name, GNode_OpName(gn)); Targ_PrintType(gn->type); |
