Commit 303d5e69 authored by John van Groningen's avatar John van Groningen
Browse files

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
parent fabef317
......@@ -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
......
......@@ -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<size components
= function_indices2 components.[i].component_members i components
= []
function_indices2 (ComponentMember member members) i components
= [member : function_indices2 members i components]
function_indices2 (GeneratedComponentMember member _ members) i components
= [member : function_indices2 members i components]
function_indices2 NoComponentMembers i components
= function_indices (i+1) components
# backEndFiles
= 0
# (backEnd, backEndFiles)
......@@ -80,18 +93,30 @@ DictionaryToClassInfo iclModuleIndex iclModule dclModules :==
, dtci_dclModules = dclModules
}
optionallyPrintFunctionTypes :: ListTypesOption {#Char} DictionaryToClassInfo {!Group} {#FunDef} *AttrVarHeap *File !*BackEnd -> (*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<size components
= function_indices_and_functions2 components.[i].component_members i components
= []
function_indices_and_functions2 (ComponentMember member members) i components
= [(member,functions.[member]) : function_indices_and_functions2 members i components]
function_indices_and_functions2 (GeneratedComponentMember member _ members) i components
= [(member,functions.[member]) : function_indices_and_functions2 members i components]
function_indices_and_functions2 NoComponentMembers i components
= function_indices_and_functions (i+1) components
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)
......
definition module classify
import syntax, transform
import syntax
from partition import ::Component,::ComponentMembers
CUnusedLazy :== -1
CUnusedStrict :== -2
......@@ -11,14 +12,14 @@ CVarOfMultimatchCase :== -6
:: CleanupInfo :== [ExprInfoPtr]
analyseGroups :: !{# CommonDefs} !{#{#FunType}} !IndexRange !Int !Int !*{! Group} !*{#FunDef} !*VarHeap !*ExpressionHeap
-> (!CleanupInfo, !*{!ConsClasses}, !*{!Group}, !*{#FunDef}, !*VarHeap, !*ExpressionHeap)
analyseGroups :: !{# CommonDefs} !{#{#FunType}} !IndexRange !Int !Int !*{!Component} !*{#FunDef} !*VarHeap !*ExpressionHeap
-> (!CleanupInfo, !*{!ConsClasses}, !*{!Component}, !*{#FunDef}, !*VarHeap, !*ExpressionHeap)
reanalyseGroups :: !{# CommonDefs} !{#{#FunType}} !Int !Int ![FunctionInfoPtr] ![Group] !*{#FunDef} !*VarHeap !*ExpressionHeap !*FunctionHeap !*{!ConsClasses}
reanalyseGroups :: !{# CommonDefs} !{#{#FunType}} !Int !Int ![Component] !*{#FunDef} !*VarHeap !*ExpressionHeap !*FunctionHeap !*{!ConsClasses}
-> (!CleanupInfo, !*{#FunDef}, !*VarHeap, !*ExpressionHeap, !*FunctionHeap, !*{!ConsClasses}, !Bool)
:: *PRState =
{ prs_group :: ![Int]
{ prs_group :: !ComponentMembers
, prs_cons_args :: !*{!ConsClasses}
, prs_main_dcl_module_n :: !Int
, prs_fun_heap :: !*FunctionHeap
......
This diff is collapsed.
......@@ -4,12 +4,12 @@
definition module convertDynamics
import syntax , checksupport
from transform import ::Group
from trans import ::Component
:: TypeCodeVariableInfo
:: DynamicValueAliasInfo
convertDynamicPatternsIntoUnifyAppls :: !{# CommonDefs} !Int {#DclModule} !IclModule [String] !Int !Int
!*{!Group} !*{#FunDef} !*PredefinedSymbols !*VarHeap !*TypeHeaps !*ExpressionHeap !(Optional *File)
!*{!Component} !*{#FunDef} !*PredefinedSymbols !*VarHeap !*TypeHeaps !*ExpressionHeap !(Optional *File)
-> (!*{#{#CheckedTypeDef}},
!*{!Group},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*TypeHeaps,!*ExpressionHeap,!(Optional *File))
!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*TypeHeaps,!*ExpressionHeap,!(Optional *File))
......@@ -83,9 +83,9 @@ where
= (wtis_type_heaps,wtis_type_defs,wtis_var_heap)
convertDynamicPatternsIntoUnifyAppls :: !{# CommonDefs} !Int {#DclModule} !IclModule [String] !Int !Int
!*{!Group} !*{#FunDef} !*PredefinedSymbols !*VarHeap !*TypeHeaps !*ExpressionHeap !(Optional *File)
!*{!Component} !*{#FunDef} !*PredefinedSymbols !*VarHeap !*TypeHeaps !*ExpressionHeap !(Optional *File)
-> (!*{#{#CheckedTypeDef}},
!*{!Group},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*TypeHeaps,!*ExpressionHeap,!(Optional *File))
!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*TypeHeaps,!*ExpressionHeap,!(Optional *File))
convertDynamicPatternsIntoUnifyAppls common_defs main_dcl_module_n dcl_mods icl_mod directly_imported_dcl_modules
n_types_with_type_functions n_constructors_with_type_functions
groups fun_defs predefined_symbols var_heap type_heaps expr_heap tcl_file
......@@ -121,7 +121,14 @@ where
| group_nr == size groups
= (groups, fun_defs_and_ci)
# (group, groups) = groups![group_nr]
= convert_groups (inc group_nr) groups dynamic_representation (foldSt (convert_function group_nr dynamic_representation) group.group_members fun_defs_and_ci)
= convert_groups (inc group_nr) groups dynamic_representation
(convert_functions group.component_members group_nr dynamic_representation fun_defs_and_ci)
convert_functions (ComponentMember member members) group_nr dynamic_representation fun_defs_and_ci
# fun_defs_and_ci = convert_function group_nr dynamic_representation member fun_defs_and_ci
= convert_functions members group_nr dynamic_representation fun_defs_and_ci
convert_functions NoComponentMembers group_nr dynamic_representation fun_defs_and_ci
= fun_defs_and_ci
convert_function group_nr dynamic_representation fun (fun_defs, ci)
# (fun_def, fun_defs) = fun_defs![fun]
......
......@@ -3,13 +3,14 @@
*/
definition module convertcases
import syntax, transform
import syntax
from trans import ::Component
:: LetVarInfo
:: LetExpressionInfo
:: RefCountsInCase
:: SplitsInCase
convertCasesOfFunctions :: !*{! Group} !Int !{# {# FunType} } !{# CommonDefs} !*{#FunDef} !*{#{# CheckedTypeDef}}
convertCasesOfFunctions :: !*{!Component} !Int !{# {# FunType} } !{# CommonDefs} !*{#FunDef} !*{#{# CheckedTypeDef}}
!ImportedConstructors !*VarHeap !*TypeHeaps !*ExpressionHeap
-> (!ImportedFunctions, !*{! Group}, !*{#FunDef}, !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*VarHeap, !*TypeHeaps, !*ExpressionHeap)
-> (!ImportedFunctions, !*{!Component}, !*{#FunDef}, !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*VarHeap, !*TypeHeaps, !*ExpressionHeap)
......@@ -26,9 +26,9 @@ addLetVars [{lb_dst} : binds] [bind_type : bind_types] bound_vars
addLetVars [] [] bound_vars
= bound_vars
convertCasesOfFunctions :: !*{!Group} !Int !{#{#FunType}} !{#CommonDefs}
convertCasesOfFunctions :: !*{!Component} !Int !{#{#FunType}} !{#CommonDefs}
!*{#FunDef} !*{#{#CheckedTypeDef}} !ImportedConstructors !*VarHeap !*TypeHeaps !*ExpressionHeap
-> (!ImportedFunctions, !*{!Group},
-> (!ImportedFunctions, !*{!Component},
!*{#FunDef},!*{#{#CheckedTypeDef}},!ImportedConstructors,!*VarHeap,!*TypeHeaps,!*ExpressionHeap)
convertCasesOfFunctions groups main_dcl_module_n dcl_functions common_defs fun_defs imported_types imported_conses var_heap type_heaps expr_heap
#! nr_of_funs = size fun_defs
......@@ -47,7 +47,16 @@ where
// otherwise
# (group, groups) = groups![group_nr]
= convert_groups (inc group_nr) groups dcl_functions common_defs main_dcl_module_n
(foldSt (convert_function group_nr dcl_functions common_defs main_dcl_module_n) group.group_members fun_defs_and_ci)
(convert_functions group.component_members group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci)
convert_functions (ComponentMember member members) group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci
# fun_defs_and_ci = convert_function group_nr dcl_functions common_defs main_dcl_module_n member fun_defs_and_ci
= convert_functions members group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci
convert_functions (GeneratedComponentMember member _ members) group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci
# fun_defs_and_ci = convert_function group_nr dcl_functions common_defs main_dcl_module_n member fun_defs_and_ci
= convert_functions members group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci
convert_functions NoComponentMembers group_nr dcl_functions common_defs main_dcl_module_n fun_defs_and_ci
= fun_defs_and_ci
convert_function group_index dcl_functions common_defs main_dcl_module_n fun (fun_defs, collected_imports, cs)
# ({fun_body,fun_type}, fun_defs) = fun_defs![fun]
......@@ -1231,14 +1240,14 @@ newFunctionWithType opt_id fun_bodies local_vars fun_type group_index (cs_next_f
cs_fun_heap <:= (fun_def_ptr, FI_Function { gf_fun_def = fun_def, gf_instance_info = II_Empty,
gf_fun_index = cs_next_fun_nr, gf_cons_args = {cc_size=0, cc_args = [], cc_linear_bits = [], cc_producer = False} })))
addNewFunctionsToGroups :: !{#.CommonDefs} FunctionHeap ![FunctionInfoPtr] !Int !*{! Group} !*{#{# CheckedTypeDef}} !ImportedFunctions !*TypeHeaps !*VarHeap
-> (!*{! Group}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
addNewFunctionsToGroups :: !{#.CommonDefs} FunctionHeap ![FunctionInfoPtr] !Int !*{!Component} !*{#{# CheckedTypeDef}} !ImportedFunctions !*TypeHeaps !*VarHeap
-> (!*{!Component}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
addNewFunctionsToGroups common_defs fun_heap new_functions main_dcl_module_n groups imported_types imported_conses type_heaps var_heap
= foldSt (add_new_function_to_group fun_heap common_defs) new_functions (groups, [], imported_types, imported_conses, type_heaps, var_heap)
where
add_new_function_to_group :: !FunctionHeap !{# CommonDefs} !FunctionInfoPtr
!(!*{! Group}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
-> (!*{! Group}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
!(!*{!Component}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
-> (!*{!Component}, ![FunDef], !*{#{# CheckedTypeDef}}, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
add_new_function_to_group fun_heap common_defs fun_ptr (groups, fun_defs, imported_types, imported_conses, type_heaps, var_heap)
# (FI_Function {gf_fun_def,gf_fun_index}) = sreadPtr fun_ptr fun_heap
{fun_type = Yes ft, fun_info = {fi_group_index, fi_properties}} = gf_fun_def
......@@ -1246,7 +1255,7 @@ where
= convertSymbolType (fi_properties bitand FI_HasTypeSpec == 0) common_defs ft main_dcl_module_n
imported_types imported_conses type_heaps var_heap
# (group, groups) = groups![fi_group_index]
= ({ groups & [fi_group_index] = { group & group_members = [gf_fun_index : group.group_members]} },
= ({ groups & [fi_group_index] = { group & component_members = ComponentMember gf_fun_index group.component_members} },
[ { gf_fun_def & fun_type = Yes ft }: fun_defs], imported_types, imported_conses, type_heaps, var_heap)
:: ConvertState =
......
......@@ -5,7 +5,8 @@ definition module frontend
from scanner import ::SearchPaths
from general import ::Optional (Yes, No)
import checksupport, transform, overloading
import checksupport, overloading
from partition import ::Component(..),::ComponentMembers
:: FrontEndOptions
= { feo_up_to_phase :: !FrontEndPhase
......@@ -18,7 +19,7 @@ import checksupport, transform, overloading
:: FrontEndSyntaxTree
= { fe_icl :: !IclModule
, fe_dcls :: !{#DclModule}
, fe_components :: !{!Group}
, fe_components :: !{!Component}
, fe_arrayInstances :: !ArrayAndListInstances
}
......
......@@ -47,7 +47,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
#! n_cached_dcl_modules=size cached_dcl_modules
# (ok, icl_mod, dcl_mods, components, cached_dcl_macros,main_dcl_module_n,heaps, predef_symbols, symbol_table, error, directly_imported_dcl_modules)
# (ok, icl_mod, dcl_mods, groups, cached_dcl_macros,main_dcl_module_n,heaps, predef_symbols, symbol_table, error, directly_imported_dcl_modules)
= checkModule mod global_fun_range mod_functions support_dynamics dynamic_type_used dcl_module_n_in_cache optional_dcl_mod modules cached_dcl_modules cached_dcl_macros predef_symbols symbol_table error heaps
hash_table = { hash_table & hte_symbol_heap = symbol_table}
......@@ -83,7 +83,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
| options.feo_up_to_phase == FrontEndPhaseCheck
# array_instances = {ali_array_first_instance_indices=[],ali_list_first_instance_indices=[],ali_tail_strict_list_first_instance_indices=[],ali_instances_range={ir_from=0,ir_to=0}}
= frontSyntaxTree cached_dcl_macros dcl_mods main_dcl_module_n
predef_symbols hash_table files error io out tcl_file icl_mod dcl_mods fun_defs components array_instances heaps
predef_symbols hash_table files error io out tcl_file icl_mod dcl_mods fun_defs (groups_to_components groups) array_instances heaps
# error_admin = {ea_file = error, ea_loc = [], ea_ok = True }
/*
......@@ -130,13 +130,14 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
dcl_common_defs dcl_mods
= {dcl_common \\ {dcl_common} <-: dcl_mods }
#! (ti_common_defs, components, fun_defs, generic_ranges, td_infos, heaps, hash_table, predef_symbols, dcl_mods, error_admin)
#! (ti_common_defs, groups, fun_defs, generic_ranges, td_infos, heaps, hash_table, predef_symbols, dcl_mods, error_admin)
= case options.feo_generics of
True
-> convertGenerics main_dcl_module_n icl_used_module_numbers ti_common_defs components fun_defs
-> convertGenerics main_dcl_module_n icl_used_module_numbers ti_common_defs groups fun_defs
td_infos heaps hash_table predef_symbols dcl_mods error_admin
False
-> (ti_common_defs, components, fun_defs, [], td_infos, heaps, hash_table, predef_symbols, dcl_mods, error_admin)
-> (ti_common_defs, groups, fun_defs, [], td_infos, heaps, hash_table, predef_symbols, dcl_mods, error_admin)
# (icl_common, ti_common_defs) = replace copied_ti_common_defs main_dcl_module_n saved_main_dcl_common
with
copied_ti_common_defs :: .{#CommonDefs} // needed for Clean 2.0 to disambiguate overloading of replace
......@@ -161,7 +162,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
= (No,{},{},main_dcl_module_n,predef_symbols, hash_table, files, error, io, out, tcl_file, heaps)
# (ok, fun_defs, array_instances, common_defs, imported_funs, type_def_infos, heaps, predef_symbols, error,out)
= typeProgram components main_dcl_module_n fun_defs icl_function_indices.ifi_specials_indices list_inferred_types icl_common icl_import icl_qualified_imports dcl_mods icl_used_module_numbers td_infos heaps predef_symbols error out
= typeProgram groups main_dcl_module_n fun_defs icl_function_indices.ifi_specials_indices list_inferred_types icl_common icl_import icl_qualified_imports dcl_mods icl_used_module_numbers td_infos heaps predef_symbols error out
| not ok
= (No,{},{},main_dcl_module_n,predef_symbols, hash_table, files, error, io, out, tcl_file, heaps)
......@@ -214,8 +215,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
# exported_functions = exported_global_functions ++ [dcl_instances,dcl_specials,dcl_gencases,dcl_type_funs]
# (components, fun_defs, predef_symbols, var_heap, expression_heap, error_admin)
= case options.feo_strip_unused of
True -> partitionateFunctions` (fun_defs -*-> "partitionateFunctions`")
exported_functions
True -> partitionateFunctions` fun_defs exported_functions
main_dcl_module_n def_min def_max predef_symbols var_heap expression_heap error_admin
_
-> case options.feo_fusion of
......@@ -314,6 +314,12 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
= (pds_def, predef_symbols)
= (NoIndex, predef_symbols)
groups_to_components groups
= {{component_members=group_members_to_component_members group_members} \\ {group_members}<-:groups}
where
group_members_to_component_members [e:l] = ComponentMember e (group_members_to_component_members l)
group_members_to_component_members [] = NoComponentMembers
newSymbolTable :: !Int -> *{# SymbolTableEntry}
newSymbolTable size
= createArray size { ste_index = NoIndex, ste_def_level = -1, ste_kind = STE_Empty, ste_previous = abort "PreviousPlaceholder"}
......
......@@ -2,14 +2,21 @@ definition module partition
import syntax, transform
partitionateFunctions :: !*{# FunDef} ![IndexRange] -> (!*{! Group}, !*{# FunDef})
:: Component = { component_members :: !ComponentMembers }
:: ComponentMembers
= ComponentMember !Int !ComponentMembers
| GeneratedComponentMember !Int !FunctionInfoPtr !ComponentMembers
| NoComponentMembers
partitionateFunctions :: !*{# FunDef} ![IndexRange] -> (!*{!Component}, !*{# FunDef})
partitionateFunctions`
:: !*{# FunDef} ![IndexRange] !Index !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!*{! Group}, !*{# FunDef}, !*PredefinedSymbols, !*VarHeap, !*ExpressionHeap, !*ErrorAdmin)
-> (!*{!Component}, !*{# FunDef}, !*PredefinedSymbols, !*VarHeap, !*ExpressionHeap, !*ErrorAdmin)
stripStrictLets :: !*{# FunDef} !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin -> (!*{# FunDef}, !*PredefinedSymbols, !*VarHeap, !*ExpressionHeap, !*ErrorAdmin)
partitionateFunctions``
:: !Int !Int ![FunctionInfoPtr] !*{# FunDef} ![Int] !Index !Int !Int !*FunctionHeap !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!Int, ![Group], !*{# FunDef}, !*FunctionHeap, !*PredefinedSymbols, !*VarHeap, !*ExpressionHeap, !*ErrorAdmin)
:: !Int !Int !*{#FunDef} !ComponentMembers !Index !Int !Int !*FunctionHeap !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!Int, ![Component], !*{#FunDef}, !*FunctionHeap, !*PredefinedSymbols, !*VarHeap, !*ExpressionHeap, !*ErrorAdmin)
This diff is collapsed.
......@@ -588,7 +588,10 @@ NoGlobalIndex :== {gi_module=NoIndex,gi_index=NoIndex}
:: ModuleIndex:==Index;
:: DclFunctionIndex:==Index;
:: FunCall = FunCall !Index !Level | MacroCall !ModuleIndex !Index Level | DclFunCall !ModuleIndex !DclFunctionIndex;
:: FunCall = FunCall !Index !Level
| MacroCall !ModuleIndex !Index Level
| DclFunCall !ModuleIndex !DclFunctionIndex
| GeneratedFunCall !Index !FunctionInfoPtr;
FI_IsMacroFun :== 1 // whether the function is a local function of a macro
FI_HasTypeSpec :== 2 // whether the function has u user defined type
......
......@@ -5,9 +5,9 @@ import StdEnv
import syntax, transform
import classify, partition
transformGroups :: !CleanupInfo !Int !Int !Int !Int !*{!Group} !*{#FunDef} !*{!.ConsClasses} !{# CommonDefs} !{# {# FunType} }
transformGroups :: !CleanupInfo !Int !Int !Int !Int !*{!Component} !*{#FunDef} !*{!.ConsClasses} !{# CommonDefs} !{# {# FunType} }
!*ImportedTypes !*TypeDefInfos !*VarHeap !*TypeHeaps !*ExpressionHeap !Bool !*File !*PredefinedSymbols
-> (!*{!Group}, !*{#FunDef}, !*ImportedTypes, !ImportedConstructors, !*VarHeap, !*TypeHeaps, !*ExpressionHeap, !*File, !*PredefinedSymbols)
-> (!*{!Component}, !*{#FunDef}, !*ImportedTypes, !ImportedConstructors, !*VarHeap, !*TypeHeaps, !*ExpressionHeap, !*File, !*PredefinedSymbols)
convertSymbolType :: !Bool !{# CommonDefs} !SymbolType !Int !*ImportedTypes !ImportedConstructors !*TypeHeaps !*VarHeap
-> (!SymbolType, !*ImportedTypes, !ImportedConstructors, !*TypeHeaps, !*VarHeap)
......
This diff is collapsed.
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