Commit bc1011b5 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

Partition generated functions into groups

parent 1dff6355
......@@ -207,8 +207,8 @@ frontEndInterface opts mod_ident dcl_modules functions_and_macros predef_symbols
= analyseGroups common_defs array_instances main_dcl_module_n (components -*-> "Analyse") fun_defs var_heap expression_heap
-> transformGroups cleanup_info main_dcl_module_n (components -*-> "Transform") fun_defs acc_args common_defs imported_funs dcl_types used_conses_in_dynamics type_def_infos var_heap type_heaps expression_heap
FS_online
# (fun_defs,var_heap,expression_heap)
= supercompile dcl_mods main_dcl_module_n fun_defs var_heap expression_heap
# (fun_defs,var_heap,expression_heap,supercompile_range) = supercompile dcl_mods main_dcl_module_n fun_defs var_heap expression_heap
# (components, fun_defs) = partitionateFunctions fun_defs [global_fun_range, icl_instances, icl_specials, generic_range, supercompile_range]
-> (components, fun_defs, dcl_types, used_conses_in_dynamics, var_heap, type_heaps, expression_heap)
FS_none
-> (components, fun_defs, dcl_types, used_conses_in_dynamics, var_heap, type_heaps, expression_heap)
......
......@@ -27,4 +27,5 @@ supercompile ::
-> ( !*{#FunDef} // fun_defs
, !*VarHeap // var_heap
, !*ExpressionHeap // expression_heap
, IndexRange // Range of newly generated functions (already existing functions are overwritten)
)
......@@ -20,10 +20,11 @@ supercompile ::
-> ( !*{#FunDef} // fun_defs
, !*VarHeap // var_heap
, !*ExpressionHeap // expression_heap
, IndexRange // Range of newly generated functions (already existing functions are overwritten)
)
supercompile dcl_mods main_dcl_module_n fun_defs0 var_heap expression_heap
= (fundefs4,var_heap`,expression_heap`)
= (fundefs5,var_heap`,expression_heap`,generated_range)
where // Determine defined functions
(sucl_typerules,sucl_stricts,sucl_bodies,sucl_kinds,fun_defs1) = cts_function main_dcl_module_n fun_defs0
// Determine exported functions
......@@ -39,5 +40,8 @@ supercompile dcl_mods main_dcl_module_n fun_defs0 var_heap expression_heap
symredresults = fullsymred fresh_symbols sucl_module
// Create and fill new fundef array
(expression_heap`,var_heap`,fundefs4) = stc_funcdefs dcl_mods main_dcl_module_n n_fun_defs expression_heap var_heap symredresults fun_defs3
// Determine which were the newly generated functions
(newlimit,fundefs5) = usize fundefs4
generated_range = {ir_from=n_fun_defs,ir_to=newlimit}
mkglobal gmod gob = {glob_module = gmod, glob_object = gob}
Markdown is supported
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