Commit 687b09f9 authored by John van Groningen's avatar John van Groningen

remove more undefined fields and definitions

parent 4b23867c
......@@ -2539,8 +2539,6 @@ DeclareFunctionC (char *name, int arity, int functionIndex, unsigned int ancesto
newSymbDef->sdef_dcl_icl = NULL;
newSymbDef->sdef_isused = 0;
newSymbDef->sdef_line = 0; /* used in PrintType */
*icl->beicl_depsP = newSymbDef;
icl->beicl_depsP = &newSymbDef->sdef_next_scc;
newSymbDef->sdef_arfun = NoArrayFun;
......@@ -2660,7 +2658,6 @@ BEDeclareRuleType (int functionIndex, int moduleIndex, CleanString name)
newSymbDef->sdef_ident = newIdent;
newSymbDef->sdef_mark = 0;
newSymbDef->sdef_isused = 0;
newSymbDef->sdef_line = 0; /* used in PrintSymbolOfIdent */
functions [functionIndex].symb_kind = definition;
functions [functionIndex].symb_def = newSymbDef;
......
......@@ -126,7 +126,6 @@ SymbDef MakeNewSymbolDefinition (char * module, Ident name, int arity, SDefKind
def->sdef_ident = name;
def->sdef_arity = arity;
def->sdef_kind = kind;
def->sdef_line = 0;
def->sdef_mark=0;
......
......@@ -10,22 +10,6 @@
#include "checker.h"
#include <ctype.h>
char
*Earity = "used with wrong arity",
*Ecyclicsyn = "cyclic dependencies between synonym types",
*EwrongdefS = "differs from the symbol of the first rule alternative",
*Einfix_imp_def = "infix specification in the impl module conflicts with the def module",
*EImplandDef1 = "definition in the impl module conflicts with the def module",
*EImplandDef5 = "should have a type specification in the implementation rule",
*Enodeid2 = "multiply defined",
*Enodeid3 = "not defined";
static char
*Etuple = "tuples without type checking not allowed";
unsigned RuleCount,TypeSymbolCount;
SymbDef StackTop;
char *ConvertSymbolKindToString (SymbKind skind)
{
switch (skind)
......@@ -256,11 +240,3 @@ void CheckSymbolWarningOrError (Bool error,struct symbol *symbol,char *msg)
{
StaticMessage (error,"%S","%S %s",CurrentSymbol,symbol,msg);
}
extern Ident TupleId;
void TupleError (void)
{
CheckError (TupleId->ident_name,Etuple);
}
......@@ -12,24 +12,6 @@ extern void CheckSymbolWarning (struct symbol *symbol,char *msg);
extern void CheckWarningOrError (Bool error,char *msg1,char *msg2);
extern void CheckWarningOrError2 (Bool error,char *msg1,char *msg2,char *msg3);
extern void CheckSymbolWarningOrError (Bool error,struct symbol *symbol,char *msg);
extern void TupleError (void);
extern char *Earity,*Enodeid3,*Ecyclicsyn,*Enodeid2,*EwrongdefS,*Einfix_imp_def,
*EImplandDef1,*EImplandDef5;
extern unsigned RuleCount,TypeSymbolCount;
extern SymbDef StackTop;
#define PushOnDepStack(sdef) \
sdef->sdef_parent=StackTop; \
StackTop=sdef
#define PopFromDepStack(sdef) \
sdef=StackTop; \
StackTop=sdef->sdef_parent; \
sdef->sdef_parent=NULL
#define IsOnDepStack(sdef) ((sdef)->sdef_parent!=NULL)
#define NameOfSymbol(symb) ((symb)->symb_def ->sdef_ident->ident_name)
......
......@@ -673,7 +673,7 @@ static void CodeRule (ImpRuleP rule)
GenFunctionDescriptorAndExportNodeAndDescriptor (rule_sdef);
if (DoTimeProfiling)
GenPB_ident (rule_sdef->sdef_ident,rule_sdef->sdef_line);
GenPB_ident (rule_sdef->sdef_ident,0 /*rule_sdef->sdef_line*/);
if (rule_sdef->sdef_exported && rule_sdef->sdef_calledwithrootnode && ExpectsResultNode (resultstate))
MakeSymbolLabel (&ea_lab,CurrentModule,ea_pref,rule_sdef,0);
......
......@@ -943,7 +943,6 @@ static void CodeNormalRootNode (Node root,NodeId rootid,int asp,int bsp,CodeGenN
Assume (case_ident_s.ident_name != NULL, "codegen3", "CodeNormalRootNode (fail_symb)");
case_def_s.sdef_ident = &case_ident_s;
case_def_s.sdef_line = 0;
StaticMessage (FunctionMayFailIsError, "%D", "case may fail", &case_def_s);
......
......@@ -355,7 +355,7 @@ void PrintSymbol (Symbol symbol, File file)
break;
case definition:
symb_id = symbol -> symb_def -> sdef_ident;
line_nr = symbol -> symb_def -> sdef_line;
line_nr = 0;
break;
case int_denot:
FPutS (symbol->symb_int, file);
......@@ -499,7 +499,7 @@ void StaticMessage (Bool error, char *symbol_format, char *message_format, ...)
case 'D':
{
SymbDef def = va_arg (ap, SymbDef);
PrintSymbolOfIdent (def->sdef_ident, def->sdef_line, StdError);
PrintSymbolOfIdent (def->sdef_ident, 0, StdError);
break;
}
case 'S':
......
......@@ -3883,7 +3883,7 @@ void GenNoMatchError (SymbDef sdef,int asp,int bsp,int string_already_generated)
if (!desc_needed && !string_already_generated){
put_directive_ (Dstring);
FPrintF (OutFile, "x_%u \"",sdef->sdef_number);
PrintSymbolOfIdent (sdef->sdef_ident, sdef->sdef_line,OutFile);
PrintSymbolOfIdent (sdef->sdef_ident,0,OutFile);
FPutS ("\"", OutFile);
}
}
......@@ -3907,7 +3907,7 @@ void GenCaseNoMatchError (SymbDefP case_def,int asp,int bsp)
put_directive_ (Dstring);
FPrintF (OutFile, "case_fail%u \"",CaseFailNumber);
PrintSymbolOfIdent (case_def->sdef_ident,case_def->sdef_line,OutFile);
PrintSymbolOfIdent (case_def->sdef_ident,0,OutFile);
FPrintF (OutFile, "\"");
CaseFailNumber++;
......
......@@ -517,7 +517,6 @@ STRUCT (rule_alt,RuleAlt){
RuleAlts alt_next;
unsigned alt_line;
unsigned alt_kind:3; /* RhsKind */
Bool alt_may_fail:1;
};
#define alt_rhs_root alt_rhs.rhs_root
......@@ -565,7 +564,6 @@ STRUCT (imp_rule,ImpRule){
#endif
unsigned rule_line;
unsigned rule_mark;
unsigned rule_ref_count;
};
#define RULE_CAF_MASK 2
......@@ -620,11 +618,9 @@ STRUCT (symbol_def,SymbDef){
struct symbol_def * sdef_next_scc;
union {
struct symbol_def * sdef_u2_parent;
struct symbol_def * sdef_u2_next_version; /* for IMPRULES */
} sdef_u2;
unsigned sdef_line;
int sdef_mark;
unsigned sdef_kind:SDefKindSize;
......@@ -660,9 +656,6 @@ STRUCT (symbol_def,SymbDef){
/* some macros to reuse bit fields */
#define sdef_group_number sdef_ancestor
#define sdef_has_instance_info sdef_used_as_instance
#define sdef_parent sdef_u2.sdef_u2_parent
#define sdef_next_version sdef_u2.sdef_u2_next_version
......@@ -698,7 +691,6 @@ typedef struct {
Types im_types;
ImpRules im_rules;
struct symbol_def * im_start;
Bool im_main;
DefMod im_def_module;
#if IMPORT_OBJ_AND_LIB
struct string_list * im_imported_objs;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment