From ad561c6f2055303bc355cc5e84dbf1e8b614f30e Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 31 Mar 2011 15:26:26 +0000 Subject: use type Component instead of Group in the fusion modules: partition, classify and trans, because function pointers for generated functions are stored in the Component, they can be found without searching the new functions list git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1895 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backend/backendinterface.icl | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'backend/backendinterface.icl') diff --git a/backend/backendinterface.icl b/backend/backendinterface.icl index aa7bc00..41c0b1c 100644 --- a/backend/backendinterface.icl +++ b/backend/backendinterface.icl @@ -9,6 +9,7 @@ import frontend import backend import backendpreprocess, backendsupport, backendconvert import Version +import partition checkVersion :: VersionsCompatability *File -> (!Bool, !*File) checkVersion VersionsAreCompatible errorFile @@ -49,7 +50,19 @@ backEndInterface outputFileName commandLineArgs listTypes typesPath predef_symbo # varHeap = backEndPreprocess predefined_idents.[PD_DummyForStrictAliasFun] functionIndices fe_icl var_heap with - functionIndices = flatten [group.group_members \\ group <-: fe_components] + functionIndices = function_indices 0 fe_components + + function_indices i components + | i (*AttrVarHeap, *File, *BackEnd) +optionallyPrintFunctionTypes :: ListTypesOption {#Char} DictionaryToClassInfo {!Component} {#FunDef} *AttrVarHeap *File !*BackEnd -> (*AttrVarHeap, *File, *BackEnd) optionallyPrintFunctionTypes {lto_listTypesKind, lto_showAttributes} typesPath info components functions attrHeap outFile backEnd | lto_listTypesKind == ListTypesStrictExports || lto_listTypesKind == ListTypesAll = printFunctionTypes (lto_listTypesKind == ListTypesAll) lto_showAttributes info components functions attrHeap outFile backEnd = (attrHeap, outFile, backEnd) -printFunctionTypes :: Bool Bool DictionaryToClassInfo {!Group} {#FunDef} *AttrVarHeap *File *BackEnd -> (*AttrVarHeap, *File, *BackEnd) +printFunctionTypes :: Bool Bool DictionaryToClassInfo {!Component} {#FunDef} *AttrVarHeap *File *BackEnd -> (*AttrVarHeap, *File, *BackEnd) printFunctionTypes all attr info components functions attrHeap file backEnd = foldSt (printFunctionType all attr info) functionIndicesAndFunctions (attrHeap, file, backEnd) where functionIndicesAndFunctions - = [(member,functions.[member]) \\ group <-: components, member <- group.group_members] + = function_indices_and_functions 0 components + + function_indices_and_functions i components + | i (*AttrVarHeap, *File, *BackEnd) printFunctionType all attr info (functionIndex, {fun_ident,fun_type=Yes type}) (attrHeap, file, backEnd) -- cgit v1.2.3