diff options
author | johnvg | 2000-10-31 14:57:57 +0000 |
---|---|---|
committer | johnvg | 2000-10-31 14:57:57 +0000 |
commit | 130e0fc83e99ed9a6333478890c62563ed804046 (patch) | |
tree | 2744b031e3002ff09690636df7e79504ec6d9bb0 /frontend/checksupport.icl | |
parent | Sjaak: Bug in instance types removed, (diff) |
bug fix in determining SK_LocalMacroFunction (instead of SK_Function)
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@274 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/checksupport.icl')
-rw-r--r-- | frontend/checksupport.icl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/frontend/checksupport.icl b/frontend/checksupport.icl index 22d31f3..069f924 100644 --- a/frontend/checksupport.icl +++ b/frontend/checksupport.icl @@ -386,18 +386,20 @@ where -> remove_declared_symbols_in_array (symbol_index+1) symbols symbol_table = symbol_table -addLocalFunctionDefsToSymbolTable :: !Level !Index !Index !u:{#FunDef} !*SymbolTable !*ErrorAdmin -> (!u:{# FunDef}, !*SymbolTable, !*ErrorAdmin) -addLocalFunctionDefsToSymbolTable level from_index to_index fun_defs symbol_table error +addLocalFunctionDefsToSymbolTable :: !Level !Index !Index !Bool !*{#FunDef} !*SymbolTable !*ErrorAdmin -> (!*{# FunDef}, !*SymbolTable, !*ErrorAdmin) +addLocalFunctionDefsToSymbolTable level from_index to_index is_macro_fun fun_defs symbol_table error | from_index == to_index = (fun_defs, symbol_table, error) # (fun_def, fun_defs) = fun_defs![from_index] - (symbol_table, error) = addDefToSymbolTable level from_index fun_def.fun_symb (STE_FunctionOrMacro []) symbol_table error - = addLocalFunctionDefsToSymbolTable level (inc from_index) to_index fun_defs symbol_table error + # (symbol_table, error) = addDefToSymbolTable level from_index fun_def.fun_symb (STE_FunctionOrMacro []) symbol_table error + | is_macro_fun + # fun_defs = {fun_defs & [from_index].fun_info.fi_is_macro_fun=is_macro_fun} + = addLocalFunctionDefsToSymbolTable level (inc from_index) to_index is_macro_fun fun_defs symbol_table error + = addLocalFunctionDefsToSymbolTable level (inc from_index) to_index is_macro_fun fun_defs symbol_table error NewEntry symbol_table symb_ptr def_kind def_index level previous :== symbol_table <:= (symb_ptr,{ ste_kind = def_kind, ste_index = def_index, ste_def_level = level, ste_previous = previous }) - - + addDefToSymbolTable :: !Level !Index !Ident !STE_Kind !*SymbolTable !*ErrorAdmin -> (!* SymbolTable, !*ErrorAdmin) addDefToSymbolTable level def_index def_ident=:{id_info} def_kind symbol_table error #! entry = sreadPtr id_info symbol_table |