From 79f26e125640252f634c6beb19d4a6dc9455f7d2 Mon Sep 17 00:00:00 2001 From: johnvg Date: Fri, 13 Jul 2001 11:22:07 +0000 Subject: bug fix: reverse order of functions (in components) (backendconvert.icl,backend.c) git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@544 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backend/backendconvert.icl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend') diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl index b2dcb82..39d3bc1 100644 --- a/backend/backendconvert.icl +++ b/backend/backendconvert.icl @@ -469,7 +469,7 @@ backEndConvertModulesH predefs {fe_icl = = (backEnd -*-> "backend done") where functionIndices - = flatten [[(componentIndex, member) \\ member <- group.group_members] \\ group <-: fe_components & componentIndex <- [0..]] + = flatten [[(componentIndex, member) \\ member <- group.group_members] \\ group <-: fe_components & componentIndex <- [1..]] declareOtherDclModules :: {#DclModule} Int NumberSet -> BackEnder declareOtherDclModules dcls main_dcl_module_n used_module_numbers @@ -705,9 +705,9 @@ instance declare {#a} | declareWithIndex a & Array {#} a where declareFunctionSymbols :: {#FunDef} {#Int} [(Int, Int)] IndexRange *BackEndState -> *BackEndState declareFunctionSymbols functions iclDclConversions functionIndices globalFunctions backEnd - = foldr (declare iclDclConversions) backEnd [(functionIndex, componentIndex, functions.[functionIndex]) \\ (componentIndex, functionIndex) <- functionIndices] + = foldl (declare iclDclConversions) backEnd [(functionIndex, componentIndex, functions.[functionIndex]) \\ (componentIndex, functionIndex) <- functionIndices] where - declare iclDclConversions (functionIndex, componentIndex, function) backEnd + declare iclDclConversions backEnd (functionIndex, componentIndex, function) = appBackEnd (BEDeclareFunction (functionName function.fun_symb.id_name functionIndex iclDclConversions globalFunctions) function.fun_arity functionIndex componentIndex) backEnd where -- cgit v1.2.3