Commit f678810e authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

remove type variable names in the backend, because they are not used: replace...

remove type variable names in the backend, because they are not used: replace contents_tv by contents_tv_argument_n, remove struct type_var, replace functions BEVarTypeNode and BENumberedVarTypeNode by BETypeVar0TypeNode and BETypeVarNTypeNode (without type variable name), remove functions BETypeVar, BENumberedTypeVar and NewTypeVar
parent c36ba31a
......@@ -28,7 +28,8 @@ BEOverloadedPushNode
BEPredefineConstructorSymbol
BEPredefineTypeSymbol
BEBasicSymbol
BEVarTypeNode
BETypeVar0TypeNode
BETypeVarNTypeNode
BENormalTypeNode
BEAnnotateTypeNode
BEAttributeTypeNode
......@@ -83,7 +84,6 @@ BEField
BEFields
BENoFields
BEDeclareConstructor
BETypeVar
BEDeclareType
BEDeclareFunction
BECodeAlt
......
......@@ -28,8 +28,8 @@ BEOverloadedPushNode
BEPredefineConstructorSymbol
BEPredefineTypeSymbol
BEBasicSymbol
BEVarTypeNode
BENumberedVarTypeNode
BETypeVar0TypeNode
BETypeVarNTypeNode
BENormalTypeNode
BEAnnotateTypeNode
BEAttributeTypeNode
......@@ -88,8 +88,6 @@ BESetInstanceFunctionOfFunction
BEFields
BENoFields
BEDeclareConstructor
BETypeVar
BENumberedTypeVar
BEDeclareType
BEDeclareFunction
BECodeAlt
......
......@@ -12,7 +12,6 @@ definition module backend;
:: BERuleAltP (:== CPtr);
:: BEImpRuleP (:== CPtr);
:: BEFlatTypeP (:== CPtr);
:: BETypeVarP (:== CPtr);
:: BEConstructorListP (:== CPtr);
:: BEFieldListP (:== CPtr);
:: BENodeIdP (:== CPtr);
......@@ -89,10 +88,10 @@ BEPredefineTypeSymbol :: !Int !Int !Int !BESymbKind !BackEnd -> BackEnd;
// void BEPredefineTypeSymbol (int arity,int typeIndex,int moduleIndex,BESymbKind symbolKind);
BEBasicSymbol :: !Int !BackEnd -> (!BESymbolP,!BackEnd);
// BESymbolP BEBasicSymbol (BESymbKind kind);
BEVarTypeNode :: !String !BackEnd -> (!BETypeNodeP,!BackEnd);
// BETypeNodeP BEVarTypeNode (CleanString name);
BENumberedVarTypeNode :: !String !Int !BackEnd -> (!BETypeNodeP,!BackEnd);
// BETypeNodeP BENumberedVarTypeNode (CleanString name,int argument_n);
BETypeVar0TypeNode :: !BackEnd -> (!BETypeNodeP,!BackEnd);
// BETypeNodeP BETypeVar0TypeNode ();
BETypeVarNTypeNode :: !Int !BackEnd -> (!BETypeNodeP,!BackEnd);
// BETypeNodeP BETypeVarNTypeNode (int argument_n);
BENormalTypeNode :: !BESymbolP !BETypeArgP !BackEnd -> (!BETypeNodeP,!BackEnd);
// BETypeNodeP BENormalTypeNode (BESymbolP symbol,BETypeArgP args);
BEAnnotateTypeNode :: !BEAnnotation !BETypeNodeP !BackEnd -> (!BETypeNodeP,!BackEnd);
......@@ -211,10 +210,6 @@ BENoFields :: !BackEnd -> (!BEFieldListP,!BackEnd);
// BEFieldListP BENoFields ();
BEDeclareConstructor :: !Int !Int !String !BackEnd -> BackEnd;
// void BEDeclareConstructor (int constructorIndex,int moduleIndex,CleanString name);
BETypeVar :: !String !BackEnd -> (!BETypeVarP,!BackEnd);
// BETypeVarP BETypeVar (CleanString name);
BENumberedTypeVar :: !String !Int !BackEnd -> (!BETypeVarP,!BackEnd);
// BETypeVarP BENumberedTypeVar (CleanString name,int argument_n);
BEDeclareType :: !Int !Int !String !BackEnd -> BackEnd;
// void BEDeclareType (int typeIndex,int moduleIndex,CleanString name);
BEDeclareFunction :: !String !Int !Int !Int !BackEnd -> BackEnd;
......
......@@ -12,8 +12,6 @@ implementation module backend;
:: BERuleAltP :== CPtr;
:: BEImpRuleP :== CPtr;
:: BEFlatTypeP :== CPtr;
:: BETypeVarP :== CPtr;
:: BETypeVarListP :== CPtr;
:: BEConstructorListP :== CPtr;
:: BEFieldListP :== CPtr;
:: BENodeIdP :== CPtr;
......@@ -213,17 +211,17 @@ BEBasicSymbol a0 a1 = code {
}
// BESymbolP BEBasicSymbol (BESymbKind kind);
BEVarTypeNode :: !String !BackEnd -> (!BETypeNodeP,!BackEnd);
BEVarTypeNode a0 a1 = code {
ccall BEVarTypeNode "S:p:p"
BETypeVar0TypeNode :: !BackEnd -> (!BETypeNodeP,!BackEnd);
BETypeVar0TypeNode a0 = code {
ccall BETypeVar0TypeNode ":p:p"
}
// BETypeNodeP BEVarTypeNode (CleanString name);
// BETypeNodeP BETypeVar0TypeNode ();
BENumberedVarTypeNode :: !String !Int !BackEnd -> (!BETypeNodeP,!BackEnd);
BENumberedVarTypeNode a0 a1 a2 = code {
ccall BENumberedVarTypeNode "SI:p:p"
BETypeVarNTypeNode :: !Int !BackEnd -> (!BETypeNodeP,!BackEnd);
BETypeVarNTypeNode a0 a1 = code {
ccall BETypeVarNTypeNode "I:p:p"
}
// BETypeNodeP BENumberedVarTypeNode (CleanString name,int argument_n);
// BETypeNodeP BETypeVarNTypeNode (int argument_n);
BENormalTypeNode :: !BESymbolP !BETypeArgP !BackEnd -> (!BETypeNodeP,!BackEnd);
BENormalTypeNode a0 a1 a2 = code {
......@@ -579,18 +577,6 @@ BEDeclareConstructor a0 a1 a2 a3 = code {
}
// void BEDeclareConstructor (int constructorIndex,int moduleIndex,CleanString name);
BETypeVar :: !String !BackEnd -> (!BETypeVarP,!BackEnd);
BETypeVar a0 a1 = code {
ccall BETypeVar "S:p:p"
}
// BETypeVarP BETypeVar (CleanString name);
BENumberedTypeVar :: !String !Int !BackEnd -> (!BETypeVarP,!BackEnd);
BENumberedTypeVar a0 a1 a2 = code {
ccall BENumberedTypeVar "SI:p:p"
}
// BETypeVarP BENumberedTypeVar (CleanString name,int argument_n);
BEDeclareType :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareType a0 a1 a2 a3 = code {
ccall BEDeclareType "IIS:V:p"
......
......@@ -226,8 +226,8 @@ beUpdateNode
:== beFunction1 BEUpdateNode
beNormalTypeNode
:== beFunction2 BENormalTypeNode
beVarTypeNode name
:== beFunction0 (BEVarTypeNode name)
beTypeVar0TypeNode
:== beFunction0 BETypeVar0TypeNode
beRuleAlt lineNumber
:== beFunction5 (BERuleAlt lineNumber)
beTypeAlt
......@@ -284,8 +284,6 @@ beDeclareNodeId number lhsOrRhs name
:== beApFunction0 (BEDeclareNodeId number lhsOrRhs name)
beAdjustArrayFunction backendId functionIndex moduleIndex
:== beApFunction0 (BEAdjustArrayFunction backendId functionIndex moduleIndex)
beTypeVar name
:== beFunction0 (BETypeVar name)
beExportType isDictionary typeIndex
:== beApFunction0 (BEExportType isDictionary typeIndex)
beExportConstructor constructorIndex
......@@ -1526,14 +1524,14 @@ convertTypeNode (TA typeSymbolIdent typeArgs)
= beNormalTypeNode (convertTypeSymbolIdent typeSymbolIdent) (convertTypeArgs typeArgs )
convertTypeNode (TAS typeSymbolIdent typeArgs strictness)
= beNormalTypeNode (convertTypeSymbolIdent typeSymbolIdent) (convertAnnotatedTypeArgs typeArgs strictness)
convertTypeNode (TV {tv_ident})
= beVarTypeNode tv_ident.id_name
convertTypeNode (TempV n)
= beVarTypeNode ("_tv" +++ toString n)
convertTypeNode (TempQV n)
= beVarTypeNode ("_tqv" +++ toString n)
convertTypeNode (TempQDV n)
= beVarTypeNode ("_tqv" +++ toString n)
convertTypeNode (TV _)
= beTypeVar0TypeNode
convertTypeNode (TempV _)
= beTypeVar0TypeNode
convertTypeNode (TempQV _)
= beTypeVar0TypeNode
convertTypeNode (TempQDV _)
= beTypeVar0TypeNode
convertTypeNode (a --> b)
= beNormalTypeNode (beBasicSymbol BEFunType) (convertTypeArgs [a, b])
convertTypeNode (TArrow1 a)
......@@ -1588,23 +1586,23 @@ convertTypeDefTypeNode (TAS typeSymbolIdent typeArgs strictness) type_var_heap b
(type_arg_p,type_var_heap,bes) = convertTypeDefAnnotatedTypeArgs typeArgs strictness type_var_heap bes
(type_node_p,bes) = accBackEnd (BENormalTypeNode symbol_p type_arg_p) bes
= (type_node_p,type_var_heap,bes)
convertTypeDefTypeNode (TV {tv_ident,tv_info_ptr}) type_var_heap bes
convertTypeDefTypeNode (TV {tv_info_ptr}) type_var_heap bes
#! argument_n
= case sreadPtr tv_info_ptr type_var_heap of
TVI_TypeVarArgN type_var_arg_n
-> type_var_arg_n
_
-> -1
# (type_node_p,bes) = accBackEnd (BENumberedVarTypeNode tv_ident.id_name argument_n) bes
# (type_node_p,bes) = accBackEnd (BETypeVarNTypeNode argument_n) bes
= (type_node_p,type_var_heap,bes)
convertTypeDefTypeNode (TempV n) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BENumberedVarTypeNode ("_tv" +++ toString n) -1) bes
convertTypeDefTypeNode (TempV _) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BETypeVarNTypeNode -1) bes
= (type_node_p,type_var_heap,bes)
convertTypeDefTypeNode (TempQV n) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BENumberedVarTypeNode ("_tqv" +++ toString n) -1) bes
convertTypeDefTypeNode (TempQV _) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BETypeVarNTypeNode -1) bes
= (type_node_p,type_var_heap,bes)
convertTypeDefTypeNode (TempQDV n) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BENumberedVarTypeNode ("_tqv" +++ toString n) -1) bes
convertTypeDefTypeNode (TempQDV _) type_var_heap bes
# (type_node_p,bes) = accBackEnd (BETypeVarNTypeNode -1) bes
= (type_node_p,type_var_heap,bes)
convertTypeDefTypeNode (a --> b) type_var_heap bes
# (symbol_p,bes) = accBackEnd (BEBasicSymbol BEFunType) bes
......
......@@ -82,7 +82,8 @@ BEField
BEFields
BENoFields
BEDeclareConstructor
BETypeVar
BETypeVar0TypeNode
BETypeVarNTypeNode
BEDeclareType
BEDeclareFunction
BECodeAlt
......
......@@ -696,10 +696,9 @@ BESpecialArrayFunctionSymbol (BEArrayFunKind arrayFunKind, int functionIndex, in
break;
case BE_UnqArraySelectLastFun:
{
struct clean_string rName = {1, 'r'};
TypeNode rType;
rType = BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&rName));
rType = BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode());
rhs = BENormalTypeNode (gBasicSymbols [tuple_type],
BETypeArgs (elementType, BETypeArgs (rType, NULL)));
lhsArgs = BETypeArgs (
......@@ -711,10 +710,9 @@ BESpecialArrayFunctionSymbol (BEArrayFunKind arrayFunKind, int functionIndex, in
}
case BE_ArrayUpdateFun:
{
struct clean_string rName = {1, 'r'};
TypeNode rType;
rType = BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&rName));
rType = BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode());
rhs = rType;
lhsArgs = BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BENormalTypeNode (gBasicSymbols [tuple_type],
......@@ -837,7 +835,6 @@ CreateDictionarySelectFunSymbol (void)
{
TypeNode rhsType;
TypeArgs lhsArgs;
struct clean_string aName = {1, 'a'};
/* selectl :: !((a e) Int -> e) !(!a e, !r) !Int -> (e, !r) */
/* select _ _ _ = code */
......@@ -865,19 +862,19 @@ CreateDictionarySelectFunSymbol (void)
/* actual type simplified to !a !(!a,!a) !Int -> (a,!a) */
lhsArgs = BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BENormalTypeNode (gBasicSymbols [tuple_type],
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
NULL)))),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BENormalTypeNode (gBasicSymbols [int_type], NULL)),
NULL)));
rhsType = BENormalTypeNode (gBasicSymbols [tuple_type],
BETypeArgs (BEVarTypeNode (&aName), BETypeArgs (BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)), NULL)));
BETypeArgs (BETypeVar0TypeNode(), BETypeArgs (BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()), NULL)));
return (CreateLocallyDefinedFunction (kDictionarySelect, abcCode, lhsArgs, rhsType));
} /* CreateDictionarySelectFunSymbol */
......@@ -887,7 +884,6 @@ CreateDictionaryUpdateFunSymbol (void)
{
TypeNode rhsType;
TypeArgs lhsArgs;
struct clean_string aName = {1, 'a'};
/* updatei :: !(*(a .e) -> *(!Int -> *(.e -> .(a .e)))) !(!*(a .e), !*r) !Int .e -> *r // !(!.(a .e), !*r) */
/* updatei _ _ _ _ = code */
......@@ -909,21 +905,21 @@ CreateDictionaryUpdateFunSymbol (void)
/* actual type simplified to !a !(!a,!a) !Int a -> a */
lhsArgs = BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BENormalTypeNode (gBasicSymbols [tuple_type],
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BEVarTypeNode (&aName)),
BEAnnotateTypeNode (StrictAnnot, BETypeVar0TypeNode()),
NULL)))),
BETypeArgs (
BEAnnotateTypeNode (StrictAnnot, BENormalTypeNode (gBasicSymbols [int_type], NULL)),
BETypeArgs (
BEVarTypeNode (&aName),
BETypeVar0TypeNode(),
NULL))));
rhsType = BEVarTypeNode (&aName);
rhsType = BETypeVar0TypeNode();
return (CreateLocallyDefinedFunction (kDictionaryUpdate, abcCode, lhsArgs, rhsType));
} /* CreateDictionaryUpdateFunSymbol */
......@@ -1355,30 +1351,30 @@ BEBasicSymbol (BESymbKind kind)
} /* BEBasicSymbol */
BETypeNodeP
BEVarTypeNode (CleanString name)
BETypeVar0TypeNode (void)
{
TypeNode node;
TypeNode node;
node = ConvertAllocType (struct type_node);
node = ConvertAllocType (struct type_node);
node->type_node_is_var = True;
node->type_node_tv = BETypeVar (name);
node->type_node_tv_argument_n = 0;
node->type_node_arity = 0;
node->type_node_annotation = NoAnnot;
node->type_node_attribute = NoUniAttr;
return (node);
} /* BEVarTypeNode */
return node;
}
BETypeNodeP
BENumberedVarTypeNode (CleanString name,int argument_n)
BETypeVarNTypeNode (int argument_n)
{
TypeNode node;
TypeNode node;
node = ConvertAllocType (struct type_node);
node = ConvertAllocType (struct type_node);
node->type_node_is_var = True;
node->type_node_tv = BENumberedTypeVar (name,argument_n);
node->type_node_tv_argument_n = argument_n;
node->type_node_arity = 0;
node->type_node_annotation = NoAnnot;
node->type_node_attribute = NoUniAttr;
......@@ -2641,38 +2637,6 @@ BEDeclareType (int typeIndex, int moduleIndex, CleanString name)
types [typeIndex]->symb_kind = definition;
types [typeIndex]->symb_def = newSymbDef;
} /* BEDeclareType */
BETypeVarP
BETypeVar (CleanString name)
{
IdentP ident;
TypeVar typeVar;
ident = ConvertAllocType (IdentS);
typeVar = ConvertAllocType (struct type_var);
ident->ident_name = ConvertCleanString (name);
typeVar->tv_argument_nr = 0; /* ??? */
return (typeVar);
} /* BETypeVar */
BETypeVarP
BENumberedTypeVar (CleanString name,int argument_n)
{
IdentP ident;
TypeVar typeVar;
ident = ConvertAllocType (IdentS);
typeVar = ConvertAllocType (struct type_var);
ident->ident_name = ConvertCleanString (name);
typeVar->tv_argument_nr = argument_n;
return typeVar;
}
BEFlatTypeP
BEFlatType (BESymbolP symbol, BEAttribution attribution)
......
......@@ -57,9 +57,6 @@ Clean (:: BEImpRuleP (:== CPtr))
typedef struct flat_type *BEFlatTypeP;
Clean (:: BEFlatTypeP (:== CPtr))
typedef struct type_var *BETypeVarP;
Clean (:: BETypeVarP (:== CPtr))
typedef struct constructor_list *BEConstructorListP;
Clean (:: BEConstructorListP (:== CPtr))
......@@ -252,11 +249,11 @@ Clean (BEPredefineTypeSymbol :: Int Int Int BESymbKind BackEnd -> BackEnd)
BESymbolP BEBasicSymbol (BESymbKind kind);
Clean (BEBasicSymbol :: Int BackEnd -> (BESymbolP, BackEnd))
BETypeNodeP BEVarTypeNode (CleanString name);
Clean (BEVarTypeNode :: String BackEnd -> (BETypeNodeP, BackEnd))
BETypeNodeP BETypeVar0TypeNode ();
Clean (BETypeVar0TypeNode :: BackEnd -> (BETypeNodeP, BackEnd))
BETypeNodeP BENumberedVarTypeNode (CleanString name,int argument_n);
Clean (BENumberedVarTypeNode :: String Int BackEnd -> (BETypeNodeP, BackEnd))
BETypeNodeP BETypeVarNTypeNode (int argument_n);
Clean (BETypeVarNTypeNode :: Int BackEnd -> (BETypeNodeP, BackEnd))
BETypeNodeP BENormalTypeNode (BESymbolP symbol, BETypeArgP args);
Clean (BENormalTypeNode :: BESymbolP BETypeArgP BackEnd -> (BETypeNodeP, BackEnd))
......@@ -439,12 +436,6 @@ Clean (BENoFields:: BackEnd -> (BEFieldListP, BackEnd))
void BEDeclareConstructor (int constructorIndex, int moduleIndex, CleanString name);
Clean (BEDeclareConstructor:: Int Int String BackEnd -> BackEnd)
BETypeVarP BETypeVar (CleanString name);
Clean (BETypeVar:: String BackEnd -> (BETypeVarP, BackEnd))
BETypeVarP BENumberedTypeVar (CleanString name,int argument_n);
Clean (BENumberedTypeVar :: String Int BackEnd -> (BETypeVarP,BackEnd))
void BEDeclareType (int typeIndex, int moduleIndex, CleanString name);
Clean (BEDeclareType:: Int Int String BackEnd -> BackEnd)
......
......@@ -102,18 +102,6 @@ NewStrictNodeId (NodeId nodeId, StrictNodeIdP next)
return (strictNodeId);
} /* NewStrictNodeId */
TypeVar
NewTypeVar (IdentP nid)
{
TypeVar newnid;
newnid = CompAllocType (struct type_var);
newnid->tv_argument_nr = 0;
return (newnid);
}
NodeP
NewNodeIdNode (NodeIdP node_id)
{
......
......@@ -47,7 +47,6 @@ extern NodeP NewIntNode (int value);
extern NodeIdP NewNodeId (IdentP nid);
extern StrictNodeIdP NewStrictNodeId (NodeIdP node_id, StrictNodeIdP next);
extern TypeVar NewTypeVar (IdentP nid);
extern NodeDefs NewNodeDefinition (NodeIdP nid, NodeP node);
extern SymbolP NewSymbol (SymbKind symbolKind);
extern TypeNode NewTypeNode (Annotation annot, AttributeKind attr, SymbolP symb, TypeArgs args, int arity);
......
......@@ -621,7 +621,7 @@ void PrintTypeNode (TypeNode node, File file)
}
if (node->type_node_is_var)
FPrintF (file, "%d:", node->type_node_tv->tv_argument_nr);
FPrintF (file, "%d:", node->type_node_tv_argument_n);
else if (node->type_node_symbol->symb_kind == tuple_type)
{ FPutC ('(', file);
PrintTypeArguments (node->type_node_arguments, ',', file);
......
......@@ -679,8 +679,8 @@ static void determine_unique_state_of_constructor_argument (StateP result_state_
{
if (type_arg_node->type_node_is_var){
if ((type_state_p->state_mark & STATE_UNIQUE_TYPE_ARGUMENTS_MASK) &&
type_arg_node->type_node_tv->tv_argument_nr>=0 &&
(type_state_p->state_unq_type_args & (1<<(type_arg_node->type_node_tv->tv_argument_nr))))
type_arg_node->type_node_tv_argument_n>=0 &&
(type_state_p->state_unq_type_args & (1<<(type_arg_node->type_node_tv_argument_n))))
{
result_state_p->state_mark |= STATE_UNIQUE_MASK;
}
......@@ -711,8 +711,8 @@ static void determine_unique_state_of_constructor_argument (StateP result_state_
type_arg_node_p=type_arg->type_arg_node;
if (type_arg_node_p->type_node_is_var){
if ((type_state_p->state_mark & STATE_UNIQUE_TYPE_ARGUMENTS_MASK) &&
type_arg_node_p->type_node_tv->tv_argument_nr>=0 &&
(type_state_p->state_unq_type_args & (1<<(type_arg_node_p->type_node_tv->tv_argument_nr))))
type_arg_node_p->type_node_tv_argument_n>=0 &&
(type_state_p->state_unq_type_args & (1<<(type_arg_node_p->type_node_tv_argument_n))))
{
unq_type_args |= 1<<i;
}
......@@ -739,8 +739,8 @@ static StateP determine_unique_state_of_constructor_argument
{
if (type_arg_node->type_node_is_var){
if ((constructor_state_p->state_mark & STATE_UNIQUE_TYPE_ARGUMENTS_MASK) &&
type_arg_node->type_node_tv->tv_argument_nr>=0 &&
(constructor_state_p->state_unq_type_args & (1<<(type_arg_node->type_node_tv->tv_argument_nr))) &&
type_arg_node->type_node_tv_argument_n>=0 &&
(constructor_state_p->state_unq_type_args & (1<<(type_arg_node->type_node_tv_argument_n))) &&
(type_state_p->state_mark & STATE_UNIQUE_MASK)==0)
{
StateP result_state_p;
......@@ -786,8 +786,8 @@ static StateP determine_unique_state_of_constructor_argument
type_arg_node_p=type_arg->type_arg_node;
if (type_arg_node_p->type_node_is_var){
if ((constructor_state_p->state_mark & STATE_UNIQUE_TYPE_ARGUMENTS_MASK) &&
type_arg_node_p->type_node_tv->tv_argument_nr>=0 &&
(constructor_state_p->state_unq_type_args & (1<<(type_arg_node_p->type_node_tv->tv_argument_nr))))
type_arg_node_p->type_node_tv_argument_n>=0 &&
(constructor_state_p->state_unq_type_args & (1<<(type_arg_node_p->type_node_tv_argument_n))))
{
unq_type_args |= 1<<i;
}
......
......@@ -59,8 +59,8 @@ typedef struct abs_type
struct type_node
{
union
{ TypeVar contents_tv;
union {
int contents_tv_argument_n;
Symbol contents_symbol;
} type_node_contents;
......@@ -72,7 +72,7 @@ struct type_node
};
#define type_node_symbol type_node_contents.contents_symbol
#define type_node_tv type_node_contents.contents_tv
#define type_node_tv_argument_n type_node_contents.contents_tv_argument_n
struct type_arg
{ TypeNode type_arg_node;
......@@ -91,8 +91,3 @@ typedef struct type_alt
TypeNode type_alt_rhs;
StrictPositionsP type_alt_strict_positions;
} TypeAlt;
struct type_var
{
int tv_argument_nr;
};
......@@ -29,8 +29,8 @@ EXPORTS
BEPredefineConstructorSymbol
BEPredefineTypeSymbol
BEBasicSymbol
BEVarTypeNode
BENumberedVarTypeNode
BETypeVar0TypeNode
BETypeVarNTypeNode
BENormalTypeNode
BEAnnotateTypeNode
BEAttributeTypeNode
......@@ -90,8 +90,6 @@ EXPORTS
BEFields
BENoFields
BEDeclareConstructor
BETypeVar
BENumberedTypeVar
BEDeclareType
BEDeclareFunction
BEStartFunction
......
......@@ -28,8 +28,8 @@
/EXPORT: BEPredefineConstructorSymbol
/EXPORT: BEPredefineTypeSymbol
/EXPORT: BEBasicSymbol
/EXPORT: BEVarTypeNode
/EXPORT: BENumberedVarTypeNode
/EXPORT: BETypeVar0TypeNode
/EXPORT: BETypeVarNTypeNode
/EXPORT: BENormalTypeNode
/EXPORT: BEAnnotateTypeNode
/EXPORT: BEAttributeTypeNode
......@@ -89,8 +89,6 @@
/EXPORT: BEFields
/EXPORT: BENoFields
/EXPORT: BEDeclareConstructor
/EXPORT: BETypeVar
/EXPORT: BENumberedTypeVar
/EXPORT: BEDeclareType
/EXPORT: BEDeclareFunction
/EXPORT: BEStartFunction
......
......@@ -27,8 +27,8 @@
/EXPORT:BEPredefineConstructorSymbol
/EXPORT:BEPredefineTypeSymbol
/EXPORT:BEBasicSymbol
/EXPORT:BEVarTypeNode
/EXPORT:BENumberedVarTypeNode
/EXPORT:BETypeVar0TypeNode
/EXPORT:BETypeVarNTypeNode
/EXPORT:BENormalTypeNode
/EXPORT:BEAnnotateTypeNode
/EXPORT:BEAttributeTypeNode
......@@ -87,8 +87,6 @@
/EXPORT:BEFields
/EXPORT:BENoFields
/EXPORT:BEDeclareConstructor
/EXPORT:BETypeVar
/EXPORT:BENumberedTypeVar
/EXPORT:BEDeclareType
/EXPORT:BEDeclareFunction
/EXPORT:BECodeAlt
......
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