From f74d6d25914371ed894583a69f99d547f9f283bf Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Sat, 3 Oct 2009 11:53:05 -0400 Subject: [PATCH] Remove dead code. * src/symtab.c (symbol_pack): Here because every symbol's number is always defined by this time. --- ChangeLog | 6 ++++++ src/symtab.c | 28 ++++------------------------ 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35b71eeb..1ea72b2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-03 Joel E. Denny + + Remove dead code. + * src/symtab.c (symbol_pack): Here because every symbol's number + is always defined by this time. + 2009-10-03 Alex Rozenman Add additional space after periods in NEWS. diff --git a/src/symtab.c b/src/symtab.c index cac9f80f..0a3c447e 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -549,31 +549,11 @@ symbol_check_alias_consistency_processor (void *this, static inline bool symbol_pack (symbol *this) { + aver (this->number != NUMBER_UNDEFINED); if (this->class == nterm_sym) - { - this->number += ntokens; - } - else if (this->alias) - { - /* This symbol and its alias are a single token defn. - Allocate a tokno, and assign to both check agreement of - prec and assoc fields and make both the same */ - if (this->number == NUMBER_UNDEFINED) - { - if (this == endtoken || this->alias == endtoken) - this->number = this->alias->number = 0; - else - { - aver (this->alias->number != NUMBER_UNDEFINED); - this->number = this->alias->number; - } - } - /* Do not do processing below for USER_NUMBER_HAS_STRING_ALIASes. */ - if (this->user_token_number == USER_NUMBER_HAS_STRING_ALIAS) - return true; - } - else /* this->class == token_sym */ - aver (this->number != NUMBER_UNDEFINED); + this->number += ntokens; + else if (this->user_token_number == USER_NUMBER_HAS_STRING_ALIAS) + return true; symbols[this->number] = this; return true; -- 2.45.2