Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: reduce relocations, thereby reducing .tex...



details:   https://anonhg.NetBSD.org/src/rev/71219afc9e2a
branches:  trunk
changeset: 1023685:71219afc9e2a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Sep 21 23:06:18 2021 +0000

description:
make: reduce relocations, thereby reducing .text size

No functional change.

diffstat:

 usr.bin/make/cond.c  |  8 ++++----
 usr.bin/make/parse.c |  6 +++---
 usr.bin/make/trace.c |  6 +++---
 usr.bin/make/var.c   |  8 ++++----
 4 files changed, 14 insertions(+), 14 deletions(-)

diffs (117 lines):

diff -r 11215b6032ae -r 71219afc9e2a usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Tue Sep 21 22:53:35 2021 +0000
+++ b/usr.bin/make/cond.c       Tue Sep 21 23:06:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.278 2021/09/21 22:53:35 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.279 2021/09/21 23:06:18 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.278 2021/09/21 22:53:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.279 2021/09/21 23:06:18 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -778,8 +778,8 @@
 CondParser_FuncCall(CondParser *par, bool doEval, Token *out_token)
 {
        static const struct fn_def {
-               const char *fn_name;
-               size_t fn_name_len;
+               const char fn_name[9];
+               unsigned char fn_name_len;
                size_t (*fn_parse)(CondParser *, const char **, bool,
                                   const char *, char **);
                bool (*fn_eval)(size_t, const char *);
diff -r 11215b6032ae -r 71219afc9e2a usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Sep 21 22:53:35 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Sep 21 23:06:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.564 2021/09/21 21:39:32 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.565 2021/09/21 23:06:18 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.564 2021/09/21 21:39:32 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.565 2021/09/21 23:06:18 rillig Exp $");
 
 /* types and constants */
 
@@ -261,7 +261,7 @@
  * keyword is used as a source ("0" if the keyword isn't special as a source)
  */
 static const struct {
-       const char *name;       /* Name of keyword */
+       const char name[17];    /* Name of keyword */
        ParseSpecial spec;      /* Type when used as a target */
        GNodeType op;           /* Operator when used as a source */
 } parseKeywords[] = {
diff -r 11215b6032ae -r 71219afc9e2a usr.bin/make/trace.c
--- a/usr.bin/make/trace.c      Tue Sep 21 22:53:35 2021 +0000
+++ b/usr.bin/make/trace.c      Tue Sep 21 23:06:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: trace.c,v 1.28 2021/02/05 05:15:12 rillig Exp $        */
+/*     $NetBSD: trace.c,v 1.29 2021/09/21 23:06:18 rillig Exp $        */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -48,13 +48,13 @@
 #include "job.h"
 #include "trace.h"
 
-MAKE_RCSID("$NetBSD: trace.c,v 1.28 2021/02/05 05:15:12 rillig Exp $");
+MAKE_RCSID("$NetBSD: trace.c,v 1.29 2021/09/21 23:06:18 rillig Exp $");
 
 static FILE *trfile;
 static pid_t trpid;
 const char *trwd;
 
-static const char *evname[] = {
+static const char evname[][4] = {
        "BEG",
        "END",
        "ERR",
diff -r 11215b6032ae -r 71219afc9e2a usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Sep 21 22:53:35 2021 +0000
+++ b/usr.bin/make/var.c        Tue Sep 21 23:06:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.950 2021/09/11 09:16:14 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.951 2021/09/21 23:06:18 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.950 2021/09/11 09:16:14 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.951 2021/09/21 23:06:18 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -318,7 +318,7 @@
 
 static VarExportedMode var_exportedVars = VAR_EXPORTED_NONE;
 
-static const char *VarEvalMode_Name[] = {
+static const char VarEvalMode_Name[][32] = {
        "parse-only",
        "eval",
        "eval-defined",
@@ -2010,7 +2010,7 @@
        DEF_DEFINED
 } ExprDefined;
 
-static const char *const ExprDefined_Name[] = {
+static const char ExprDefined_Name[][10] = {
        "regular",
        "undefined",
        "defined"



Home | Main Index | Thread Index | Old Index