diff options
author | johnvg | 2016-06-06 13:41:12 +0000 |
---|---|---|
committer | johnvg | 2016-06-06 13:41:12 +0000 |
commit | 8832af8606748580b43b926bff5c347274417284 (patch) | |
tree | 8f06b6102f9214ecc55ac72bb65527e5c3c4a218 /frontend/overloading.icl | |
parent | fix previous commit (diff) |
set FI_HasTypeCodes in fi_properties if a function contains type codes and
should be converted in module convertDynamics, instead of storing a list with one nilPtr in fi_dynamics,
remove unnecessary Let expressions with unused variables by
initializing with VI_NotUsed instead of VI_Empty
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2724 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/overloading.icl')
-rw-r--r-- | frontend/overloading.icl | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/frontend/overloading.icl b/frontend/overloading.icl index ce5858e..b94f3d2 100644 --- a/frontend/overloading.icl +++ b/frontend/overloading.icl @@ -1340,7 +1340,6 @@ where # (fun_def, fun_defs) = fun_defs![fun_index] (CheckedType st=:{st_context,st_args}, fun_env) = fun_env![fun_index] {fun_body = TransformedBody {tb_args,tb_rhs},fun_info,fun_arity,fun_ident,fun_pos} = fun_def - var_heap = mark_FPC_arguments st_args tb_args var_heap error = setErrorAdmin (newPosition fun_ident fun_pos) error @@ -1357,19 +1356,12 @@ where # {ui_instance_calls, ui_local_vars, ui_symbol_heap, ui_var_heap, ui_fun_defs, ui_fun_env, ui_has_type_codes, ui_error, ui_x = {x_type_code_info = type_code_info, x_predef_symbols = predef_symbols}} = ui # (tb_args, var_heap) = foldSt retrieve_class_argument rev_variables (tb_args, ui_var_heap) - fun_info = mark_type_codes ui_has_type_codes fun_info - fun_def = { fun_def & fun_body = TransformedBody {tb_args = tb_args, tb_rhs = tb_rhs}, fun_arity = length tb_args, - fun_info = { fun_info & fi_calls = fun_info.fi_calls ++ ui_instance_calls, fi_local_vars = ui_local_vars } } + fun_def & fun_body = TransformedBody {tb_args = tb_args, tb_rhs = tb_rhs}, fun_arity = length tb_args, + fun_info = {fun_info & fi_calls = fun_info.fi_calls ++ ui_instance_calls, fi_local_vars = ui_local_vars, + fi_properties = fun_info.fi_properties bitor FI_HasTypeCodes} #! ok = ui_error.ea_ok = (ok, { ui_fun_defs & [fun_index] = fun_def }, ui_fun_env, ui_symbol_heap, type_code_info, var_heap, ui_error, predef_symbols) = (False, fun_defs, fun_env, symbol_heap, type_code_info, var_heap, error, predef_symbols) - where - // this is a ugly way to mark this function for conversion in convertDynamics - // FIXME: find a better way to mark the function - mark_type_codes True info=:{fi_dynamics=[]} - = {info & fi_dynamics = [nilPtr]} - mark_type_codes _ info - = info mark_FPC_arguments :: ![AType] ![FreeVar] !*VarHeap -> *VarHeap mark_FPC_arguments st_args tb_args var_heap |