aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2001-03-26 12:24:43 +0000
committerjohnvg2001-03-26 12:24:43 +0000
commitbc3ffba270e300e6b52fb108324be8aa98f21db9 (patch)
treed8fb69c8e93be428de467a42f437ae6908431501
parentbug fix in nf (diff)
added check for error after 'combineDclAndIclModule' to
prevent a compiler crash when an abstract type is not defined in the implementation module git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@341 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/check.icl7
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/check.icl b/frontend/check.icl
index 0b2ce97..60fa246 100644
--- a/frontend/check.icl
+++ b/frontend/check.icl
@@ -1677,8 +1677,9 @@ check_module2 mod_name mod_imported_objects mod_imports mod_type icl_global_func
(icl_sizes_without_added_dcl_defs, sizes) = memcpy sizes
(dcl_modules, local_defs, cdefs, icl_sizes, cs)
= combineDclAndIclModule mod_type init_dcl_modules local_defs cdefs sizes cs
-
- icl_common = createCommonDefinitions cdefs
+ | not cs.cs_error.ea_ok
+ = (False, abort "evaluated error 1 (check.icl)", {}, {}, No, {}, cs.cs_x.x_main_dcl_module_n,heaps, cs.cs_predef_symbols, cs.cs_symbol_table, cs.cs_error.ea_file, [])
+ # icl_common = createCommonDefinitions cdefs
(local_defs,dcl_modules,icl_common,cs)
= renumber_icl_definitions_as_dcl_definitions mod_type local_defs dcl_modules icl_common {icl_sizes.[i] \\ i<-[0..cMacroDefs-1]} cs
@@ -1693,7 +1694,7 @@ check_module2 mod_name mod_imported_objects mod_imports mod_type icl_global_func
= checkDclModules mod_imports dcl_modules icl_functions heaps cs
| not cs.cs_error.ea_ok
- = (False, abort "evaluated error 1 (check.icl)", {}, {}, No, {}, cs.cs_x.x_main_dcl_module_n,heaps, cs.cs_predef_symbols, cs.cs_symbol_table, cs.cs_error.ea_file, [])
+ = (False, abort "evaluated error 2 (check.icl)", {}, {}, No, {}, cs.cs_x.x_main_dcl_module_n,heaps, cs.cs_predef_symbols, cs.cs_symbol_table, cs.cs_error.ea_file, [])
# (imported_module_numbers_of_main_dcl_mod, dcl_modules)
= dcl_modules![main_dcl_module_n].dcl_imported_module_numbers
(imported_module_numbers, dcl_modules)