From 2585b08e7e1fddd2145dbbcc90710f512f43da94 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 24 Mar 2015 11:44:40 -0600 Subject: [PATCH] Remove unused variables from TARGET and shuffle some of its other members so they pack more efficiently. --- src/engine/make1.c | 2 -- src/engine/rules.c | 1 - src/engine/rules.h | 26 ++++++++++++-------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/engine/make1.c b/src/engine/make1.c index 5a96dc4e5..390b4ccbe 100644 --- a/src/engine/make1.c +++ b/src/engine/make1.c @@ -593,8 +593,6 @@ static void make1c( state const * const pState ) TARGET * saved_includes; SETTINGS * s; - t->rescanned = 1; - /* Clean current includes. */ saved_includes = t->includes; t->includes = 0; diff --git a/src/engine/rules.c b/src/engine/rules.c index 7947c5507..eb35aa6df 100644 --- a/src/engine/rules.c +++ b/src/engine/rules.c @@ -63,7 +63,6 @@ static TARGET * get_target_includes( TARGET * const t ) i->name = object_copy( t->name ); i->boundname = object_copy( i->name ); i->flags |= T_FLAG_NOTFILE | T_FLAG_INTERNAL; - i->original_target = t; t->includes = i; } return t->includes; diff --git a/src/engine/rules.h b/src/engine/rules.h index f3a020bb8..d118b3149 100644 --- a/src/engine/rules.h +++ b/src/engine/rules.h @@ -125,6 +125,16 @@ struct _target ACTIONS * actions; /* rules to execute, if any */ SETTINGS * settings; /* variables to define */ + TARGETS * depends; /* dependencies */ + TARGETS * dependants; /* the inverse of dependencies */ + TARGETS * rebuilds; /* targets that should be force-rebuilt + * whenever this one is + */ + TARGET * includes; /* internal includes node */ + + timestamp time; /* update time */ + timestamp leaf; /* update time of leaf sources */ + short flags; /* status info */ #define T_FLAG_TEMP 0x0001 /* TEMPORARY applied */ @@ -164,18 +174,6 @@ struct _target #define T_BIND_PARENTS 2 /* using parent's timestamp */ #define T_BIND_EXISTS 3 /* real file, timestamp valid */ - TARGETS * depends; /* dependencies */ - TARGETS * dependants; /* the inverse of dependencies */ - TARGETS * rebuilds; /* targets that should be force-rebuilt - * whenever this one is - */ - TARGET * includes; /* internal includes node */ - TARGET * original_target; /* original_target->includes = this */ - char rescanned; - - timestamp time; /* update time */ - timestamp leaf; /* update time of leaf sources */ - char fate; /* make0()'s diagnosis */ #define T_FATE_INIT 0 /* nothing done to target */ @@ -212,12 +210,12 @@ struct _target #define T_MAKE_SEMAPHORE 5 /* Special target type for semaphores */ #endif + char status; /* exec_cmd() result */ + #ifdef OPT_SEMAPHORE TARGET * semaphore; /* used in serialization */ #endif - char status; /* exec_cmd() result */ - int asynccnt; /* child deps outstanding */ TARGETS * parents; /* used by make1() for completion */ TARGET * scc_root; /* used by make to resolve cyclic includes