aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-04-24 06:02:00 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-04-24 06:02:00 +0300
commitd417fb68b2904d49ea161b8c5e67fe799eb70911 (patch)
tree3961bb2da211be78b634941b3d579174e4f55cd6
parent09149c00e701d265efb08cec1040841aa40d6fcf (diff)
downloadegawk-d417fb68b2904d49ea161b8c5e67fe799eb70911.tar.gz
egawk-d417fb68b2904d49ea161b8c5e67fe799eb70911.tar.bz2
egawk-d417fb68b2904d49ea161b8c5e67fe799eb70911.zip
Remove unused parts of the NODE.
-rw-r--r--ChangeLog8
-rw-r--r--awk.h21
2 files changed, 11 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index c91c833c..eccda54c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-04-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h (NODE): Additional cleanups. Removed `aq' and `param_list'
+ elements from various unions and removed 'nextp' and
+ `a_opaque' defines. None of these were in use.
+ Rework the comment for valref, per suggestion from
+ Andrew Schorr.
+
2017-04-23 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (nextc): Adjust so that 3.1.x behavior is restored
diff --git a/awk.h b/awk.h
index a92df468..23552469 100644
--- a/awk.h
+++ b/awk.h
@@ -345,7 +345,6 @@ typedef struct exp_node {
Regexp *preg[2];
struct exp_node **av;
BUCKET **bv;
- void *aq;
void (*uptr)(void);
struct exp_instruction *iptr;
} r;
@@ -353,7 +352,6 @@ typedef struct exp_node {
struct exp_node *extra;
void (*aptr)(void);
long xl;
- char **param_list;
} x;
char *name;
size_t reserved;
@@ -384,20 +382,9 @@ typedef struct exp_node {
} sub;
NODETYPE type;
unsigned int flags;
- // April 2017:
- // The NODE union will be the death of me yet. :-(
- //
- // On 64 bit Intel systems, at least, if compiling without MPFR,
- // the valref (formerly) sref field needs to be at the end. In its
- // original position it overlapped with stuff in the nodep part of
- // the union causing things to break pretty badly. This doesn't
- // happen on 32 bit compiles.
- //
- // I saw this on GCC 4.9.0, GCC 5.4.0, GCC 6.3.0, PCC, TCC and
- // clang 3.8.0.
- //
- // We simply move valref out of the unions entirely to avoid future
- // problems.
+
+ // We access valref for both Node_val and Node_regex values,
+ // so it needs to be outside the union.
long valref;
/* type = Node_val */
@@ -476,7 +463,6 @@ typedef struct exp_node {
#define vname sub.nodep.name
#define lnode sub.nodep.l.lptr
-#define nextp sub.nodep.l.lptr
#define rnode sub.nodep.r.rptr
/* Node_param_list */
@@ -551,7 +537,6 @@ typedef struct exp_node {
/* Node_var_array: */
#define buckets sub.nodep.r.bv
#define nodes sub.nodep.r.av
-#define a_opaque sub.nodep.r.aq
#define array_funcs sub.nodep.l.lp
#define array_base sub.nodep.l.ll
#define table_size sub.nodep.reflags