* src/symtab.c (symbol_free): Remove dead deactivated code:

type_name are properly removed.
Don't use XFREE to free items that cannot be NULL.
* src/struniq.h, src/struniq.c: New.
* src/main.c (main): Initialize/free struniqs.
* src/parse-gram.y (%union): Add astruniq member.
(yyprint): Adjust.
* src/scan-gram.l (<{tag}>): Return a struniq.
Free the obstack bit that used to store it.
* src/symtab.h (symbol_t): The 'type_name' member is a struniq.
This commit is contained in:
Akim Demaille
2002-11-12 07:55:55 +00:00
parent ccdb39e0a6
commit 3e6656f9ab
12 changed files with 304 additions and 103 deletions

View File

@@ -24,6 +24,7 @@
#include "bitset_stats.h"
#include "bitset.h"
#include "getargs.h"
#include "struniq.h"
#include "symtab.h"
#include "gram.h"
#include "files.h"
@@ -63,6 +64,7 @@ main (int argc, char *argv[])
if (trace_flag & trace_bitsets)
bitset_stats_enable ();
struniqs_new ();
muscle_init ();
/* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE
@@ -165,6 +167,7 @@ main (int argc, char *argv[])
contains things such as user actions, prologue, epilogue etc. */
scanner_free ();
muscle_free ();
struniqs_free ();
/* If using alloca.c, flush the alloca'ed memory for the benefit of
people running Bison as a library in IDEs. */
#if C_ALLOCA