From 6e482ae3dbdc0f9a165889344b9742af12689421 Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 9 Aug 2012 12:12:44 +0000 Subject: remove VI_Expression pointer values after copying a case alternative in the fusion algorithm git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2148 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/trans.icl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/trans.icl b/frontend/trans.icl index b10e941..000b57b 100644 --- a/frontend/trans.icl +++ b/frontend/trans.icl @@ -651,7 +651,8 @@ where (new_expr, ti_symbol_heap) = possibly_add_let zipped_ap_vars_and_args ap_expr not_unfoldable cons_type_args ro ti.ti_symbol_heap cons_type_args_strictness copy_state = { cs_var_heap = ti_var_heap, cs_symbol_heap = ti_symbol_heap, cs_opt_type_heaps = No,cs_cleanup_info=ti.ti_cleanup_info } (unfolded_expr, copy_state) = copy new_expr {ci_handle_aci_free_vars = LeaveAciFreeVars} copy_state - ti = { ti & ti_var_heap = copy_state.cs_var_heap, ti_symbol_heap = copy_state.cs_symbol_heap,ti_cleanup_info=copy_state.cs_cleanup_info } + ti_var_heap = foldSt (\({fv_info_ptr}, arg) -> writeVarInfo fv_info_ptr VI_Empty) unfoldable_args copy_state.cs_var_heap + ti & ti_var_heap = ti_var_heap, ti_symbol_heap = copy_state.cs_symbol_heap,ti_cleanup_info=copy_state.cs_cleanup_info (final_expr, ti) = transform unfolded_expr { ro & ro_root_case_mode = NotRootCase } ti // | False ---> ("instantiate",app_args,ap_vars,ap_expr,final_expr,unfoldables) = undef = (Yes final_expr, ti) -- cgit v1.2.3