… but since I liked the bonus of having the hval stored so much, merge

it with the array index; var.c says that
│ 1244         /* The table entry is always [0] */
so that we can have a special flag and a union which stores hval for
the table index, the array index otherwise (coïncidentally *hint hint*
they have the same size)
This commit is contained in:
tg
2009-08-28 21:01:27 +00:00
parent bb7a720a00
commit 9b8d4023fa
5 changed files with 25 additions and 32 deletions

4
expr.c
View File

@ -22,7 +22,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.32 2009/08/28 20:38:41 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.33 2009/08/28 21:01:25 tg Exp $");
/* The order of these enums is constrained by the order of opinfo[] */
enum token {
@ -610,8 +610,8 @@ tempvar(void)
vp->areap = ATEMP;
#ifdef notyet_ktremove
vp->tablep = NULL;
vp->hval = 0;
#endif
vp->ua.hval = 0;
vp->val.i = 0;
vp->name[0] = '\0';
return (vp);