Commit 3ecacdae authored by John van Groningen's avatar John van Groningen
Browse files

fix uniqueness type bug (not detected because of bug in refmark)

parent a3da2cd8
...@@ -1472,7 +1472,7 @@ checkQualifiedIdentExpression free_vars module_id ident_name is_expr_list e_inpu ...@@ -1472,7 +1472,7 @@ checkQualifiedIdentExpression free_vars module_id ident_name is_expr_list e_inpu
| is_called_before ei_fun_index calls | is_called_before ei_fun_index calls
-> (e_state,cs) -> (e_state,cs)
# entry = {entry & ste_kind = STE_DclMacroOrLocalMacroFunction [ ei_fun_index : calls ]} # entry = {entry & ste_kind = STE_DclMacroOrLocalMacroFunction [ ei_fun_index : calls ]}
# cs = {cs & cs_symbol_table = writePtr symbol_table_ptr entry cs_symbol_table} # cs = {cs & cs_symbol_table = writePtr symbol_table_ptr entry cs.cs_symbol_table}
-> ({e_state & es_calls = [MacroCall ste_mod_index ste_index ste_def_level : es_calls ]},cs) -> ({e_state & es_calls = [MacroCall ste_mod_index ste_index ste_def_level : es_calls ]},cs)
/* also imported unqualified */ /* also imported unqualified */
STE_DclMacroOrLocalMacroFunction calls STE_DclMacroOrLocalMacroFunction calls
...@@ -1480,7 +1480,7 @@ checkQualifiedIdentExpression free_vars module_id ident_name is_expr_list e_inpu ...@@ -1480,7 +1480,7 @@ checkQualifiedIdentExpression free_vars module_id ident_name is_expr_list e_inpu
| is_called_before ei_fun_index calls | is_called_before ei_fun_index calls
-> (e_state,cs) -> (e_state,cs)
# entry = {entry & ste_kind = STE_DclMacroOrLocalMacroFunction [ ei_fun_index : calls ]} # entry = {entry & ste_kind = STE_DclMacroOrLocalMacroFunction [ ei_fun_index : calls ]}
# cs = {cs & cs_symbol_table = writePtr symbol_table_ptr entry cs_symbol_table} # cs = {cs & cs_symbol_table = writePtr symbol_table_ptr entry cs.cs_symbol_table}
-> ({e_state & es_calls = [MacroCall ei_mod_index ste_index ste_def_level : es_calls ]},cs) -> ({e_state & es_calls = [MacroCall ei_mod_index ste_index ste_def_level : es_calls ]},cs)
_ _
| macro_is_called_before decl_index mod_index es_calls | macro_is_called_before decl_index mod_index es_calls
......
...@@ -17,12 +17,9 @@ SwitchCurriedFusion fuse xtra dont_fuse :== fuse ...@@ -17,12 +17,9 @@ SwitchCurriedFusion fuse xtra dont_fuse :== fuse
SwitchExtraCurriedFusion fuse macro :== fuse//(fuse && macro)//fuse SwitchExtraCurriedFusion fuse macro :== fuse//(fuse && macro)//fuse
SwitchTrivialFusion fuse dont_fuse :== fuse SwitchTrivialFusion fuse dont_fuse :== fuse
SwitchUnusedFusion fuse dont_fuse :== fuse SwitchUnusedFusion fuse dont_fuse :== fuse
SwitchReanalyseFunction rean dont_rean :== dont_rean
SwitchTransformConstants tran dont_tran :== tran SwitchTransformConstants tran dont_tran :== tran
SwitchSpecialFusion fuse dont_fuse :== fuse SwitchSpecialFusion fuse dont_fuse :== fuse
SwitchArityChecks check dont_check :== check SwitchArityChecks check dont_check :== check
SwitchNWayFusion fuse dont_fuse :== dont_fuse
SwitchDirectConsumerUnfold unfold dont :== dont
SwitchAutoFoldCaseInCase fold dont :== fold SwitchAutoFoldCaseInCase fold dont :== fold
SwitchAutoFoldAppInCase fold dont :== fold SwitchAutoFoldAppInCase fold dont :== fold
SwitchAlwaysIntroduceCaseFunction yes no :== no//yes SwitchAlwaysIntroduceCaseFunction yes no :== no//yes
...@@ -2428,12 +2425,12 @@ transformFunctionApplication fun_def instances cc=:{cc_size, cc_args, cc_linear_ ...@@ -2428,12 +2425,12 @@ transformFunctionApplication fun_def instances cc=:{cc_size, cc_args, cc_linear_
# (expr,ti) = transformApplication { app & app_symb = app_symb, app_args = app_args } extra_args ro ti # (expr,ti) = transformApplication { app & app_symb = app_symb, app_args = app_args } extra_args ro ti
= possiblyAddStrictLetBinds expr strict_let_binds ti = possiblyAddStrictLetBinds expr strict_let_binds ti
# (FI_Function {gf_fun_index, gf_fun_def}, ti_fun_heap) = readPtr fun_def_ptr ti_fun_heap # (FI_Function {gf_fun_index, gf_fun_def}, ti_fun_heap) = readPtr fun_def_ptr ti_fun_heap
# ti = {ti & ti_fun_heap = ti_fun_heap}
| gf_fun_index == (-1) | gf_fun_index == (-1)
= (build_application { app & app_args = app_args } extra_args, ti) // ---> ("known failed instance") = (build_application { app & app_args = app_args } extra_args, ti) // ---> ("known failed instance")
# app_symb` = { app_symb & symb_kind = SK_GeneratedFunction fun_def_ptr gf_fun_index } # app_symb` = { app_symb & symb_kind = SK_GeneratedFunction fun_def_ptr gf_fun_index }
(app_args, extra_args) = complete_application gf_fun_def.fun_arity new_args extra_args (app_args, extra_args) = complete_application gf_fun_def.fun_arity new_args extra_args
# ti = {ti & ti_fun_heap = ti_fun_heap } // ---> ("known instance",gf_fun_index) # (expr,ti) = transformApplication { app & app_symb = app_symb`, app_args = app_args } extra_args ro ti // ---> ("known instance",gf_fun_index)
# (expr,ti) = transformApplication { app & app_symb = app_symb`, app_args = app_args } extra_args ro ti
= possiblyAddStrictLetBinds expr strict_let_binds ti = possiblyAddStrictLetBinds expr strict_let_binds ti
| SwitchTrivialFusion ro.ro_transform_fusion False | SwitchTrivialFusion ro.ro_transform_fusion False
= transform_trivial_function app app_args extra_args ro ti = transform_trivial_function app app_args extra_args ro ti
......
...@@ -2281,7 +2281,7 @@ collectUpdateVar var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors fre ...@@ -2281,7 +2281,7 @@ collectUpdateVar var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors fre
# (original, free_vars, dynamics, cos) = collectUpdateVar alias update_selectors free_vars dynamics { cos & cos_var_heap = cos_var_heap } # (original, free_vars, dynamics, cos) = collectUpdateVar alias update_selectors free_vars dynamics { cos & cos_var_heap = cos_var_heap }
-> ({ original & var_expr_ptr = var_expr_ptr }, free_vars, dynamics, cos) -> ({ original & var_expr_ptr = var_expr_ptr }, free_vars, dynamics, cos)
VI_RefFromTupleSel0 count VI_RefFromTupleSel0 count
-> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos.cos_var_heap }) -> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos_var_heap })
VI_RefFromArrayUpdate count selectors VI_RefFromArrayUpdate count selectors
| same_selections selectors update_selectors | same_selections selectors update_selectors
-> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_RefFromArrayUpdate (inc count) update_selectors) cos_var_heap }) -> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_RefFromArrayUpdate (inc count) update_selectors) cos_var_heap })
...@@ -2291,7 +2291,7 @@ collectUpdateVar var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors fre ...@@ -2291,7 +2291,7 @@ collectUpdateVar var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors fre
# cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos_var_heap # cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos_var_heap
-> (var, free_vars, dynamics, { cos & cos_var_heap = cos_var_heap }) -> (var, free_vars, dynamics, { cos & cos_var_heap = cos_var_heap })
VI_RefFromArrayUpdateOfTupleElem2 count _ VI_RefFromArrayUpdateOfTupleElem2 count _
-> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos.cos_var_heap }) -> (var, free_vars, dynamics, { cos & cos_var_heap = writePtr var_info_ptr (VI_Count (inc count) False) cos_var_heap })
collectUpdateTupleSelect2Var :: !BoundVar ![Selection] ![FreeVar] ![DynamicPtr] !*CollectState -> (!BoundVar, ![FreeVar],![DynamicPtr],!*CollectState) collectUpdateTupleSelect2Var :: !BoundVar ![Selection] ![FreeVar] ![DynamicPtr] !*CollectState -> (!BoundVar, ![FreeVar],![DynamicPtr],!*CollectState)
collectUpdateTupleSelect2Var var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors free_vars dynamics cos=:{cos_var_heap} collectUpdateTupleSelect2Var var=:{var_ident,var_info_ptr,var_expr_ptr} update_selectors free_vars dynamics cos=:{cos_var_heap}
......
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