Commit 2cb4485e authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏘
Browse files

removed unused functions

updated version (necessary because previous commit introduced
incompatibilities)
parent ea2996f7
......@@ -115,7 +115,6 @@ BEDeclarePredefinedModule
BEDefineRules
BEGenerateCode
BEExportType
BESwapTypes
BEExportConstructor
BEExportField
BEExportFunction
......
......@@ -6,31 +6,31 @@ from StdString import String;
:: CPtr :== Int;
:: *UWorld :== Int;
:: *BackEnd :== Int;
:: BESymbolP :== CPtr;
:: BETypeNodeP :== CPtr;
:: BETypeArgP :== CPtr;
:: BETypeAltP :== CPtr;
:: BENodeP :== CPtr;
:: BEArgP :== CPtr;
:: BERuleAltP :== CPtr;
:: BEImpRuleP :== CPtr;
:: BETypeP :== CPtr;
:: BEFlatTypeP :== CPtr;
:: BETypeVarP :== CPtr;
:: BETypeVarListP :== CPtr;
:: BEConstructorListP :== CPtr;
:: BEFieldListP :== CPtr;
:: BENodeIdP :== CPtr;
:: BENodeDefP :== CPtr;
:: BEStrictNodeIdP :== CPtr;
:: BECodeParameterP :== CPtr;
:: BECodeBlockP :== CPtr;
:: BEStringListP :== CPtr;
:: BENodeIdListP :== CPtr;
:: BENodeIdRefCountListP :== CPtr;
:: BEUniVarEquations :== CPtr;
:: BEAttributeKindList :== CPtr;
:: *BackEnd; // :== CPtr;
:: BESymbolP; // :== CPtr;
:: BETypeNodeP; // :== CPtr;
:: BETypeArgP; // :== CPtr;
:: BETypeAltP; // :== CPtr;
:: BENodeP; // :== CPtr;
:: BEArgP; // :== CPtr;
:: BERuleAltP; // :== CPtr;
:: BEImpRuleP; // :== CPtr;
:: BETypeP; // :== CPtr;
:: BEFlatTypeP; // :== CPtr;
:: BETypeVarP; // :== CPtr;
:: BETypeVarListP; // :== CPtr;
:: BEConstructorListP; // :== CPtr;
:: BEFieldListP; // :== CPtr;
:: BENodeIdP; // :== CPtr;
:: BENodeDefP; // :== CPtr;
:: BEStrictNodeIdP; // :== CPtr;
:: BECodeParameterP; // :== CPtr;
:: BECodeBlockP; // :== CPtr;
:: BEStringListP; // :== CPtr;
:: BENodeIdListP; // :== CPtr;
:: BENodeIdRefCountListP; // :== CPtr;
:: BEUniVarEquations; // :== CPtr;
:: BEAttributeKindList; // :== CPtr;
:: BEAnnotation :== Int;
:: BEAttribution :== Int;
:: BESymbKind :== Int;
......@@ -206,14 +206,10 @@ BENoTypes :: !BackEnd -> (!BETypeP,!BackEnd);
// BETypeP BENoTypes ();
BEFlatType :: !BESymbolP !BETypeVarListP !BackEnd -> (!BEFlatTypeP,!BackEnd);
// BEFlatTypeP BEFlatType (BESymbolP symbol,BETypeVarListP arguments);
//BEFlatTypeX :: !BESymbolP !BEAttribution !BETypeVarListP !BackEnd -> (!BEFlatTypeP,!BackEnd);
// BEFlatTypeP BEFlatTypeX (BESymbolP symbol,BEAttribution attribute,BETypeVarListP arguments);
BEAlgebraicType :: !BEFlatTypeP !BEConstructorListP !BackEnd -> BackEnd;
// void BEAlgebraicType (BEFlatTypeP lhs,BEConstructorListP constructors);
BERecordType :: !Int !BEFlatTypeP !BETypeNodeP !BEFieldListP !BackEnd -> BackEnd;
// void BERecordType (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,BEFieldListP fields);
//BERecordTypeX :: !Int !BEFlatTypeP !BETypeNodeP !Int !BEFieldListP !BackEnd -> BackEnd;
// void BERecordType (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,int is_boxoed_record,BEFieldListP fields);
BEAbsType :: !BEFlatTypeP !BackEnd -> BackEnd;
// void BEAbsType (BEFlatTypeP lhs);
BEConstructors :: !BEConstructorListP !BEConstructorListP !BackEnd -> (!BEConstructorListP,!BackEnd);
......@@ -272,16 +268,14 @@ BEDefineRules :: !BEImpRuleP !BackEnd -> BackEnd;
// void BEDefineRules (BEImpRuleP rules);
BEGenerateCode :: !String !BackEnd -> (!Bool,!BackEnd);
// int BEGenerateCode (CleanString outputFile);
BEExportType :: !Int !Int !BackEnd -> BackEnd;
// void BEExportType (int dclTypeIndex,int iclTypeIndex);
BESwapTypes :: !Int !Int !BackEnd -> BackEnd;
// void BESwapTypes (int frm,int to);
BEExportConstructor :: !Int !Int !BackEnd -> BackEnd;
// void BEExportConstructor (int dclConstructorIndex,int iclConstructorIndex);
BEExportField :: !Int !Int !BackEnd -> BackEnd;
// void BEExportField (int dclTypeIndex,int iclTypeIndex);
BEExportFunction :: !Int !Int !BackEnd -> BackEnd;
// void BEExportFunction (int dclFunctionIndex,int iclFunctionIndex);
BEExportType :: !Bool !Int !BackEnd -> BackEnd;
// void BEExportType (int isDictionary,int typeIndex);
BEExportConstructor :: !Int !BackEnd -> BackEnd;
// void BEExportConstructor (int constructorIndex);
BEExportField :: !Bool !Int !BackEnd -> BackEnd;
// void BEExportField (int isDictionaryField,int fieldIndex);
BEExportFunction :: !Int !BackEnd -> BackEnd;
// void BEExportFunction (int functionIndex);
BEDefineImportedObjsAndLibs :: !BEStringListP !BEStringListP !BackEnd -> BackEnd;
// void BEDefineImportedObjsAndLibs (BEStringListP objs,BEStringListP libs);
BESetMainDclModuleN :: !Int !BackEnd -> BackEnd;
......@@ -294,9 +288,9 @@ BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd;
// void BEDeclareDynamicTypeSymbol (int typeIndex,int moduleIndex);
BEDynamicTempTypeSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
// BESymbolP BEDynamicTempTypeSymbol ();
kBEVersionCurrent:==0x02010801;
kBEVersionOldestDefinition:==0x02000213;
kBEVersionOldestImplementation:==0x02010801;
kBEVersionCurrent:==0x02030407;
kBEVersionOldestDefinition:==0x02030407;
kBEVersionOldestImplementation:==0x02030407;
kBEDebug:==1;
kPredefinedModuleIndex:==1;
BENoAnnot:==0;
......
......@@ -6,7 +6,7 @@ from StdString import String;
:: CPtr :== Int;
:: *UWorld :== Int;
:: *BackEnd :== Int;
:: *BackEnd :== CPtr;
:: BESymbolP :== CPtr;
:: BETypeNodeP :== CPtr;
:: BETypeArgP :== CPtr;
......@@ -542,13 +542,6 @@ BEFlatType a0 a1 a2 = code {
ccall BEFlatType "II:I:I"
}
// BEFlatTypeP BEFlatType (BESymbolP symbol,BETypeVarListP arguments);
/*
BEFlatTypeX :: !BESymbolP !BEAttribution !BETypeVarListP !BackEnd -> (!BEFlatTypeP,!BackEnd);
BEFlatTypeX a0 a1 a2 a3 = code {
ccall BEFlatTypeX "III:I:I"
}
*/
// BEFlatTypeP BEFlatTypeX (BESymbolP symbol,BETypeVarListP arguments,BEAttribution attribute);
BEAlgebraicType :: !BEFlatTypeP !BEConstructorListP !BackEnd -> BackEnd;
BEAlgebraicType a0 a1 a2 = code {
......@@ -561,13 +554,6 @@ BERecordType a0 a1 a2 a3 a4 = code {
ccall BERecordType "IIII:V:I"
}
// void BERecordType (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,BEFieldListP fields);
/*
BERecordTypeX :: !Int !BEFlatTypeP !BETypeNodeP !Int !BEFieldListP !BackEnd -> BackEnd;
BERecordTypeX a0 a1 a2 a3 a4 a5 = code {
ccall BERecordTypeX "IIIII:V:I"
}
*/
// void BERecordTypeX (int moduleIndex,BEFlatTypeP lhs,BETypeNodeP constructorType,int is_boxed_record,BEFieldListP fields);
BEAbsType :: !BEFlatTypeP !BackEnd -> BackEnd;
BEAbsType a0 a1 = code {
......@@ -743,35 +729,29 @@ BEGenerateCode a0 a1 = code {
}
// int BEGenerateCode (CleanString outputFile);
BEExportType :: !Int !Int !BackEnd -> BackEnd;
BEExportType :: !Bool !Int !BackEnd -> BackEnd;
BEExportType a0 a1 a2 = code {
ccall BEExportType "II:V:I"
}
// void BEExportType (int dclTypeIndex,int iclTypeIndex);
BESwapTypes :: !Int !Int !BackEnd -> BackEnd;
BESwapTypes a0 a1 a2 = code {
ccall BESwapTypes "II:V:I"
}
// void BESwapTypes (int frm,int to);
// void BEExportType (int isDictionary,int typeIndex);
BEExportConstructor :: !Int !Int !BackEnd -> BackEnd;
BEExportConstructor a0 a1 a2 = code {
ccall BEExportConstructor "II:V:I"
BEExportConstructor :: !Int !BackEnd -> BackEnd;
BEExportConstructor a0 a1 = code {
ccall BEExportConstructor "I:V:I"
}
// void BEExportConstructor (int dclConstructorIndex,int iclConstructorIndex);
// void BEExportConstructor (int constructorIndex);
BEExportField :: !Int !Int !BackEnd -> BackEnd;
BEExportField :: !Bool !Int !BackEnd -> BackEnd;
BEExportField a0 a1 a2 = code {
ccall BEExportField "II:V:I"
}
// void BEExportField (int dclTypeIndex,int iclTypeIndex);
// void BEExportField (int isDictionaryField,int fieldIndex);
BEExportFunction :: !Int !Int !BackEnd -> BackEnd;
BEExportFunction a0 a1 a2 = code {
ccall BEExportFunction "II:V:I"
BEExportFunction :: !Int !BackEnd -> BackEnd;
BEExportFunction a0 a1 = code {
ccall BEExportFunction "I:V:I"
}
// void BEExportFunction (int dclFunctionIndex,int iclFunctionIndex);
// void BEExportFunction (int functionIndex);
BEDefineImportedObjsAndLibs :: !BEStringListP !BEStringListP !BackEnd -> BackEnd;
BEDefineImportedObjsAndLibs a0 a1 a2 = code {
......@@ -808,9 +788,9 @@ BEDynamicTempTypeSymbol a0 = code {
ccall BEDynamicTempTypeSymbol ":I:I"
}
// BESymbolP BEDynamicTempTypeSymbol ();
kBEVersionCurrent:==0x02010801;
kBEVersionOldestDefinition:==0x02000213;
kBEVersionOldestImplementation:==0x02010801;
kBEVersionCurrent:==0x02030407;
kBEVersionOldestDefinition:==0x02030407;
kBEVersionOldestImplementation:==0x02030407;
kBEDebug:==1;
kPredefinedModuleIndex:==1;
BENoAnnot:==0;
......
......@@ -309,8 +309,6 @@ beAdjustArrayFunction backendId functionIndex moduleIndex
:== beApFunction0 (BEAdjustArrayFunction backendId functionIndex moduleIndex)
beFlatType
:== beFunction2 BEFlatType
//beFlatTypeX
// :== beFunction3 BEFlatTypeX
beNoTypeVars
:== beFunction0 BENoTypeVars
beTypeVars
......@@ -319,14 +317,14 @@ beTypeVar name
:== beFunction0 (BETypeVar name)
beTypeVarListElem
:== beFunction2 BETypeVarListElem
beExportType dclTypeIndex iclTypeIndex
:== beApFunction0 (BEExportType dclTypeIndex iclTypeIndex)
beExportConstructor dclConstructorIndex iclConstructorIndex
:== beApFunction0 (BEExportConstructor dclConstructorIndex iclConstructorIndex)
beExportField dclFieldIndex iclFieldIndex
:== beApFunction0 (BEExportField dclFieldIndex iclFieldIndex)
beExportFunction dclIndexFunctionIndex iclFunctionIndex
:== beApFunction0 (BEExportFunction dclIndexFunctionIndex iclFunctionIndex)
beExportType isDictionary typeIndex
:== beApFunction0 (BEExportType isDictionary typeIndex)
beExportConstructor constructorIndex
:== beApFunction0 (BEExportConstructor constructorIndex)
beExportField isDictionaryField fieldIndex
:== beApFunction0 (BEExportField isDictionaryField fieldIndex)
beExportFunction functionIndex
:== beApFunction0 (BEExportFunction functionIndex)
beTupleSelectNode arity index
:== beFunction1 (BETupleSelectNode arity index)
beMatchNode arity
......@@ -2105,38 +2103,36 @@ getVariableSequenceNumber varInfoPtr be
VI_AliasSequenceNumber {var_info_ptr}
-> getVariableSequenceNumber var_info_ptr be
foldStateWithIndexTwice function n
foldStateWithIndex function n
:== foldStateWithIndexTwice 0
where
foldStateWithIndexTwice index
| index == n
= identity
// otherwise
= function index index
= function index
o` foldStateWithIndexTwice (index+1)
markExports :: DclModule {#ClassDef} {#CheckedTypeDef} {#ClassDef} {#CheckedTypeDef} -> BackEnder
markExports {dcl_functions,dcl_common={com_type_defs,com_cons_defs,com_selector_defs,com_class_defs}} dclClasses dclTypes iclClasses iclTypes
= foldStateWithIndexTwice beExportType (size com_type_defs)
o foldStateWithIndexTwice beExportConstructor (size com_cons_defs)
o foldStateWithIndexTwice beExportField (size com_selector_defs)
o foldStateWithIndexTwice (exportDictionary iclClasses iclTypes) (size com_class_defs)
o foldStateWithIndexTwice beExportFunction (size dcl_functions)
= foldStateWithIndex (beExportType False) (size com_type_defs)
o foldStateWithIndex beExportConstructor (size com_cons_defs)
o foldStateWithIndex (beExportField False) (size com_selector_defs)
o foldStateWithIndex (exportDictionary iclClasses iclTypes) (size com_class_defs)
o foldStateWithIndex beExportFunction (size dcl_functions)
where
exportDictionary :: {#ClassDef} {#CheckedTypeDef} Index Index -> BackEnder
exportDictionary iclClasses iclTypes dclClassIndex iclClassIndex
= beExportType (-1) iclTypeIndex // remove -1 hack
exportDictionary :: {#ClassDef} {#CheckedTypeDef} Index -> BackEnder
exportDictionary iclClasses iclTypes classIndex
= beExportType True classIndex
o foldStateA exportDictionaryField rt_fields
where
dclTypeIndex
= dclClasses.[dclClassIndex].class_dictionary.ds_index
iclTypeIndex
= iclClasses.[iclClassIndex].class_dictionary.ds_index
= iclClasses.[classIndex].class_dictionary.ds_index
dclTypeIndex
= dclClasses.[classIndex].class_dictionary.ds_index
{td_rhs = RecordType {rt_fields}}
= iclTypes.[iclTypeIndex]
exportDictionaryField :: FieldSymbol -> BackEnder
exportDictionaryField {fs_index}
= beExportField (-1) fs_index // remove -1 hack
markExports _ _ _ _ _
= identity
= beExportField True fs_index
......@@ -14,7 +14,7 @@
# define kFileFlags VS_FF_DEBUG | VS_FF_PRERELEASE
# define kFileFlagsMask VS_FF_DEBUG | VS_FF_PRERELEASE
# define kFileVersionString "2.0.r.0"
# define kFileVersionString "2.0.3.a.7"
VS_VERSION_INFO VERSIONINFO
FILEVERSION kFileVersion
......@@ -33,11 +33,11 @@ BEGIN
VALUE "FileDescription", "backend Shared Library - Development Version\0"
VALUE "FileVersion", kFileVersionString "\0"
VALUE "InternalName", "backend\0"
VALUE "LegalCopyright", "Copyright \251 University of Nijmegen 1999-2001\0"
VALUE "LegalCopyright", "Copyright \251 University of Nijmegen 1999-2003\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename","backend.dll\0"
VALUE "ProductName", "Clean System"
VALUE "ProductVersion", "2.0.r.0"
VALUE "ProductVersion", "2.0.3.a.7"
VALUE "OLESelfRegister", "\0"
END
......
No preview for this file type
Supports Markdown
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