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
| is_called_before ei_fun_index calls
-> (e_state,cs)
# 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)
/* also imported unqualified */
STE_DclMacroOrLocalMacroFunction calls
......@@ -1480,7 +1480,7 @@ checkQualifiedIdentExpression free_vars module_id ident_name is_expr_list e_inpu
| is_called_before ei_fun_index calls
-> (e_state,cs)
# 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)
_
| macro_is_called_before decl_index mod_index es_calls
......
......@@ -17,12 +17,9 @@ SwitchCurriedFusion fuse xtra dont_fuse :== fuse
SwitchExtraCurriedFusion fuse macro :== fuse//(fuse && macro)//fuse
SwitchTrivialFusion fuse dont_fuse :== fuse
SwitchUnusedFusion fuse dont_fuse :== fuse
SwitchReanalyseFunction rean dont_rean :== dont_rean
SwitchTransformConstants tran dont_tran :== tran
SwitchSpecialFusion fuse dont_fuse :== fuse
SwitchArityChecks check dont_check :== check
SwitchNWayFusion fuse dont_fuse :== dont_fuse
SwitchDirectConsumerUnfold unfold dont :== dont
SwitchAutoFoldCaseInCase fold dont :== fold
SwitchAutoFoldAppInCase fold dont :== fold
SwitchAlwaysIntroduceCaseFunction yes no :== no//yes
......@@ -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
= possiblyAddStrictLetBinds expr strict_let_binds ti
# (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)
= (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_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
# (expr,ti) = transformApplication { app & app_symb = app_symb`, app_args = app_args } extra_args ro ti // ---> ("known instance",gf_fun_index)
= possiblyAddStrictLetBinds expr strict_let_binds ti
| SwitchTrivialFusion ro.ro_transform_fusion False
= 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
# (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)
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
| 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 })
......@@ -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
-> (var, free_vars, dynamics, { cos & cos_var_heap = cos_var_heap })
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 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