aboutsummaryrefslogtreecommitdiff
path: root/backend/backendconvert.icl
diff options
context:
space:
mode:
authorjohnvg2011-03-31 15:26:26 +0000
committerjohnvg2011-03-31 15:26:26 +0000
commitad561c6f2055303bc355cc5e84dbf1e8b614f30e (patch)
treed51044322863053a4d19397bc8e4dfd6b871f5e3 /backend/backendconvert.icl
parentmake the following identical local functions of functions analyseGroups and r... (diff)
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
Diffstat (limited to 'backend/backendconvert.icl')
-rw-r--r--backend/backendconvert.icl19
1 files changed, 16 insertions, 3 deletions
diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl
index 357209f..52f2c77 100644
--- a/backend/backendconvert.icl
+++ b/backend/backendconvert.icl
@@ -6,11 +6,10 @@ implementation module backendconvert
import code from library "backend_library"
import StdEnv
-// import StdDebug
-
import frontend
import backend
import backendsupport, backendpreprocess
+import partition
// trace macro
(-*->) infixl
@@ -489,7 +488,21 @@ backEndConvertModulesH predefs {fe_icl =
= (backEnd -*-> "backend done")
where
functionIndices
- = flatten [[(componentIndex, member) \\ member <- group.group_members] \\ group <-: fe_components & componentIndex <- [1..]]
+ = function_indices 0 fe_components
+
+ function_indices i components
+ | i<size components
+ = function_indices2 components.[i].component_members i components
+ = []
+
+ function_indices2 (ComponentMember member members) i components
+ #! inc_i = i+1
+ = [(inc_i,member) : function_indices2 members i components]
+ function_indices2 (GeneratedComponentMember member _ members) i components
+ #! inc_i = i+1
+ = [(inc_i,member) : function_indices2 members i components]
+ function_indices2 NoComponentMembers i components
+ = function_indices (i+1) components
declareOtherDclModules :: {#DclModule} Int NumberSet -> BackEnder
declareOtherDclModules dcls main_dcl_module_n used_module_numbers