diff options
author | johnvg | 2011-02-24 13:00:32 +0000 |
---|---|---|
committer | johnvg | 2011-02-24 13:00:32 +0000 |
commit | 55a77769a9a4be1b7ebb2af0b27e2e03b7238801 (patch) | |
tree | 7d97732506aeaeb784bf065f72cedde7224cc41f /frontend/frontend.icl | |
parent | fix error message for not imported qualified ident (diff) |
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1858 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/frontend.icl')
-rw-r--r-- | frontend/frontend.icl | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/frontend/frontend.icl b/frontend/frontend.icl index 0797778..a06b6d2 100644 --- a/frontend/frontend.icl +++ b/frontend/frontend.icl @@ -6,9 +6,6 @@ implementation module frontend import scanner, parse, postparse, check, type, trans, convertcases, overloading, utilities, convertDynamics, convertimportedtypes, compilerSwitches, analtypes, generics1, typereify -//import coredump - -//import print // trace macro (-*->) infixl @@ -28,8 +25,6 @@ frontSyntaxTree cached_dcl_macros cached_dcl_mods main_dcl_module_n predef_symbo },cached_dcl_macros,cached_dcl_mods,main_dcl_module_n,predef_symbols,hash_table,files,error,io,out,tcl_file,heaps ) -// import StdDebug - frontEndInterface :: !FrontEndOptions !Ident !SearchPaths !{#DclModule} !*{#*{#FunDef}} !(Optional Bool) !*PredefinedSymbols !*HashTable (ModTimeFunction *Files) !*Files !*File !*File !*File !(Optional *File) !*Heaps -> ( !Optional *FrontEndSyntaxTree,!*{#*{#FunDef}},!{#DclModule},!Int,!*PredefinedSymbols, !*HashTable, !*Files, !*File, !*File, !*File, !Optional *File, !*Heaps) frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_macros list_inferred_types predef_symbols hash_table modtimefunction files error io out tcl_file heaps @@ -108,19 +103,21 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m = abort "frontend: sanityCheckTypeFunctions failed" # hp_var_heap = heaps.hp_var_heap + #! n_types_with_type_functions = size ti_common_defs.[main_dcl_module_n].com_type_defs + #! n_constructors_with_type_functions = size ti_common_defs.[main_dcl_module_n].com_cons_defs # (fun_defs, predef_symbols, hp_var_heap, type_heaps) - = if support_dynamics - (buildTypeFunctions main_dcl_module_n fun_defs ti_common_defs - predef_symbols hp_var_heap type_heaps) - (fun_defs, predef_symbols, hp_var_heap, type_heaps) - # (td_infos, th_vars, error_admin) = analyseTypeDefs ti_common_defs type_groups com_type_defs main_dcl_module_n td_infos type_heaps.th_vars error_admin + = if support_dynamics + (buildTypeFunctions main_dcl_module_n fun_defs ti_common_defs predef_symbols hp_var_heap type_heaps) + (fun_defs, predef_symbols, hp_var_heap, type_heaps) + # (td_infos, th_vars, error_admin) + = analyseTypeDefs ti_common_defs type_groups com_type_defs main_dcl_module_n td_infos type_heaps.th_vars error_admin # (class_infos, td_infos, th_vars, error_admin) - = determineKindsOfClasses icl_used_module_numbers ti_common_defs td_infos th_vars error_admin + = determineKindsOfClasses icl_used_module_numbers ti_common_defs td_infos th_vars error_admin # icl_global_functions=icl_function_indices.ifi_global_function_indices # (fun_defs, dcl_mods, td_infos, th_vars, hp_expression_heap, gen_heap, error_admin) - = checkKindsOfCommonDefsAndFunctions n_cached_dcl_modules main_dcl_module_n icl_used_module_numbers + = checkKindsOfCommonDefsAndFunctions n_cached_dcl_modules main_dcl_module_n icl_used_module_numbers (icl_global_functions++[icl_function_indices.ifi_local_function_indices]) ti_common_defs fun_defs dcl_mods td_infos class_infos th_vars heaps.hp_expression_heap heaps.hp_generic_heap error_admin @@ -173,8 +170,8 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m # icl_function_indices = {icl_function_indices & ifi_gencase_indices = icl_gencase_indices } # (fun_def_size, fun_defs) = usize fun_defs - # (components, fun_defs) = partitionateFunctions (fun_defs -*-> "partitionateFunctions") - (icl_global_functions++icl_function_indices.ifi_instance_indices + # (components, fun_defs) + = partitionateFunctions fun_defs (icl_global_functions++icl_function_indices.ifi_instance_indices ++[icl_function_indices.ifi_specials_indices : icl_gencase_indices++icl_function_indices.ifi_type_function_indices]) @@ -182,9 +179,10 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m = frontSyntaxTree cached_dcl_macros cached_dcl_mods main_dcl_module_n predef_symbols hash_table files error io out tcl_file icl_mod dcl_mods fun_defs components array_instances heaps - # (components, fun_defs, predef_symbols, dcl_types, var_heap, type_heaps, expression_heap, tcl_file) - = convertDynamicPatternsIntoUnifyAppls common_defs main_dcl_module_n (components -*-> "convertDynamics") fun_defs predef_symbols - heaps.hp_var_heap heaps.hp_type_heaps heaps.hp_expression_heap tcl_file dcl_mods icl_mod directly_imported_dcl_modules + # (dcl_types, components, fun_defs, predef_symbols, var_heap, type_heaps, expression_heap, tcl_file) + = convertDynamicPatternsIntoUnifyAppls common_defs main_dcl_module_n dcl_mods icl_mod directly_imported_dcl_modules + n_types_with_type_functions n_constructors_with_type_functions + components fun_defs predef_symbols heaps.hp_var_heap heaps.hp_type_heaps heaps.hp_expression_heap tcl_file | options.feo_up_to_phase == FrontEndPhaseConvertDynamics # heaps = {hp_var_heap=var_heap, hp_type_heaps=type_heaps, hp_expression_heap=expression_heap, hp_generic_heap=newHeap} @@ -243,8 +241,8 @@ frontEndInterface options mod_ident search_paths cached_dcl_modules cached_dcl_m = frontSyntaxTree cached_dcl_macros cached_dcl_mods main_dcl_module_n predef_symbols hash_table files error io out tcl_file icl_mod dcl_mods fun_defs components array_instances heaps - # (dcl_types, used_conses, var_heap, type_heaps) = convertIclModule main_dcl_module_n common_defs (dcl_types -*-> "Convert icl") used_conses var_heap type_heaps - # (dcl_types, used_conses, var_heap, type_heaps) = convertDclModule main_dcl_module_n dcl_mods common_defs (dcl_types -*-> "Convert dcl") used_conses var_heap type_heaps + # (dcl_types, used_conses, var_heap, type_heaps) = convertIclModule main_dcl_module_n common_defs dcl_types used_conses var_heap type_heaps + # (dcl_types, used_conses, var_heap, type_heaps) = convertDclModule main_dcl_module_n dcl_mods common_defs dcl_types used_conses var_heap type_heaps // (components, fun_defs, out) = showComponents components 0 False fun_defs out |