Commit 28558a7d authored by John van Groningen's avatar John van Groningen
Browse files

remove more unused fields

parent 53ff91df
......@@ -700,7 +700,6 @@ BESpecialArrayFunctionSymbol (BEArrayFunKind arrayFunKind, int functionIndex, in
newTypeAlt = ConvertAllocType (TypeAlt);
newTypeAlt->type_alt_type_context = NULL; /* used in PrintType */
newTypeAlt->type_alt_attr_equations = NULL; /* used in PrintType */
Assert (!arrayType->type_node_is_var);
......@@ -854,7 +853,6 @@ CreateLocallyDefinedFunction (int index, char ** abcCode, TypeArgs lhsArgs, Type
typeAlt = ConvertAllocType (TypeAlt);
typeAlt->type_alt_type_context = NULL; /* used in PrintType */
typeAlt->type_alt_attr_equations = NULL; /* used in PrintType */
typeAlt->type_alt_lhs = BENormalTypeNode (functionSymbol, lhsArgs);
typeAlt->type_alt_rhs = rhsType;
......@@ -1554,7 +1552,6 @@ BETypeAlt (BETypeNodeP lhs, BETypeNodeP rhs, BEUniVarEquations attributeEquation
alt->type_alt_lhs = lhs;
alt->type_alt_rhs = rhs;
alt->type_alt_type_context = NULL; /* used in PrintType */
alt->type_alt_attr_equations = attributeEquations; /* used in PrintType */
alt->type_alt_strict_positions = NULL;
......@@ -2781,7 +2778,6 @@ BETypeVar (CleanString name)
ident->ident_name = ConvertCleanString (name);
typeVar->tv_ident = ident;
typeVar->tv_mark = 0;
typeVar->tv_argument_nr = 0; /* ??? */
return (typeVar);
......@@ -2843,7 +2839,6 @@ BEAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors)
/* endif */
type->type_lhs = lhs;
type->type_line = 0; /* ??? */
type->type_constructors = constructors;
nConstructors = 0;
......@@ -2878,7 +2873,6 @@ void BEExtendableAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors
type = ConvertAllocType (struct type);
type->type_next = NULL;
type->type_lhs = lhs;
type->type_line = 0;
type->type_constructors = constructors;
type->type_nr_of_constructors = 0;
......@@ -2907,7 +2901,6 @@ BERecordType (int moduleIndex, BEFlatTypeP lhs, BETypeNodeP constructorType, int
constructor->cl_constructor = constructorType;
type->type_lhs = lhs;
type->type_line = 0; /* ??? */
type->type_constructors = constructor;
type->type_fields = fields;
......@@ -2961,12 +2954,8 @@ BEAbsType (BEFlatTypeP lhs)
SymbDefP sdef;
absType = ConvertAllocType (struct abs_type);
/* ifdef DEBUG */
absType->abs_next = NULL;
/* endif */
absType->abs_graph = lhs;
absType->abs_line = 0; /* ??? */
Assert (lhs->ft_symbol->symb_kind == definition);
sdef = lhs->ft_symbol->symb_def;
......
......@@ -28,19 +28,6 @@ SymbolP
IdentP gArrayIdents [NrOfArrayInstances];
RuleTypes
NewRuleType (TypeAlts type_alt, unsigned line_nr)
{
RuleTypes rule_type = CompAllocType (struct rule_type);
rule_type->rule_type_rule = type_alt;
rule_type->rule_type_line = line_nr;
rule_type->rule_type_root = type_alt->type_alt_lhs;
return rule_type;
} /* NewRuleType */
TypeArgs
NewTypeArgument (TypeNode pattern)
{
......@@ -138,7 +125,6 @@ NewTypeVar (IdentP nid)
newnid->tv_ident = nid;
newnid->tv_argument_nr = 0;
newnid->tv_mark = 0;
return (newnid);
}
......@@ -153,7 +139,6 @@ NewUniVar (IdentP id)
new_uni_var->uv_ident = id;
new_uni_var->uv_number = 0;
new_uni_var->uv_next_uni_var = NULL;
new_uni_var->uv_equations = NULL;
return (new_uni_var);
}
......
......@@ -56,8 +56,6 @@ extern TypeNode NewTypeNode (Annotation annot, AttributeKind attr, SymbolP symb,
extern TypeArgs NewTypeArgument (TypeNode pattern);
extern TypeNode NewTypeVarNode (TypeVar node_id,Annotation annot, AttributeKind attr);
extern RuleTypes NewRuleType (TypeAlts type_alt, unsigned line_nr);
extern NodeP NewSelectNode (SymbolP selectSymbol, NodeIdP selectId, int arity);
extern NodeIdP BuildSelect (NodeP node, NodeDefs **node_defs_p);
extern NodeIdP BuildSelectors (NodeP pattern, NodeP node, NodeDefs **node_defs_p);
......
......@@ -109,7 +109,6 @@ static void DPrintTypeVar (TypeVar tv, Node follow, File file)
FPrintF (file, "%s",tv->tv_ident->ident_name);
else
FPrintF (file, "i_%lx", (long) tv);
FPrintF (file, "<%d>", tv->tv_refcount);
if (follow)
FPutS (" = ", file);
}
......@@ -712,30 +711,6 @@ static void PrintTypeAttrEquations (UniVarEquations equs, File file)
}
}
}
static void PrintTypeContext (TypeContext type_context, File file)
{
SymbolList symbols;
for (symbols = type_context -> tyco_symbols; symbols; symbols = symbols -> sl_next)
{
#ifndef CLEAN2
PrintSymbol (symbols -> sl_symbol -> sdef_class -> cd_symbol, file);
#endif
FPutC (' ', file);
DPrintTypeVar (type_context -> tyco_variable, NULL, file);
}
}
static void PrintTypeContexts (TypeContext type_contexts, File file)
{
PrintTypeContext (type_contexts, file);
for (type_contexts = type_contexts -> tyco_next; type_contexts; type_contexts = type_contexts -> tyco_next)
{ FPutS (" & ", file);
PrintTypeContext (type_contexts, file);
}
}
void PrintTypeAlt (TypeAlts type_alts, File file, Bool with_equats)
{
......@@ -747,10 +722,6 @@ void PrintTypeAlt (TypeAlts type_alts, File file, Bool with_equats)
FPutS (" -> ", file);
PrintTypeNode (type_alts -> type_alt_rhs, file);
if (type_alts -> type_alt_type_context)
{ FPutS (" | ", file);
PrintTypeContexts (type_alts -> type_alt_type_context, file);
}
FPutC ('\n', file);
if (with_equats)
{ PrintTypeAttrEquations (type_alts -> type_alt_attr_equations, file);
......
......@@ -346,7 +346,7 @@ static void GenRecordState (SymbDef sdef)
oldsymbol = CurrentSymbol;
CurrentSymbol = lhs->ft_symbol;
CurrentLine = rectype->type_line;
CurrentLine = 0 /*rectype->type_line*/;
sdef->sdef_checkstatus = ConvertingToState; /* to detect cyclic strict field dependencies */
SetRecordState (&sdef->sdef_record_state, sdef, sdef->sdef_cons_arity);
......@@ -416,7 +416,7 @@ static void GenResultStatesOfLazyFields (SymbDef sdef)
rectype = sdef->sdef_type;
CurrentSymbol = rectype->type_lhs->ft_symbol;
CurrentLine = rectype->type_line;
CurrentLine = 0 /*rectype->type_line*/;
for (i=0, fields = rectype->type_fields; fields; i++, fields = fields->fl_next){
TypeNode field_type_node = fields->fl_type;
......@@ -439,7 +439,7 @@ static void ChangeFieldRecordStateForStrictAbsTypeFields (SymbDef icl_sdef,SymbD
icl_type = icl_sdef->sdef_type;
CurrentSymbol = icl_type->type_lhs->ft_symbol;
CurrentLine = icl_type->type_line;
CurrentLine = 0 /*icl_type->type_line*/;
icl_fieldstate_p=icl_sdef->sdef_record_state.state_record_arguments;
dcl_fieldstate_p=dcl_sdef->sdef_record_state.state_record_arguments;
......@@ -464,7 +464,7 @@ static void GenerateStatesForConstructors (SymbDef sdef)
{
ConstructorList constructor;
CurrentLine = sdef->sdef_type->type_line;
CurrentLine = 0 /*sdef->sdef_type->type_line*/;
for_l (constructor,sdef->sdef_type->type_constructors,cl_next){
int strict_constructor;
......@@ -522,7 +522,7 @@ static void ChangeElementStateForStrictAbsTypeFields (SymbDef icl_sdef,SymbDef d
Types icl_type = icl_sdef->sdef_type, dcl_type = dcl_sdef->sdef_type;
ConstructorList icl_cons, dcl_cons;
CurrentLine = icl_type->type_line;
CurrentLine = 0 /*icl_type->type_line*/;
for (icl_cons = icl_type->type_constructors, dcl_cons = dcl_type->type_constructors; dcl_cons;
icl_cons = icl_cons->cl_next, dcl_cons = dcl_cons->cl_next)
......@@ -647,7 +647,7 @@ static StateS DetermineStatesOfRuleType (TypeAlts ruletype,StateS *const functio
lhsroot = ruletype->type_alt_lhs;
CurrentSymbol = lhsroot ->type_node_symbol;
CurrentLine = ruletype->type_alt_line;
CurrentLine = 0 /*ruletype->type_alt_line*/;
if (lhsroot->type_node_annotation!=NoAnnot)
StaticMessage (False, "%S", Wrootannot, CurrentSymbol);
......
......@@ -30,11 +30,6 @@ typedef struct flat_type
AttributeKind ft_attribute;
} * FlatType;
STRUCT (type_context, TypeContext)
{
struct type_context * tyco_next;
};
typedef struct field_list
{
Symbol fl_symbol;
......@@ -56,7 +51,6 @@ typedef struct type
FlatType type_lhs;
ConstructorList type_constructors;
struct type * type_next;
unsigned type_line;
int type_nr_of_constructors; /* 0 for records */
} * Types;
......@@ -67,19 +61,10 @@ struct rule_type
{ TypeAlts rule_type_rule;
StateP rule_type_state_p;
TypeNode rule_type_root;
unsigned rule_type_line;
};
typedef struct syn_type SynType,*SynTypes;
struct syn_type
{ FlatType syn_lhs;
};
typedef struct abs_type
{ FlatType abs_graph;
struct abs_type * abs_next;
unsigned abs_line;
} *AbsTypes;
struct type_node
......@@ -127,15 +112,12 @@ typedef struct type_alt
TypeNode type_alt_lhs;
TypeNode type_alt_rhs;
UniVarEquations type_alt_attr_equations;
TypeContext type_alt_type_context;
unsigned type_alt_line;
StrictPositionsP type_alt_strict_positions;
} TypeAlt;
struct type_var
{
Ident tv_ident;
unsigned short tv_mark;
int tv_argument_nr;
};
......@@ -146,5 +128,4 @@ typedef struct uni_var
Ident uv_ident;
int uv_number;
struct uni_var * uv_next_uni_var;
UniVarEquations uv_equations;
} * UniVar;
......@@ -592,7 +592,6 @@ STRUCT (symbol_def,SymbDef){
union
{ Types u_type;
RuleTypes u_rule_type;
SynTypes u_syn_type;
AbsTypes u_abs_type;
ImpRules u_rule;
} sdef_u;
......@@ -641,7 +640,6 @@ STRUCT (symbol_def,SymbDef){
#define sdef_type sdef_u.u_type
#define sdef_rule_type sdef_u.u_rule_type
#define sdef_syn_type sdef_u.u_syn_type
#define sdef_abs_type sdef_u.u_abs_type
#define sdef_rule sdef_u.u_rule
......@@ -698,7 +696,6 @@ typedef struct {
Symbol im_name;
Symbol im_symbols;
Types im_types;
SynTypes im_syn_types;
ImpRules im_rules;
struct symbol_def * im_start;
Bool im_main;
......@@ -717,7 +714,6 @@ struct def_repr {
Symbol dm_name;
Symbol dm_symbols;
Types dm_types;
SynTypes dm_syn_types;
AbsTypes dm_abs_types;
RuleTypes dm_rules;
TableKind dm_system_module_table_kind;
......
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