mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
* 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user