aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorjohnvg2005-11-25 11:37:10 +0000
committerjohnvg2005-11-25 11:37:10 +0000
commit9132feb32bdc9701ffcf1378eccd71a2b7a7c0fc (patch)
tree186a733427d3dcfab3443c73bb915448813e7d98 /backend
parentrepair error introduced by previous revision (put symbol table back in state) (diff)
remove some unnecessary copying while creating lists of function indices
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1578 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backend')
-rw-r--r--backend/backendinterface.icl9
1 files changed, 4 insertions, 5 deletions
diff --git a/backend/backendinterface.icl b/backend/backendinterface.icl
index 4effd79..cb833ca 100644
--- a/backend/backendinterface.icl
+++ b/backend/backendinterface.icl
@@ -49,8 +49,7 @@ backEndInterface outputFileName commandLineArgs listTypes typesPath predef_symbo
# varHeap
= backEndPreprocess predefined_idents.[PD_DummyForStrictAliasFun] functionIndices fe_icl var_heap
with
- functionIndices
- = flatten [[member \\ member <- group.group_members] \\ group <-: fe_components]
+ functionIndices = flatten [group.group_members \\ group <-: fe_components]
# backEndFiles
= 0
# (backEnd, backEndFiles)
@@ -103,10 +102,10 @@ optionallyPrintFunctionTypes {lto_listTypesKind, lto_showAttributes} typesPath i
printFunctionTypes :: Bool Bool DictionaryToClassInfo {!Group} {#FunDef} *AttrVarHeap *File *BackEnd -> (*AttrVarHeap, *File, *BackEnd)
printFunctionTypes all attr info components functions attrHeap file backEnd
- = foldSt (printFunctionType all attr info) [(index, functions.[index]) \\ (_, index) <- functionIndices] (attrHeap, file, backEnd)
+ = foldSt (printFunctionType all attr info) functionIndicesAndFunctions (attrHeap, file, backEnd)
where
- functionIndices
- = flatten [[(componentIndex, member) \\ member <- group.group_members] \\ group <-: components & componentIndex <- [1..]]
+ functionIndicesAndFunctions
+ = [(member,functions.[member]) \\ group <-: components, member <- group.group_members]
printFunctionType :: Bool Bool DictionaryToClassInfo (Int, FunDef) (*AttrVarHeap, *File, *BackEnd) -> (*AttrVarHeap, *File, *BackEnd)
printFunctionType all attr info (functionIndex, {fun_ident,fun_type=Yes type}) (attrHeap, file, backEnd)