diff options
author | ronny | 2001-11-08 09:08:11 +0000 |
---|---|---|
committer | ronny | 2001-11-08 09:08:11 +0000 |
commit | bc00e9faec978f5ee073af89bc3c20b872afa021 (patch) | |
tree | 92a3627acec68354360a477b38bb1591d3722edd /frontend | |
parent | bug fix (merge cases with unboxed and other list constructors) (diff) |
bug fix, symbol table was not cleaned up after a error in the types of a dcl module
this would give erroneous error reports and index out of range error when this dcl
module was on a cycle
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@885 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/check.icl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/check.icl b/frontend/check.icl index 6e4209f..6b0bdbf 100644 --- a/frontend/check.icl +++ b/frontend/check.icl @@ -4,6 +4,7 @@ import StdEnv import syntax, typesupport, parse, checksupport, utilities, checktypes, transform, predef import explicitimports, comparedefimp, checkFunctionBodies, containers, portToNewSyntax, compilerSwitches +import RWSDebug cUndef :== (-1) cDummyArray :== {} @@ -2700,7 +2701,9 @@ checkDclModule dcl_imported_module_numbers super_components imports_ikh componen # dcl_mod = {dcl_mod & dcl_dictionary_info=dictionary_info} heaps = { heaps & hp_type_heaps = hp_type_heaps, hp_var_heap = hp_var_heap, hp_expression_heap=hp_expression_heap} | not cs.cs_error.ea_ok - = ((0, 0, []), (expl_imp_info, modules, icl_functions, macro_defs, heaps, cs)) + # cs_symbol_table = removeDeclarationsFromSymbolTable dcl_defined cModuleScope cs.cs_symbol_table + # cs_symbol_table = foldlArraySt removeImportedSymbolsFromSymbolTable dcls_import cs_symbol_table + = ((0, 0, []), (expl_imp_info, modules, icl_functions, macro_defs, heaps, {cs & cs_symbol_table = cs_symbol_table})) #!nr_of_members = count_members mod_index dcl_common.com_instance_defs dcl_common.com_class_defs modules # nr_of_dcl_functions_and_instances = nr_of_dcl_functions+nr_of_members @@ -2734,6 +2737,7 @@ checkDclModule dcl_imported_module_numbers super_components imports_ikh componen -> checkExplicitImportCompleteness decls_explicit modules icl_functions macro_defs hp_expression_heap cs True -> (modules, icl_functions, macro_defs, hp_expression_heap, cs) + heaps = { heaps & hp_expression_heap = hp_expression_heap } dcl_common = { dcl_common & com_type_defs = e_info.ef_type_defs, com_selector_defs = e_info.ef_selector_defs, com_class_defs = e_info.ef_class_defs, |