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

replace BENodeDef and BENodeDefs by BENodeDefList, replace BEStrictNodeId and...

replace BENodeDef and BENodeDefs by BENodeDefList, replace BEStrictNodeId and BEStrictNodeIds by BEStrictNodeIdList, replace BEConstructor and BEConstructors by BEConstructorList, replace BEField and BEFields by BEFieldList, replace BEString and BEStrings by BEStringList, replace BECodeParameter and BECodeParameters by BECodeParameterList, replace BENodeIdListElem and BENodeIds by BENodeIdList
parent 5723e084
......@@ -58,12 +58,10 @@ BERuleAlt
BEDeclareNodeId
BENodeId
BEWildCardNodeId
BENodeDef
BENodeDefList
BENoNodeDefs
BENodeDefs
BEStrictNodeId
BEStrictNodeIdList
BENoStrictNodeIds
BEStrictNodeIds
BERule
BEDeclareRuleType
BEDefineRuleType
......@@ -74,25 +72,20 @@ BEFlatType
BEAlgebraicType
BERecordType
BEAbsType
BEConstructors
BEConstructorList
BENoConstructors
BEConstructor
BEDeclareField
BEField
BEFields
BEFieldList
BENoFields
BEDeclareConstructor
BEDeclareType
BEDeclareFunction
BECodeAlt
BEString
BEStrings
BEStringList
BENoStrings
BECodeParameter
BECodeParameters
BECodeParameterList
BENoCodeParameters
BENodeIdListElem
BENodeIds
BENodeIdList
BENoNodeIds
BEAbcCodeBlock
BEAnyCodeBlock
......
......@@ -58,12 +58,10 @@ BERuleAlt
BEDeclareNodeId
BENodeId
BEWildCardNodeId
BENodeDef
BENodeDefList
BENoNodeDefs
BENodeDefs
BEStrictNodeId
BEStrictNodeIdList
BENoStrictNodeIds
BEStrictNodeIds
BERule
BEDeclareRuleType
BEDefineRuleType
......@@ -75,28 +73,23 @@ BEAlgebraicType
BEExtendableAlgebraicType
BERecordType
BEAbsType
BEConstructors
BEConstructorList
BENoConstructors
BEConstructor
BEDeclareField
BEField
BEFieldList
BESetMemberTypeOfField
BESetDictionaryFieldOfMember
BESetInstanceFunctionOfFunction
BEFields
BENoFields
BEDeclareConstructor
BEDeclareType
BEDeclareFunction
BECodeAlt
BEString
BEStrings
BEStringList
BENoStrings
BECodeParameter
BECodeParameters
BECodeParameterList
BENoCodeParameters
BENodeIdListElem
BENodeIds
BENodeIdList
BENoNodeIds
BEAbcCodeBlock
BEAnyCodeBlock
......
......@@ -150,18 +150,14 @@ BENodeId :: !Int !BackEnd -> (!BENodeIdP,!BackEnd);
// BENodeIdP BENodeId (int sequenceNumber);
BEWildCardNodeId :: !BackEnd -> (!BENodeIdP,!BackEnd);
// BENodeIdP BEWildCardNodeId ();
BENodeDef :: !Int !BENodeP !BackEnd -> (!BENodeDefP,!BackEnd);
// BENodeDefP BENodeDef (int sequenceNumber,BENodeP node);
BENodeDefList :: !Int !BENodeP !BENodeDefP !BackEnd -> (!BENodeDefP,!BackEnd);
// BENodeDefP BENodeDefList (int sequenceNumber,BENodeP node,BENodeDefP nodeDefs);
BENoNodeDefs :: !BackEnd -> (!BENodeDefP,!BackEnd);
// BENodeDefP BENoNodeDefs ();
BENodeDefs :: !BENodeDefP !BENodeDefP !BackEnd -> (!BENodeDefP,!BackEnd);
// BENodeDefP BENodeDefs (BENodeDefP nodeDef,BENodeDefP nodeDefs);
BEStrictNodeId :: !BENodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
// BEStrictNodeIdP BEStrictNodeId (BENodeIdP nodeId);
BEStrictNodeIdList :: !BENodeIdP !BEStrictNodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
// BEStrictNodeIdP BEStrictNodeIdList (BENodeIdP nodeId,BEStrictNodeIdP strictNodeIds);
BENoStrictNodeIds :: !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
// BEStrictNodeIdP BENoStrictNodeIds ();
BEStrictNodeIds :: !BEStrictNodeIdP !BEStrictNodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
// BEStrictNodeIdP BEStrictNodeIds (BEStrictNodeIdP strictNodeId,BEStrictNodeIdP strictNodeIds);
BERule :: !Int !Int !BETypeAltP !BERuleAltP !BackEnd -> (!BEImpRuleP,!BackEnd);
// BEImpRuleP BERule (int functionIndex,int isCaf,BETypeAltP type,BERuleAltP alts);
BEDeclareRuleType :: !Int !Int !String !BackEnd -> BackEnd;
......@@ -184,24 +180,20 @@ BERecordType :: !Int !BEFlatTypeP !BETypeNodeP !Int !BEFieldListP !BackEnd -> Ba
// void BERecordType (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,int is_boxed_record,BEFieldListP fields);
BEAbsType :: !BEFlatTypeP !BackEnd -> BackEnd;
// void BEAbsType (BEFlatTypeP lhs);
BEConstructors :: !BEConstructorListP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
// BEConstructorListP BEConstructors (BEConstructorListP constructor,BEConstructorListP constructors);
BEConstructorList :: !BETypeNodeP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
// BEConstructorListP BEConstructorList (BETypeNodeP type,BEConstructorListP constructors);
BENoConstructors :: !BackEnd -> (!BEConstructorListP,!BackEnd);
// BEConstructorListP BENoConstructors ();
BEConstructor :: !BETypeNodeP !BackEnd -> (!BEConstructorListP,!BackEnd);
// BEConstructorListP BEConstructor (BETypeNodeP type);
BEDeclareField :: !Int !Int !String !BackEnd -> BackEnd;
// void BEDeclareField (int fieldIndex,int moduleIndex,CleanString name);
BEField :: !Int !Int !BETypeNodeP !BackEnd -> (!BEFieldListP,!BackEnd);
// BEFieldListP BEField (int fieldIndex,int moduleIndex,BETypeNodeP type);
BEFieldList :: !Int !Int !BETypeNodeP !BEFieldListP !BackEnd -> (!BEFieldListP,!BackEnd);
// BEFieldListP BEField (int fieldIndex,int moduleIndex,BETypeNodeP type,BEFieldListP fields);
BESetMemberTypeOfField :: !Int !Int !BETypeAltP !BackEnd -> BackEnd;
// void BESetMemberTypeOfField (int fieldIndex,int moduleIndex,BETypeAltP typeAlt);
BESetDictionaryFieldOfMember :: !Int !Int !Int !BackEnd -> (!Int,!BackEnd);
// int BESetDictionaryFieldOfMember (int function_index, int field_index, int field_module_index);
BESetInstanceFunctionOfFunction :: !Int !Int !BackEnd -> BackEnd;
// void BESetInstanceFunctionOfFunction (int function_index, int instance_function_index);
BEFields :: !BEFieldListP !BEFieldListP !BackEnd -> (!BEFieldListP,!BackEnd);
// BEFieldListP BEFields (BEFieldListP field,BEFieldListP fields);
BENoFields :: !BackEnd -> (!BEFieldListP,!BackEnd);
// BEFieldListP BENoFields ();
BEDeclareConstructor :: !Int !Int !String !BackEnd -> BackEnd;
......@@ -214,22 +206,16 @@ BEStartFunction :: !Int !BackEnd -> BackEnd;
// void BEStartFunction (int functionIndex);
BECodeAlt :: !Int !BENodeDefP !BENodeP !BECodeBlockP !BackEnd -> (!BERuleAltP,!BackEnd);
// BERuleAltP BECodeAlt (int line,BENodeDefP lhsDefs,BENodeP lhs,BECodeBlockP codeBlock);
BEString :: !String !BackEnd -> (!BEStringListP,!BackEnd);
// BEStringListP BEString (CleanString cleanString);
BEStrings :: !BEStringListP !BEStringListP !BackEnd -> (!BEStringListP,!BackEnd);
// BEStringListP BEStrings (BEStringListP string,BEStringListP strings);
BEStringList :: !String !BEStringListP !BackEnd -> (!BEStringListP,!BackEnd);
// BEStringListP BEStringList (CleanString cleanString,BEStringListP strings);
BENoStrings :: !BackEnd -> (!BEStringListP,!BackEnd);
// BEStringListP BENoStrings ();
BECodeParameter :: !String !BENodeIdP !BackEnd -> (!BECodeParameterP,!BackEnd);
// BECodeParameterP BECodeParameter (CleanString location,BENodeIdP nodeId);
BECodeParameters :: !BECodeParameterP !BECodeParameterP !BackEnd -> (!BECodeParameterP,!BackEnd);
// BECodeParameterP BECodeParameters (BECodeParameterP parameter,BECodeParameterP parameters);
BECodeParameterList :: !String !BENodeIdP !BECodeParameterP !BackEnd -> (!BECodeParameterP,!BackEnd);
// BECodeParameterP BECodeParameterList (CleanString location,BENodeIdP nodeId,BECodeParameterP parameters);
BENoCodeParameters :: !BackEnd -> (!BECodeParameterP,!BackEnd);
// BECodeParameterP BENoCodeParameters ();
BENodeIdListElem :: !BENodeIdP !BackEnd -> (!BENodeIdListP,!BackEnd);
// BENodeIdListP BENodeIdListElem (BENodeIdP nodeId);
BENodeIds :: !BENodeIdListP !BENodeIdListP !BackEnd -> (!BENodeIdListP,!BackEnd);
// BENodeIdListP BENodeIds (BENodeIdListP nid,BENodeIdListP nids);
BENodeIdList :: !BENodeIdP !BENodeIdListP !BackEnd -> (!BENodeIdListP,!BackEnd);
// BENodeIdListP BENodeIdList (BENodeIdP nodeId,BENodeIdListP nids);
BENoNodeIds :: !BackEnd -> (!BENodeIdListP,!BackEnd);
// BENodeIdListP BENoNodeIds ();
BEAbcCodeBlock :: !Bool !BEStringListP !BackEnd -> (!BECodeBlockP,!BackEnd);
......@@ -264,8 +250,6 @@ BESetMainDclModuleN :: !Int !BackEnd -> BackEnd;
// void BESetMainDclModuleN (int main_dcl_module_n_parameter);
BEStrictPositions :: !Int !BackEnd -> (!Int,!Int,!BackEnd);
// void BEStrictPositions (int functionIndex,int* bits,int** positions);
BECopyInts :: !Int !Int !Int -> Int;
// int BECopyInts (int cLength,int* ints,int* cleanArray);
BEGetIntFromArray :: !Int !Int -> Int;
// int BEGetIntFromArray (int index,int* ints);
BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd;
......
......@@ -22,8 +22,6 @@ implementation module backend;
:: BEStringListP :== CPtr;
:: BENodeIdListP :== CPtr;
:: BENodeIdRefCountListP :== CPtr;
:: BEUniVarEquations :== CPtr;
:: BEAttributeKindList :== CPtr;
:: BEAnnotation :== Int;
:: BEAttribution :== Int;
:: BESymbKind :== Int;
......@@ -397,11 +395,11 @@ BEWildCardNodeId a0 = code {
}
// BENodeIdP BEWildCardNodeId ();
BENodeDef :: !Int !BENodeP !BackEnd -> (!BENodeDefP,!BackEnd);
BENodeDef a0 a1 a2 = code {
ccall BENodeDef "Ip:p:p"
BENodeDefList :: !Int !BENodeP !BENodeDefP !BackEnd -> (!BENodeDefP,!BackEnd);
BENodeDefList a0 a1 a2 a3 = code {
ccall BENodeDefList "Ipp:p:p"
}
// BENodeDefP BENodeDef (int sequenceNumber,BENodeP node);
// BENodeDefP BENodeDefList (int sequenceNumber,BENodeP node,BENodeDefP nodeDefs);
BENoNodeDefs :: !BackEnd -> (!BENodeDefP,!BackEnd);
BENoNodeDefs a0 = code {
......@@ -409,17 +407,11 @@ BENoNodeDefs a0 = code {
}
// BENodeDefP BENoNodeDefs ();
BENodeDefs :: !BENodeDefP !BENodeDefP !BackEnd -> (!BENodeDefP,!BackEnd);
BENodeDefs a0 a1 a2 = code {
ccall BENodeDefs "pp:p:p"
BEStrictNodeIdList :: !BENodeIdP !BEStrictNodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BEStrictNodeIdList a0 a1 a2 = code {
ccall BEStrictNodeIdList "pp:p:p"
}
// BENodeDefP BENodeDefs (BENodeDefP nodeDef,BENodeDefP nodeDefs);
BEStrictNodeId :: !BENodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BEStrictNodeId a0 a1 = code {
ccall BEStrictNodeId "p:p:p"
}
// BEStrictNodeIdP BEStrictNodeId (BENodeIdP nodeId);
// BEStrictNodeIdP BEStrictNodeIdList (BENodeIdP nodeId,BEStrictNodeIdP strictNodeIds);
BENoStrictNodeIds :: !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BENoStrictNodeIds a0 = code {
......@@ -427,12 +419,6 @@ BENoStrictNodeIds a0 = code {
}
// BEStrictNodeIdP BENoStrictNodeIds ();
BEStrictNodeIds :: !BEStrictNodeIdP !BEStrictNodeIdP !BackEnd -> (!BEStrictNodeIdP,!BackEnd);
BEStrictNodeIds a0 a1 a2 = code {
ccall BEStrictNodeIds "pp:p:p"
}
// BEStrictNodeIdP BEStrictNodeIds (BEStrictNodeIdP strictNodeId,BEStrictNodeIdP strictNodeIds);
BERule :: !Int !Int !BETypeAltP !BERuleAltP !BackEnd -> (!BEImpRuleP,!BackEnd);
BERule a0 a1 a2 a3 a4 = code {
ccall BERule "IIpp:p:p"
......@@ -499,11 +485,11 @@ BEAbsType a0 a1 = code {
}
// void BEAbsType (BEFlatTypeP lhs);
BEConstructors :: !BEConstructorListP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
BEConstructors a0 a1 a2 = code {
ccall BEConstructors "pp:p:p"
BEConstructorList :: !BETypeNodeP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
BEConstructorList a0 a1 a2 = code {
ccall BEConstructorList "pp:p:p"
}
// BEConstructorListP BEConstructors (BEConstructorListP constructor,BEConstructorListP constructors);
// BEConstructorListP BEConstructorList (BETypeNodeP type,BEConstructorListP constructors);
BENoConstructors :: !BackEnd -> (!BEConstructorListP,!BackEnd);
BENoConstructors a0 = code {
......@@ -511,23 +497,17 @@ BENoConstructors a0 = code {
}
// BEConstructorListP BENoConstructors ();
BEConstructor :: !BETypeNodeP !BackEnd -> (!BEConstructorListP,!BackEnd);
BEConstructor a0 a1 = code {
ccall BEConstructor "p:p:p"
}
// BEConstructorListP BEConstructor (BETypeNodeP type);
BEDeclareField :: !Int !Int !String !BackEnd -> BackEnd;
BEDeclareField a0 a1 a2 a3 = code {
ccall BEDeclareField "IIS:V:p"
}
// void BEDeclareField (int fieldIndex,int moduleIndex,CleanString name);
BEField :: !Int !Int !BETypeNodeP !BackEnd -> (!BEFieldListP,!BackEnd);
BEField a0 a1 a2 a3 = code {
ccall BEField "IIp:p:p"
BEFieldList :: !Int !Int !BETypeNodeP !BEFieldListP !BackEnd -> (!BEFieldListP,!BackEnd);
BEFieldList a0 a1 a2 a3 a4 = code {
ccall BEFieldList "IIpp:p:p"
}
// BEFieldListP BEField (int fieldIndex,int moduleIndex,BETypeNodeP type);
// BEFieldListP BEField (int fieldIndex,int moduleIndex,BETypeNodeP type,BEFieldListP fields);
BESetMemberTypeOfField :: !Int !Int !BETypeAltP !BackEnd -> BackEnd;
BESetMemberTypeOfField a0 a1 a2 a3 = code {
......@@ -547,12 +527,6 @@ BESetInstanceFunctionOfFunction a0 a1 a2 = code {
}
// void BESetInstanceFunctionOfFunction (int function_index, int instance_function_index);
BEFields :: !BEFieldListP !BEFieldListP !BackEnd -> (!BEFieldListP,!BackEnd);
BEFields a0 a1 a2 = code {
ccall BEFields "pp:p:p"
}
// BEFieldListP BEFields (BEFieldListP field,BEFieldListP fields);
BENoFields :: !BackEnd -> (!BEFieldListP,!BackEnd);
BENoFields a0 = code {
ccall BENoFields ":p:p"
......@@ -589,17 +563,11 @@ BECodeAlt a0 a1 a2 a3 a4 = code {
}
// BERuleAltP BECodeAlt (int line,BENodeDefP lhsDefs,BENodeP lhs,BECodeBlockP codeBlock);
BEString :: !String !BackEnd -> (!BEStringListP,!BackEnd);
BEString a0 a1 = code {
ccall BEString "S:p:p"
BEStringList :: !String !BEStringListP !BackEnd -> (!BEStringListP,!BackEnd);
BEStringList a0 a1 a2 = code {
ccall BEStringList "Sp:p:p"
}
// BEStringListP BEString (CleanString cleanString);
BEStrings :: !BEStringListP !BEStringListP !BackEnd -> (!BEStringListP,!BackEnd);
BEStrings a0 a1 a2 = code {
ccall BEStrings "pp:p:p"
}
// BEStringListP BEStrings (BEStringListP string,BEStringListP strings);
// BEStringListP BEStringList (CleanString cleanString,BEStringListP strings);
BENoStrings :: !BackEnd -> (!BEStringListP,!BackEnd);
BENoStrings a0 = code {
......@@ -607,17 +575,11 @@ BENoStrings a0 = code {
}
// BEStringListP BENoStrings ();
BECodeParameter :: !String !BENodeIdP !BackEnd -> (!BECodeParameterP,!BackEnd);
BECodeParameter a0 a1 a2 = code {
ccall BECodeParameter "Sp:p:p"
}
// BECodeParameterP BECodeParameter (CleanString location,BENodeIdP nodeId);
BECodeParameters :: !BECodeParameterP !BECodeParameterP !BackEnd -> (!BECodeParameterP,!BackEnd);
BECodeParameters a0 a1 a2 = code {
ccall BECodeParameters "pp:p:p"
BECodeParameterList :: !String !BENodeIdP !BECodeParameterP !BackEnd -> (!BECodeParameterP,!BackEnd);
BECodeParameterList a0 a1 a2 a3 = code {
ccall BECodeParameterList "Spp:p:p"
}
// BECodeParameterP BECodeParameters (BECodeParameterP parameter,BECodeParameterP parameters);
// BECodeParameterP BECodeParameterList (CleanString location,BENodeIdP nodeId,BECodeParameterP parameters);
BENoCodeParameters :: !BackEnd -> (!BECodeParameterP,!BackEnd);
BENoCodeParameters a0 = code {
......@@ -625,17 +587,11 @@ BENoCodeParameters a0 = code {
}
// BECodeParameterP BENoCodeParameters ();
BENodeIdListElem :: !BENodeIdP !BackEnd -> (!BENodeIdListP,!BackEnd);
BENodeIdListElem a0 a1 = code {
ccall BENodeIdListElem "p:p:p"
BENodeIdList :: !BENodeIdP !BENodeIdListP !BackEnd -> (!BENodeIdListP,!BackEnd);
BENodeIdList a0 a1 a2 = code {
ccall BENodeIdList "pp:p:p"
}
// BENodeIdListP BENodeIdListElem (BENodeIdP nodeId);
BENodeIds :: !BENodeIdListP !BENodeIdListP !BackEnd -> (!BENodeIdListP,!BackEnd);
BENodeIds a0 a1 a2 = code {
ccall BENodeIds "pp:p:p"
}
// BENodeIdListP BENodeIds (BENodeIdListP nid,BENodeIdListP nids);
// BENodeIdListP BENodeIdList (BENodeIdP nodeId,BENodeIdListP nids);
BENoNodeIds :: !BackEnd -> (!BENodeIdListP,!BackEnd);
BENoNodeIds a0 = code {
......@@ -739,12 +695,6 @@ BEStrictPositions a0 a1 = code {
}
// void BEStrictPositions (int functionIndex,int* bits,int** positions);
BECopyInts :: !Int !Int !Int -> Int;
BECopyInts a0 a1 a2 = code {
ccall BECopyInts "Ipp:I"
}
// int BECopyInts (int cLength,int* ints,int* cleanArray);
BEGetIntFromArray :: !Int !Int -> Int;
BEGetIntFromArray a0 a1 = code {
ccall BEGetIntFromArray "Ip:I"
......
......@@ -94,41 +94,6 @@ beApFunction2 f m1 m2
:== m1 ==> \a1
-> m2 ==> \a2
-> appBackEnd (f a1 a2)
beApFunction3 f m1 m2 m3
:== m1 ==> \a1
-> m2 ==> \a2
-> m3 ==> \a3
-> appBackEnd (f a1 a2 a3)
beApFunction4 f m1 m2 m3 m4
:== m1 ==> \a1
-> m2 ==> \a2
-> m3 ==> \a3
-> m4 ==> \a4
-> appBackEnd (f a1 a2 a3 a4)
beApFunction5 f m1 m2 m3 m4 m5
:== m1 ==> \a1
-> m2 ==> \a2
-> m3 ==> \a3
-> m4 ==> \a4
-> m5 ==> \a5
-> appBackEnd (f a1 a2 a3 a4 a5)
beApFunction6 f m1 m2 m3 m4 m5 m6
:== m1 ==> \a1
-> m2 ==> \a2
-> m3 ==> \a3
-> m4 ==> \a4
-> m5 ==> \a5
-> m6 ==> \a6
-> appBackEnd (f a1 a2 a3 a4 a5 a6)
beApFunction7 f m1 m2 m3 m4 m5 m6 m7
:== m1 ==> \a1
-> m2 ==> \a2
-> m3 ==> \a3
-> m4 ==> \a4
-> m5 ==> \a5
-> m6 ==> \a6
-> m7 ==> \a7
-> appBackEnd (f a1 a2 a3 a4 a5 a6 a7)
beFunction0 f
:== accBackEnd f
......@@ -234,24 +199,14 @@ beTypeAlt
:== beFunction2 BETypeAlt
beRule index isCaf
:== beFunction2 (BERule index isCaf)
beNodeDef sequenceNumber
:== beFunction1 (BENodeDef sequenceNumber)
beNoNodeDefs
:== beFunction0 BENoNodeDefs
beNodeDefs
:== beFunction2 BENodeDefs
beStrictNodeId
:== beFunction1 BEStrictNodeId
beNoStrictNodeIds
:== beFunction0 BENoStrictNodeIds
beStrictNodeIds
:== beFunction2 BEStrictNodeIds
beNodeIdNode
:== beFunction2 BENodeIdNode
beNodeId sequenceNumber
:== beFunction0 (BENodeId sequenceNumber)
beConstructor
:== beFunction1 BEConstructor
beNoConstructors
:== beFunction0 BENoConstructors
beAnnotateTypeNode annotation
......@@ -264,16 +219,10 @@ beDefineRuleType functionIndex moduleIndex
:== beApFunction1 (BEDefineRuleType functionIndex moduleIndex)
beCodeAlt lineNumber
:== beFunction3 (BECodeAlt lineNumber)
beString string
:== beFunction0 (BEString string)
beStrings
:== beFunction2 BEStrings
beStringList string strings
:== beFunction0 (BEStringList string strings)
beNoStrings
:== beFunction0 BENoStrings
beCodeParameter location
:== beFunction1 (BECodeParameter location)
beCodeParameters
:== beFunction2 BECodeParameters
beNoCodeParameters
:== beFunction0 BENoCodeParameters
beAbcCodeBlock inline
......@@ -304,10 +253,6 @@ beDefaultNode
:== beFunction3 BEDefaultNode
beNoNodeIds
:== beFunction0 BENoNodeIds
beNodeIds
:== beFunction2 BENodeIds
beNodeIdListElem
:== beFunction1 BENodeIdListElem
beBindSpecialModule specialIdentIndex moduleIndex
:== beApFunction0 (BEBindSpecialModule specialIdentIndex moduleIndex)
beBindSpecialFunction specialIdentIndex functionIndex moduleIndex
......@@ -343,25 +288,6 @@ backEndConvertModulesH predefs {fe_icl =
# currentDcl
= fe_dcls.[main_dcl_module_n]
/*
# backEnd
= backEnd ->>
( "dcl conversions"
, currentDcl.dcl_conversions
, "dcl constructors"
, [constructor.cons_ident.id_name \\ constructor <-: currentDcl.dcl_common.com_cons_defs]
, "dcl selectors"
, [selector.sd_ident.id_name \\ selector <-: currentDcl.dcl_common.com_selector_defs]
, "dcl types"
, [type.td_ident.id_name \\ type <-: currentDcl.dcl_common.com_type_defs]
, "icl constructors"
, [constructor.cons_ident.id_name \\ constructor <-: icl_common.com_cons_defs]
, "icl selectors"
, [selector.sd_ident.id_name \\ selector <-: icl_common.com_selector_defs]
, "icl types"
, [type.td_ident.id_name \\ type <-: icl_common.com_type_defs]
)
*/
#! backEnd
= declareCurrentDclModule fe_icl fe_dcls.[main_dcl_module_n] main_dcl_module_n (backEnd -*-> "declareCurrentDclModule")
#! backEnd
......@@ -777,7 +703,7 @@ declareFunType moduleIndex ranges functionIndex {ft_ident, ft_type_ptr}
functionName name functionIndex ranges
| index_in_ranges functionIndex ranges
= name
= (name +++ ";" +++ toString functionIndex)
= name +++ ";" +++ toString functionIndex
where
index_in_ranges index [{ir_from, ir_to}:ranges]
= (index>=ir_from && index < ir_to) || index_in_ranges index ranges;
......@@ -922,24 +848,21 @@ convertConstructors typeIndex typeName moduleIndex cons_defs symbols type_var_he
where
convert_constructors [a:x] type_var_heap beState
# (constructors,type_var_heap,beState) = convert_constructors x type_var_heap beState
(constructor,type_var_heap,beState) = convertConstructor typeIndex typeName moduleIndex cons_defs a type_var_heap beState
(constructors,beState) = accBackEnd (BEConstructors constructor constructors) beState
= (constructors,type_var_heap,beState)
= convertConstructor typeIndex typeName moduleIndex cons_defs a constructors type_var_heap beState
convert_constructors [] type_var_heap beState
# (constructors,beState) = beNoConstructors beState
= (constructors,type_var_heap,beState)
convertConstructor :: Int {#Char} ModuleIndex {#ConsDef} DefinedSymbol !*TypeVarHeap !*BackEndState
-> (!BEConstructorListP,!*TypeVarHeap,!*BackEndState)
convertConstructor typeIndex typeName moduleIndex constructorDefs {ds_index} type_var_heap bes
convertConstructor :: Int {#Char} ModuleIndex {#ConsDef} DefinedSymbol !BEConstructorListP !*TypeVarHeap !*BackEndState
-> (!BEConstructorListP,!*TypeVarHeap,!*BackEndState)
convertConstructor typeIndex typeName moduleIndex constructorDefs {ds_index} constructors type_var_heap bes
# (constructorType,bes) = constructorTypeFunction bes
bes = appBackEnd (BEDeclareConstructor ds_index moduleIndex constructorDef.cons_ident.id_name) bes // +++ remove declare
(atype_args,type_var_heap,bes) = convertTypeDefAnnotatedTypeArgs constructorType.st_args constructorType.st_args_strictness type_var_heap bes
(constructor,bes)
= beConstructor
(beConstructorSymbol moduleIndex ds_index ==> \ constructor_symbol ->
accBackEnd (BENormalTypeNode constructor_symbol atype_args)) bes
= (constructor,type_var_heap,bes)
(constructor_symbol,bes) = beConstructorSymbol moduleIndex ds_index bes
(type_node,bes) = accBackEnd (BENormalTypeNode constructor_symbol atype_args) bes
(constructors,bes) = accBackEnd (BEConstructorList type_node constructors) bes
= (constructors,type_var_heap,bes)
where
constructorDef
= constructorDefs.[ds_index]
......@@ -961,18 +884,15 @@ where
# (field_list_p,bes) = accBackEnd BENoFields bes
= (field_list_p,type_var_heap,bes)
# (field_list_p,type_var_heap,bes) = convert_selectors (index+1) type_var_heap bes
(single_field_list_p,type_var_heap,bes)
= convertSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] type_var_heap bes
(field_list_p,bes) = accBackEnd (BEFields single_field_list_p field_list_p) bes
= (field_list_p,type_var_heap,bes)
= convertSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] field_list_p type_var_heap bes
convertSelector :: ModuleIndex {#SelectorDef} Bool FieldSymbol !*TypeVarHeap !*BackEndState -> (!BEFieldListP,!*TypeVarHeap,!*BackEndState)
convertSelector moduleIndex selectorDefs is_strict {fs_index} type_var_heap bes
convertSelector :: ModuleIndex {#SelectorDef} Bool FieldSymbol !BEFieldListP !*TypeVarHeap !*BackEndState -> (!BEFieldListP,!*TypeVarHeap,!*BackEndState)
convertSelector moduleIndex selectorDefs is_strict {fs_index} field_list_p type_var_heap bes
# selectorDef = selectorDefs.[fs_index]
(field_type,bes) = selectorTypeFunction selectorDef bes
(type_node_p,type_var_heap,bes) = convertTypeDefAnnotAndTypeNode (if is_strict AN_Strict AN_None) field_type type_var_heap bes
bes = appBackEnd (BEDeclareField fs_index moduleIndex selectorDef.sd_ident.id_name) bes
(field_list_p,bes) = accBackEnd (BEField fs_index moduleIndex type_node_p) bes
(field_list_p,bes) = accBackEnd (BEFieldList fs_index moduleIndex type_node_p field_list_p) bes
= (field_list_p,type_var_heap,bes)
where
selectorTypeFunction :: !SelectorDef !*BackEndState -> *(!AType,!*BackEndState)
......@@ -995,22 +915,17 @@ where
= (field_list_p,type_var_heap,bes)
# (field_list_p,type_var_heap,bes) = convert_dictionary_selectors (index+1) type_var_heap bes
| index<size_class_members
# (single_field_list_p,type_var_heap,bes)
= convertMemberSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] type_var_heap bes
(field_list_p,bes) = accBackEnd (BEFields single_field_list_p field_list_p) bes
= (field_list_p,type_var_heap,bes)
# (single_field_list_p,type_var_heap,bes)
= convertSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] type_var_heap bes
(field_list_p,bes) = accBackEnd (BEFields single_field_list_p field_list_p) bes
= (field_list_p,type_var_heap,bes)
convertMemberSelector :: ModuleIndex {#SelectorDef} Bool FieldSymbol !*TypeVarHeap !*BackEndState -> (!BEFieldListP,!*TypeVarHeap,!*BackEndState)
convertMemberSelector moduleIndex selectorDefs is_strict {fs_index} type_var_heap bes
= convertMemberSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] field_list_p type_var_heap bes
= convertSelector moduleIndex selectors (arg_is_strict index strictness) symbols.[index] field_list_p type_var_heap bes
convertMemberSelector :: ModuleIndex {#SelectorDef} Bool FieldSymbol !BEFieldListP !*TypeVarHeap !*BackEndState -> (!BEFieldListP,!*TypeVarHeap,!*BackEndState)
convertMemberSelector moduleIndex selectorDefs is_strict {fs_index} field_list_p type_var_heap bes
//convertMemberSelector moduleIndex selectorDefs is_strict {fs_index,fs_ident} type_var_heap bes
# selectorDef = selectorDefs.[fs_index]
(field_type,optional_type_alt_p,bes) = selectorTypeFunction selectorDef bes
(field_type,type_var_heap,bes) = convertTypeDefAnnotAndTypeNode (if is_strict AN_Strict AN_None) field_type type_var_heap bes
bes = appBackEnd (BEDeclareField fs_index moduleIndex selectorDef.sd_ident.id_name) bes
(field_list_p,bes) = accBackEnd (BEField fs_index moduleIndex field_type) bes
(field_list_p,bes) = accBackEnd (BEFieldList fs_index moduleIndex field_type field_list_p) bes
= case optional_type_alt_p of
No
-> (field_list_p,type_var_heap,bes)
......@@ -1134,7 +1049,7 @@ predefineSymbols {d