Commit dbe3bdaa authored by John van Groningen's avatar John van Groningen
Browse files

add BEExtendableAlgebraicType

parent b0278ec1
......@@ -2854,6 +2854,26 @@ BEAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors)
sdef->sdef_type = type;
} /* BEAlgebraicType */
void BEExtendableAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors)
{
Types type;
SymbDefP sdef;
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;
for (; constructors!=NULL; constructors=constructors->cl_next)
constructors->cl_constructor->type_node_symbol->symb_def->sdef_type = type;
sdef = type->type_lhs->ft_symbol->symb_def;
sdef->sdef_kind = TYPE;
sdef->sdef_type = type;
}
void
BERecordType (int moduleIndex, BEFlatTypeP lhs, BETypeNodeP constructorType, int is_boxed_record, BEFieldListP fields)
{
......
......@@ -442,6 +442,9 @@ Clean (BEFlatType :: BESymbolP BEAttribution BETypeVarListP BackEnd -> (BEFlatTy
void BEAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors);
Clean (BEAlgebraicType:: BEFlatTypeP BEConstructorListP BackEnd -> BackEnd)
void BEExtendableAlgebraicType (BEFlatTypeP lhs, BEConstructorListP constructors);
Clean (BEExtendableAlgebraicType:: BEFlatTypeP BEConstructorListP BackEnd -> BackEnd)
void BERecordType (int moduleIndex, BEFlatTypeP lhs, BETypeNodeP constructorType, int is_boxed_record, BEFieldListP fields);
Clean (BERecordType :: Int BEFlatTypeP BETypeNodeP Int BEFieldListP BackEnd -> BackEnd)
......
......@@ -86,6 +86,7 @@
/EXPORT: BENoTypes
/EXPORT: BEFlatType
/EXPORT: BEAlgebraicType
/EXPORT: BEExtendableAlgebraicType
/EXPORT: BERecordType
/EXPORT: BEAbsType
/EXPORT: BEConstructors
......
......@@ -84,6 +84,7 @@
/EXPORT:BENoTypes
/EXPORT:BEFlatType
/EXPORT:BEAlgebraicType
/EXPORT:BEExtendableAlgebraicType
/EXPORT:BERecordType
/EXPORT:BEAbsType
/EXPORT:BEConstructors
......
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