aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backendC/CleanCompilerSources/backend.c11
-rw-r--r--backendC/CleanCompilerSources/buildtree.c1
-rw-r--r--backendC/CleanCompilerSources/syntax_tree_types.h8
-rw-r--r--backendC/CleanCompilerSources/syntaxtr.t43
-rw-r--r--backendC/CleanCompilerSources/tcsupport_2.c4
-rw-r--r--backendC/CleanCompilerSources/typeconv_2.c30
6 files changed, 11 insertions, 86 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c
index 17bb842..aec28af 100644
--- a/backendC/CleanCompilerSources/backend.c
+++ b/backendC/CleanCompilerSources/backend.c
@@ -2755,7 +2755,6 @@ BETypeVar (CleanString name)
typeVar = ConvertAllocType (struct type_var);
ident->ident_name = ConvertCleanString (name);
- ident->ident_tv = typeVar;
typeVar->tv_ident = ident;
typeVar->tv_mark = 0;
@@ -2797,19 +2796,11 @@ BEFlatTypeP
BEFlatType (BESymbolP symbol, BEAttribution attribution, BETypeVarListP arguments)
{
FlatType flatType;
- int i;
flatType = ConvertAllocType (struct flat_type);
flatType->ft_symbol = symbol;
flatType->ft_arguments = arguments;
- i = 0;
- for (; arguments != NULL; arguments=arguments->tvl_next)
- i++;
- flatType->ft_arity = i;
-
- flatType->ft_cons_vars = NULL; /* used in PrintType */
-
flatType->ft_attribute = (AttributeKind) attribution;;
return (flatType);
@@ -2864,9 +2855,7 @@ BERecordType (int moduleIndex, BEFlatTypeP lhs, BETypeNodeP constructorType, int
BEConstructorListP constructor;
type = ConvertAllocType (struct type);
- /* ifdef DEBUG */
type->type_next = NULL;
- /* endif */
constructor = ConvertAllocType (struct constructor_list);
diff --git a/backendC/CleanCompilerSources/buildtree.c b/backendC/CleanCompilerSources/buildtree.c
index b7e05cf..d224e15 100644
--- a/backendC/CleanCompilerSources/buildtree.c
+++ b/backendC/CleanCompilerSources/buildtree.c
@@ -358,7 +358,6 @@ NewSymbol (SymbKind symbolKind)
symbol = CompAllocType (SymbolS);
symbol->symb_kind = symbolKind;
- symbol->symb_infix = False;
return (symbol);
} /* NewSymbol */
diff --git a/backendC/CleanCompilerSources/syntax_tree_types.h b/backendC/CleanCompilerSources/syntax_tree_types.h
index 1847e00..17e9bcd 100644
--- a/backendC/CleanCompilerSources/syntax_tree_types.h
+++ b/backendC/CleanCompilerSources/syntax_tree_types.h
@@ -47,15 +47,7 @@ typedef struct flat_type
{
Symbol ft_symbol;
TypeVarList ft_arguments;
- TypeVarList ft_exist_quant_arguments;
-
- struct cons_var_list * ft_cons_vars;
- struct uni_var_admin * ft_attr_vars;
-
AttributeKind ft_attribute;
- int ft_arity;
- int ft_exist_arity;
-
} * FlatType;
typedef enum { SLK_Symbol, SLK_TreeOfLists, SLK_ListNumber } SymbolListKind;
diff --git a/backendC/CleanCompilerSources/syntaxtr.t b/backendC/CleanCompilerSources/syntaxtr.t
index f3e35f3..2a9680c 100644
--- a/backendC/CleanCompilerSources/syntaxtr.t
+++ b/backendC/CleanCompilerSources/syntaxtr.t
@@ -125,10 +125,7 @@ typedef union symb_value {
char * val_char;
char * val_string;
char * val_real;
- char * val_error_mess;
int val_arity;
- struct symbol_type * val_type; /* for cons_symb, nil_symb apply_symbol ? */
- struct symbol * val_symb; /* for field_symbol_list */
#if STRICT_LISTS
struct state * val_state_p; /* element state for unboxed list cons in lhs */
struct unboxed_cons * val_unboxed_cons_p; /* state and symbol definition for unboxed list cons in rhs */
@@ -145,16 +142,12 @@ struct unboxed_cons {
STRUCT (symbol,Symbol) {
SymbValue symb_val;
Symbol symb_next;
- unsigned symb_kind:8; /* SymbKind */
- Bool symb_infix:1;
- unsigned symb_infix_priority:4;
- unsigned symb_infix_assoc:2; /* Assoc */
+ unsigned symb_kind:8; /* SymbKind */
+ unsigned symb_head_strictness:4; /* 0=lazy,1=overloaded,2=strict,3=unboxed overloaded,4=unboxed*/
+ unsigned symb_tail_strictness:2; /* 0=lazy,1=strict */
};
#if STRICT_LISTS
-# define symb_head_strictness symb_infix_priority /* 0=lazy,1=overloaded,2=strict,3=unboxed overloaded,4=unboxed*/
-# define symb_tail_strictness symb_infix_assoc /* 0=lazy,1=strict */
-
# define symb_state_p symb_val.val_state_p
# define symb_unboxed_cons_p symb_val.val_unboxed_cons_p
# define symb_unboxed_cons_state_p symb_val.val_unboxed_cons_p->unboxed_cons_state_p
@@ -169,22 +162,12 @@ STRUCT (symbol,Symbol) {
#define symb_string symb_val.val_string
#define symb_real symb_val.val_real
#define symb_arity symb_val.val_arity
-#define symb_type symb_val.val_type
-#define symb_arrfun symb_val.val_arrfun
-#define symb_symb symb_val.val_symb
-#define symb_instance symb_val.val_instance
-
-#define symb_member symb_val.val_member
-#define symb_error_mess symb_val.val_error_mess
STRUCT(ident,Ident){
char * ident_name;
char * ident_environ;
union{
Symbol ident_u1_symbol;
- struct node_id * ident_u1_nodeid;
- struct type_var * ident_u1_tv;
- struct uni_var * ident_u1_uni_var;
char * ident_u1_instructions;
} ident_union1;
@@ -194,19 +177,9 @@ STRUCT(ident,Ident){
};
#define ident_symbol ident_union1.ident_u1_symbol
-#define ident_nodeid ident_union1.ident_u1_nodeid
-#define ident_tv ident_union1.ident_u1_tv
-#define ident_uni_var ident_union1.ident_u1_uni_var
#define ident_instructions ident_union1.ident_u1_instructions
-#define IMPORT_MASK 1
-#define IMPORTED_MASK 2
-#define BOUND_MASK 4
#define INLINE_MASK 8
-#define IMPLICITLY_IMPORTED_MASK 16
-#define ID_UNIVAR_MASK (1 << 5)
-#define ID_TYPEVAR_MASK (1 << 6)
-#define ID_CLASSVAR_MASK (1 << 7)
/*
The order in which the annotationkinds appear in the enum type
@@ -222,8 +195,6 @@ typedef enum {
ParallelNFAnnot, InterleavedNFAnnot
} Annotation;
-typedef enum { AssocNone=0, AssocLeft=1, AssocRight=2 } Assoc;
-
typedef struct ident_string *IdentStringP;
struct ident_string {
@@ -233,14 +204,6 @@ struct ident_string {
char *string;
};
-typedef struct symb_list SymbElem,*SymbList;
-
-struct symb_list {
- IdentStringP slist_ident_string;
- SymbList slist_next;
- unsigned slist_line;
-};
-
typedef struct def_repr DefRepr,*DefMod;
typedef struct node_def *NodeDefs;
diff --git a/backendC/CleanCompilerSources/tcsupport_2.c b/backendC/CleanCompilerSources/tcsupport_2.c
index 9556961..96d3e21 100644
--- a/backendC/CleanCompilerSources/tcsupport_2.c
+++ b/backendC/CleanCompilerSources/tcsupport_2.c
@@ -35,7 +35,7 @@ BITVECT DetermineConsVarsOfTypeCons (SymbDef typecons, ConsVarList * cons_vars)
{
if (typecons -> sdef_kind == TYPE || typecons -> sdef_kind == RECORDTYPE)
{ if (typecons -> sdef_type)
- { * cons_vars = typecons -> sdef_type -> type_lhs -> ft_cons_vars;
+ { * cons_vars = NULL;
return typecons -> sdef_type -> type_consvars;
}
else
@@ -44,7 +44,7 @@ BITVECT DetermineConsVarsOfTypeCons (SymbDef typecons, ConsVarList * cons_vars)
}
}
else if (typecons -> sdef_kind == TYPESYN)
- { * cons_vars = typecons -> sdef_syn_type -> syn_lhs -> ft_cons_vars ;
+ { * cons_vars = NULL;
return typecons -> sdef_syn_type -> syn_consvars;
}
else
diff --git a/backendC/CleanCompilerSources/typeconv_2.c b/backendC/CleanCompilerSources/typeconv_2.c
index c28ff50..de8859b 100644
--- a/backendC/CleanCompilerSources/typeconv_2.c
+++ b/backendC/CleanCompilerSources/typeconv_2.c
@@ -360,38 +360,22 @@ static void PrintArgument (TypeArgs arg, Bool brackets, Bool strict_context, Boo
static void PrintArguments (TypeArgs args, char separator, Bool brackets, Bool strict_context, FlatType form_type)
{
if (args)
- { int arg_nr, nr_of_exi_vars;
+ { int arg_nr;
TypeVarList form_type_vars;
if (form_type != NULL)
- { nr_of_exi_vars = form_type -> ft_exist_arity;
- form_type_vars = form_type -> ft_arguments;
+ { form_type_vars = form_type -> ft_arguments;
- if (nr_of_exi_vars > 0)
- { FPutC (':', StdListTypes);
- PrintArgument (args, cPrintBrackets, strict_context, cDoPrintAttribute);
- }
- else
- { PrintArgument (args, brackets, strict_context, ! TestMark (form_type_vars -> tvl_elem, tv_mark, TV_EXISTENTIAL_ATTRIBUTE_MASK));
- form_type_vars = form_type_vars -> tvl_next;
- }
+ PrintArgument (args, brackets, strict_context, ! TestMark (form_type_vars -> tvl_elem, tv_mark, TV_EXISTENTIAL_ATTRIBUTE_MASK));
+ form_type_vars = form_type_vars -> tvl_next;
}
else
- { nr_of_exi_vars = 0;
- form_type_vars = NULL;
+ { form_type_vars = NULL;
PrintArgument (args, brackets, strict_context, cDoPrintAttribute);
}
for (arg_nr = 1, args = args -> type_arg_next; args; args = args -> type_arg_next, arg_nr++)
- { if (arg_nr == nr_of_exi_vars)
- FPutS (": ", StdListTypes);
- else if (arg_nr < nr_of_exi_vars)
- { FPutC (',', StdListTypes);
- PrintArgument (args, brackets, strict_context, cDoPrintAttribute);
- continue;
- }
- else
- FPutC (separator, StdListTypes);
+ { FPutC (separator, StdListTypes);
if (form_type_vars != NULL)
{ PrintArgument (args, brackets, strict_context, ! TestMark (form_type_vars -> tvl_elem, tv_mark, TV_EXISTENTIAL_ATTRIBUTE_MASK));
@@ -400,8 +384,6 @@ static void PrintArguments (TypeArgs args, char separator, Bool brackets, Bool s
else
PrintArgument (args, brackets, strict_context, cDoPrintAttribute);
}
- if (arg_nr == nr_of_exi_vars)
- FPutC (':', StdListTypes);
}
} /* PrintArguments */