aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartinw2000-06-14 10:38:03 +0000
committermartinw2000-06-14 10:38:03 +0000
commit80a9aaf9d6fb202f3bc63deaec186401ff080ba0 (patch)
tree38eb06236cbd1ec6967a86416496d64f9a5daa8e
parentnow higher order function elimination works also for imported functions (diff)
bugfix: the compiler was unable to deal with macros that called a local
function that had the same name as the macro: ////////// module t5 import t6 Start = f f ///////// definition module t6 f x :== f x where f x = x ///////// caused an abort git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@162 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/transform.icl9
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/transform.icl b/frontend/transform.icl
index 485e464..539e0ac 100644
--- a/frontend/transform.icl
+++ b/frontend/transform.icl
@@ -721,10 +721,15 @@ where
removeFunctionCallsFromSymbolTable calls fun_defs symbol_table
= foldSt remove_function_call_from_symbol_table calls (fun_defs, symbol_table)
where
+
remove_function_call_from_symbol_table {fc_index} (fun_defs, symbol_table)
# ({fun_symb = { id_info }}, fun_defs) = fun_defs![fc_index]
- # (entry, symbol_table) = readPtr id_info symbol_table
- = (fun_defs, symbol_table <:= (id_info, entry.ste_previous))
+ (entry, symbol_table) = readPtr id_info symbol_table
+ = case entry.ste_kind of
+ STE_Called indexes
+ -> (fun_defs, symbol_table <:= (id_info, entry.ste_previous))
+ _
+ -> (fun_defs, symbol_table)
expandMacrosInBody fi_calls {cb_args,cb_rhs} fun_defs mod_index modules es=:{es_symbol_table}