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

add -generic_fusion option

parent 3c204f52
......@@ -3,7 +3,7 @@ definition module trans
import StdEnv
import syntax,classify,predef
:: FusionOptions = { compile_with_fusion :: !Bool, strip_unused :: !Bool }
:: FusionOptions = { compile_with_fusion :: !Bool, generic_fusion :: !Bool, strip_unused :: !Bool }
transformGroups :: !CleanupInfo !Int !Int !Int !Int !*{!Component} !*{#FunDef} !*{!.ConsClasses} !{# CommonDefs} !{# {# FunType} }
!*ImportedTypes !*TypeDefInfos !*VarHeap !*TypeHeaps !*ExpressionHeap !FusionOptions !*File !*PredefinedSymbols
......
......@@ -4258,7 +4258,7 @@ transformGroups :: !CleanupInfo !Int !Int !Int !Int !*{!Component} !*{#FunDef} !
!*ImportedTypes !*TypeDefInfos !*VarHeap !*TypeHeaps !*ExpressionHeap !FusionOptions !*File !*PredefinedSymbols
-> (!*{!Component}, !*{#FunDef}, !*ImportedTypes, !ImportedConstructors, !*VarHeap, !*TypeHeaps, !*ExpressionHeap, !*File, !*PredefinedSymbols)
transformGroups cleanup_info main_dcl_module_n ro_StdStrictLists_module_n def_min def_max groups fun_defs cons_args common_defs imported_funs
imported_types type_def_infos var_heap type_heaps symbol_heap {compile_with_fusion} error predef_symbols
imported_types type_def_infos var_heap type_heaps symbol_heap {compile_with_fusion,generic_fusion} error predef_symbols
#! nr_of_funs = size fun_defs
# initial_ti = { ti_fun_defs = fun_defs
, ti_instances = createArray nr_of_funs II_Empty
......@@ -4300,8 +4300,6 @@ transformGroups cleanup_info main_dcl_module_n ro_StdStrictLists_module_n def_mi
fun_defs = { fundef \\ fundef <- [ fundef \\ fundef <-: fun_defs ] ++ new_fun_defs }
= (groups, fun_defs, imported_types, collected_imports, var_heap, type_heaps, symbol_heap, ti.ti_error_file, ti.ti_predef_symbols)
where
generic_fusion = False
transform_groups :: !Int ![Component] ![Component] !Int !{#CommonDefs} !{#{#FunType}}
!*{#{#CheckedTypeDef}} ![Global Int] ![Int] !*TransformInfo
-> *(![Component],!.{#{#CheckedTypeDef}},![Global Int],![Int],!*TransformInfo)
......
......@@ -123,7 +123,7 @@ InitialCoclOptions =
, outMode= FWriteText
, searchPaths= {sp_locations = [], sp_paths = []}
, listTypes = {lto_showAttributes = True, lto_listTypesKind = ListTypesNone}
, fusion_options = {compile_with_fusion = False, strip_unused = False}
, fusion_options = {compile_with_fusion = False, generic_fusion = False, strip_unused = False}
, compile_for_dynamics = False
, dump_core = False
, compile_with_generics = True
......@@ -187,6 +187,8 @@ parseCommandLine [arg1=:"-fusion":args] options
// switch on fusion transformations
# (args,modules,options) = parseCommandLine args {options & fusion_options.compile_with_fusion = True}
= ([arg1:args],modules,options)
parseCommandLine ["-generic_fusion":args] options
= parseCommandLine args {options & fusion_options.generic_fusion = True}
parseCommandLine [arg1=:"-dump":args] options
= parseCommandLine args {options & dump_core = True}
parseCommandLine [arg1=:"-strip":args] options
......
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