aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2011-04-15 10:57:01 +0000
committerjohnvg2011-04-15 10:57:01 +0000
commit6f0bd29ec38b3d3ad41d5cbec0e1f3f131d607a4 (patch)
treed03ac01910d4a8cb2dee079bf1b8eacdb7ac1766
parentuse type FunSpecials instead of Specials for specials of functions (diff)
remove field icl_copied_from_dcl from type IclModule
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1923 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--frontend/check.icl8
-rw-r--r--frontend/comparedefimp.dcl4
-rw-r--r--frontend/comparedefimp.icl18
-rw-r--r--frontend/frontend.icl5
-rw-r--r--frontend/syntax.dcl19
5 files changed, 17 insertions, 37 deletions
diff --git a/frontend/check.icl b/frontend/check.icl
index 29d95a4..6e5668c 100644
--- a/frontend/check.icl
+++ b/frontend/check.icl
@@ -2302,14 +2302,13 @@ check_module2 mod_ident mod_modification_time mod_imported_objects mod_imports m
icl_mod = { icl_name = mod_ident, icl_functions = icl_functions, icl_function_indices = icl_function_indices,
icl_common = icl_common, icl_import = icl_imported, icl_qualified_imports = qualified_explicit_imports,
icl_imported_objects = mod_imported_objects, icl_foreign_exports = foreign_exports,
- icl_used_module_numbers = imported_module_numbers, icl_copied_from_dcl = copied_dcl_defs,
- icl_modification_time = mod_modification_time }
+ icl_used_module_numbers = imported_module_numbers, icl_modification_time = mod_modification_time }
heaps = { heaps & hp_var_heap = var_heap, hp_expression_heap = expr_heap, hp_type_heaps = {hp_type_heaps & th_vars = th_vars}}
(main_dcl_module, dcl_modules) = dcl_modules![main_dcl_module_n]
(icl_mod, macro_defs, heaps, cs_error)
- = compareDefImp main_dcl_module_n main_dcl_module optional_macro_conversions n_exported_global_functions icl_mod e_info.ef_macro_defs heaps cs_error
+ = compareDefImp main_dcl_module_n main_dcl_module optional_macro_conversions copied_dcl_defs n_exported_global_functions icl_mod e_info.ef_macro_defs heaps cs_error
# (predef_symbols_for_transform, cs_predef_symbols) = get_predef_symbols_for_transform cs_predef_symbols
(groups, icl_functions, macro_defs, var_heap, expr_heap, cs_symbol_table, cs_error)
@@ -2333,8 +2332,7 @@ check_module2 mod_ident mod_modification_time mod_imported_objects mod_imports m
icl_mod = { icl_name = mod_ident, icl_functions = icl_functions, icl_function_indices = icl_function_indices,
icl_common = icl_common, icl_import = icl_imported, icl_qualified_imports = qualified_explicit_imports,
icl_imported_objects = mod_imported_objects, icl_foreign_exports = foreign_exports,
- icl_used_module_numbers = imported_module_numbers, icl_copied_from_dcl = copied_dcl_defs,
- icl_modification_time = mod_modification_time }
+ icl_used_module_numbers = imported_module_numbers, icl_modification_time = mod_modification_time }
= (False, icl_mod, dcl_modules, {}, {}, cs_x.x_main_dcl_module_n,heaps, cs_predef_symbols, cs_symbol_table, cs_error.ea_file, directly_imported_dcl_modules)
where
check_start_rule mod_kind mod_ident icl_global_functions_ranges cs=:{cs_symbol_table,cs_x}
diff --git a/frontend/comparedefimp.dcl b/frontend/comparedefimp.dcl
index cf9492c..0897570 100644
--- a/frontend/comparedefimp.dcl
+++ b/frontend/comparedefimp.dcl
@@ -4,8 +4,8 @@ import syntax, checksupport
// compare definition and implementation module
-compareDefImp :: !Int !DclModule !(Optional {#Index}) !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin
- -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin)
+compareDefImp :: !Int !DclModule !(Optional {#Index}) !CopiedDefinitions !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin
+ -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin)
symbolTypesCorrespond :: !SymbolType !SymbolType !*TypeHeaps -> (!ComparisionErrorCode, !.TypeHeaps)
diff --git a/frontend/comparedefimp.icl b/frontend/comparedefimp.icl
index b1d835f..5a70a1c 100644
--- a/frontend/comparedefimp.icl
+++ b/frontend/comparedefimp.icl
@@ -7,11 +7,11 @@ import syntax, checksupport, compare_constructor, utilities, StdCompare
, comp_attr_var_heap :: !.AttrVarHeap
, comp_error :: !.ErrorAdmin
}
-
+
type_def_error = "type definition in the impl module conflicts with the def module"
class_def_error = "class definition in the impl module conflicts with the def module"
instance_def_error = "instance definition in the impl module conflicts with the def module"
-generic_def_error = "generic definition in the impl module conflicts with the def module"
+generic_def_error = "generic definition in the impl module conflicts with the def module"
compareError message pos error_admin
= popErrorAdmin (checkError "" message (pushErrorAdmin pos error_admin))
@@ -431,19 +431,17 @@ class CorrespondenceNumber a where
initial_hwn hwn_heap = { hwn_heap = hwn_heap, hwn_number = 0 }
-compareDefImp :: !Int !DclModule !(Optional {#Index}) !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin
- -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin)
-compareDefImp main_dcl_module_n main_dcl_module No n_exported_global_functions icl_module macro_defs heaps error_admin
+compareDefImp :: !Int !DclModule !(Optional {#Index}) !CopiedDefinitions !Int !*IclModule !*{#*{#FunDef}} !*Heaps !*ErrorAdmin
+ -> (!.IclModule,!.{#.{#FunDef}},!.Heaps,!.ErrorAdmin)
+compareDefImp main_dcl_module_n main_dcl_module No _ n_exported_global_functions icl_module macro_defs heaps error_admin
= (icl_module, macro_defs,heaps, error_admin)
-compareDefImp main_dcl_module_n main_dcl_module (Yes macro_conversion_table) n_exported_global_functions icl_module macro_defs heaps error_admin
+compareDefImp main_dcl_module_n main_dcl_module (Yes macro_conversion_table) {copied_type_defs,copied_class_defs,copied_generic_defs} n_exported_global_functions icl_module macro_defs heaps error_admin
// | Trace_array icl_module.icl_functions
// && Trace_array macro_defs.[main_dcl_module_n]
# {dcl_functions,dcl_macros,dcl_common} = main_dcl_module
- {icl_common, icl_functions, icl_copied_from_dcl = {copied_type_defs,copied_class_defs,copied_generic_defs}}
- = icl_module
- {hp_var_heap, hp_expression_heap, hp_type_heaps={th_vars, th_attrs}}
- = heaps
+ {icl_common, icl_functions} = icl_module
+ {hp_var_heap, hp_expression_heap, hp_type_heaps={th_vars, th_attrs}} = heaps
{ com_cons_defs=icl_com_cons_defs, com_type_defs = icl_com_type_defs,
com_selector_defs=icl_com_selector_defs, com_class_defs = icl_com_class_defs,
com_member_defs=icl_com_member_defs, com_instance_defs = icl_com_instance_defs,
diff --git a/frontend/frontend.icl b/frontend/frontend.icl
index 7ebdb0e..b937148 100644
--- a/frontend/frontend.icl
+++ b/frontend/frontend.icl
@@ -60,8 +60,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
select_and_remove_icl_functions_from_record :: !*IclModule -> (!.{#FunDef},!.IclModule)
select_and_remove_icl_functions_from_record icl_mod=:{icl_functions} = (icl_functions,{icl_mod & icl_functions={}})
- # { icl_common,icl_function_indices,icl_name,icl_import,icl_qualified_imports,icl_imported_objects,
- icl_foreign_exports,icl_used_module_numbers,icl_copied_from_dcl } = icl_mod
+ # {icl_common,icl_function_indices,icl_name,icl_import,icl_qualified_imports,icl_imported_objects,icl_foreign_exports,icl_used_module_numbers} = icl_mod
/*
(_,f,files) = fopen "components" FWriteText files
(components, icl_functions, f) = showComponents components 0 True icl_functions f
@@ -269,7 +268,7 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m
# fe ={ fe_icl = {icl_functions=fun_defs, icl_function_indices=icl_function_indices, icl_common=icl_common,
icl_import=icl_import, icl_qualified_imports=icl_qualified_imports, icl_imported_objects=icl_imported_objects,
icl_foreign_exports=icl_foreign_exports,icl_name=icl_name,icl_used_module_numbers=icl_used_module_numbers,
- icl_copied_from_dcl=icl_copied_from_dcl,icl_modification_time=icl_mod.icl_modification_time }
+ icl_modification_time=icl_mod.icl_modification_time }
, fe_dcls = dcl_mods
, fe_components = components
, fe_arrayInstances = array_instances
diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl
index bd34ac9..cc0b6e7 100644
--- a/frontend/syntax.dcl
+++ b/frontend/syntax.dcl
@@ -99,7 +99,7 @@ instance == FunctionOrMacroIndex
{ glob_object :: !object
, glob_module :: !Index
}
-
+
:: Module defs =
{ mod_ident :: !Ident
, mod_modification_time :: {#Char}
@@ -143,7 +143,6 @@ instance == FunctionOrMacroIndex
, icl_imported_objects :: ![ImportedObject]
, icl_foreign_exports :: ![ForeignExport]
, icl_used_module_numbers :: !NumberSet
- , icl_copied_from_dcl :: !CopiedDefinitions
, icl_modification_time :: !{#Char}
}
@@ -432,12 +431,6 @@ cNameLocationDependent :== True
| GCB_FunDef !FunDef
| GCB_ParsedBody ![ParsedExpr] !Rhs
-:: GenericType =
- { gt_type :: !SymbolType
- , gt_vars :: ![TypeVar] // generic arguments
- , gt_arity :: !Int // number of generic arguments
- }
-
:: InstanceType =
{ it_vars :: [TypeVar]
, it_types :: ![Type]
@@ -667,7 +660,7 @@ cIsALocalVar :== False
, cc_linear_bits ::![Bool]
, cc_producer ::!ProdClass
}
-
+
:: ConsClass :== Int
:: ProdClass :== Bool
@@ -753,13 +746,6 @@ cNotVarNumber :== -1
, var_expr_ptr :: !ExprInfoPtr
}
-/*
-cRecursiveAppl :== True
-cNonRecursiveAppl :== False
-
-:: ApplicationKind :== Bool
-*/
-
:: TypeSymbIdent =
{ type_ident :: !Ident
, type_arity :: !Int
@@ -1304,7 +1290,6 @@ cIsNotStrict :== False
| NoBind ExprInfoPtr /* auxiliary, to store fields that are not specified in a record expression */
| FailExpr !Ident // only allowed on (case) root positions
-
:: CodeBinding variable :== Env String variable
:: App =