Commit a36ba1da authored by John van Groningen's avatar John van Groningen
Browse files

always recompute components of functions after fusion pass (module trans),...

always recompute components of functions after fusion pass (module trans), ignore -strip, remove function stripStrictLets
parent 0d1a0d21
...@@ -216,17 +216,8 @@ frontEndInterface opt_file_dir_time options mod_ident search_paths cached_dcl_mo ...@@ -216,17 +216,8 @@ frontEndInterface opt_file_dir_time options mod_ident search_paths cached_dcl_mo
sri -> [{ir_from=sri,ir_to=inc sri},icl_exported_global_functions] sri -> [{ir_from=sri,ir_to=inc sri},icl_exported_global_functions]
# exported_functions = exported_global_functions ++ [dcl_instances,dcl_specials,dcl_gencases,dcl_type_funs] # 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) # (components, fun_defs, predef_symbols, var_heap, expression_heap, error_admin)
= case options.feo_fusion.strip_unused of = partitionateFunctions` fun_defs (exported_functions ++ [icl_function_indices.ifi_type_function_indices!!1])
True -> partitionateFunctions` fun_defs (exported_functions ++ [icl_function_indices.ifi_type_function_indices!!1])
main_dcl_module_n def_min def_max predef_symbols var_heap expression_heap error_admin main_dcl_module_n def_min def_max predef_symbols var_heap expression_heap error_admin
_
-> case options.feo_fusion.compile_with_fusion of
True
# (fun_defs,predef_symbols,var_heap,expression_heap,error_admin)
= stripStrictLets fun_defs main_dcl_module_n def_min def_max predef_symbols var_heap expression_heap error_admin
-> (components, fun_defs, predef_symbols, var_heap, expression_heap, error_admin)
_ -> (components, fun_defs, predef_symbols, var_heap, expression_heap, error_admin)
# error = error_admin.ea_file # error = error_admin.ea_file
| not error_admin.ea_ok | not error_admin.ea_ok
# heaps = {hp_var_heap=var_heap, hp_type_heaps=type_heaps, hp_expression_heap=expression_heap,hp_generic_heap=heaps.hp_generic_heap} # heaps = {hp_var_heap=var_heap, hp_type_heaps=type_heaps, hp_expression_heap=expression_heap,hp_generic_heap=heaps.hp_generic_heap}
......
...@@ -7,8 +7,5 @@ partitionateFunctions :: !*{# FunDef} ![IndexRange] -> (!*{!Component}, !*{# Fun ...@@ -7,8 +7,5 @@ partitionateFunctions :: !*{# FunDef} ![IndexRange] -> (!*{!Component}, !*{# Fun
partitionateFunctions` :: !*{#FunDef} ![IndexRange] !Index !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin partitionateFunctions` :: !*{#FunDef} ![IndexRange] !Index !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin) -> (!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin)
stripStrictLets :: !*{#FunDef} !Int !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin)
partitionateFunctions`` :: !Int !Int !*{#FunDef} !ComponentMembers !Index !Int !Int !*FunctionHeap !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin partitionateFunctions`` :: !Int !Int !*{#FunDef} !ComponentMembers !Index !Int !Int !*FunctionHeap !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!Int,![Component],!*{#FunDef},!*FunctionHeap,!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin) -> (!Int,![Component],!*{#FunDef},!*FunctionHeap,!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin)
...@@ -88,20 +88,6 @@ where ...@@ -88,20 +88,6 @@ where
, pi_collect` :: !.CountVarsFindCallsState , pi_collect` :: !.CountVarsFindCallsState
} }
stripStrictLets :: !*{#FunDef} !Int !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin)
stripStrictLets fun_defs main_dcl_module_n def_min def_max predef_symbols var_heap sym_heap error_admin
# (predef_alias_dummy,predef_symbols) = predef_symbols![PD_DummyForStrictAliasFun]
# collect_state = {cvfcs_var_heap = var_heap, cvfcs_expr_heap = sym_heap, cvfcs_error = error_admin, cvfcs_fun_calls = []}
# collect_info
= {cvfci_predef_alias_dummy=predef_alias_dummy, cvfci_main_dcl_module_n=main_dcl_module_n, cvfci_def_min=def_min, cvfci_def_max=def_max}
# (fun_defs,collect_state) = aMapSt (determine_ref_counts collect_info) fun_defs collect_state
= (fun_defs,predef_symbols,collect_state.cvfcs_var_heap, collect_state.cvfcs_expr_heap, collect_state.cvfcs_error)
where
aMapSt f a s
# (l,s) = mapSt f [e \\ e <-: a] s
= ({e \\ e <- l},s)
partitionateFunctions` :: !*{#FunDef} ![IndexRange] !Index !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin partitionateFunctions` :: !*{#FunDef} ![IndexRange] !Index !Int !Int !*PredefinedSymbols !*VarHeap !*ExpressionHeap !*ErrorAdmin
-> (!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin) -> (!*{!Component},!*{#FunDef},!*PredefinedSymbols,!*VarHeap,!*ExpressionHeap,!*ErrorAdmin)
partitionateFunctions` fun_defs ranges main_dcl_module_n def_min def_max predef_symbols var_heap sym_heap error_admin partitionateFunctions` fun_defs ranges main_dcl_module_n def_min def_max predef_symbols var_heap sym_heap error_admin
......
...@@ -197,7 +197,8 @@ parseCommandLine [arg1=:"-generic_fusion":args] options ...@@ -197,7 +197,8 @@ parseCommandLine [arg1=:"-generic_fusion":args] options
# (args,modules,options) = parseCommandLine args {options & fusion_options.generic_fusion = True} # (args,modules,options) = parseCommandLine args {options & fusion_options.generic_fusion = True}
= ([arg1:args],modules,options) = ([arg1:args],modules,options)
parseCommandLine [arg1=:"-strip":args] options parseCommandLine [arg1=:"-strip":args] options
= parseCommandLine args {options & fusion_options.strip_unused = True} // ignored
= parseCommandLine args options
parseCommandLine ["-generics":args] options parseCommandLine ["-generics":args] options
// enable generics // enable generics
= parseCommandLine args options = parseCommandLine args options
......
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