diff options
author | johnvg | 2012-05-25 09:49:43 +0000 |
---|---|---|
committer | johnvg | 2012-05-25 09:49:43 +0000 |
commit | 66ba6a1c034d0b8509ce1f506a4451ccc6cacfac (patch) | |
tree | 5044c39ec46ee069f76816117dcfba89845a25c7 /frontend/convertDynamics.icl | |
parent | fix bug in var_info_ptr's of new variables added for cases used as arguments ... (diff) |
commit bug fix from revision 1735 again:
keep case_explicit, instead of setting case_explicit to False for all
Case expressions (including cases not usings dynamics) in functions
using dynamics.
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2079 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/convertDynamics.icl')
-rw-r--r-- | frontend/convertDynamics.icl | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/frontend/convertDynamics.icl b/frontend/convertDynamics.icl index e6753aa..9bfe503 100644 --- a/frontend/convertDynamics.icl +++ b/frontend/convertDynamics.icl @@ -57,10 +57,7 @@ write_tcl_file main_dcl_module_n dcl_mods=:{[main_dcl_module_n] = main_dcl_modul = write_type_info directly_imported_dcl_modules tcl_file write_type_info_state #! (tcl_file,write_type_info_state) - = write_type_info (help_20_compiler { dcl_name.id_name\\ {dcl_name} <-: dcl_mods }) tcl_file write_type_info_state - with - help_20_compiler :: {#{#Char}} -> {#{#Char}} - help_20_compiler l = l + = write_type_info {# id_name \\ {dcl_name={id_name}} <-: dcl_mods } tcl_file write_type_info_state #! tcl_file = fwritei (size main_dcl_module.dcl_common.com_type_defs) tcl_file @@ -326,7 +323,7 @@ instance convertDynamics Case where -> convertDynamicCase cinp kees ci _ # (case_guards, ci) = convertDynamics cinp case_guards ci - # kees = {kees & case_explicit=False, case_guards=case_guards} + # kees & case_guards=case_guards -> (kees, ci) instance convertDynamics CasePatterns where @@ -709,7 +706,6 @@ dummy_case_ptr result_type ci=:{ci_expr_heap} ct_cons_types = [[empty_attributed_type, empty_attributed_type]]}) ci_expr_heap = (expr_info_ptr, {ci & ci_expr_heap = ci_expr_heap}) - let_ptr :: !Int !*ConversionState -> (ExprInfoPtr, !*ConversionState) let_ptr nr_of_binds ci=:{ci_expr_heap} = let_ptr2 (repeatn nr_of_binds empty_attributed_type) ci @@ -721,7 +717,7 @@ typed_let_ptr type_id ci=:{ci_expr_heap} let_ptr2 :: [AType] !*ConversionState -> (ExprInfoPtr, !*ConversionState) let_ptr2 let_types ci=:{ci_expr_heap} # (expr_info_ptr, ci_expr_heap) = newPtr (EI_LetType let_types) ci_expr_heap - = (expr_info_ptr, {ci & ci_expr_heap = ci_expr_heap}) + = (expr_info_ptr, {ci & ci_expr_heap = ci_expr_heap}) toAType :: Type -> AType toAType type = { at_attribute = TA_Multi, at_type = type } @@ -729,11 +725,6 @@ toAType type = { at_attribute = TA_Multi, at_type = type } empty_attributed_type :: AType empty_attributed_type = toAType TE -instance <<< (Ptr a) -where - (<<<) file ptr = file <<< ptrToInt ptr - - create_dynamic_and_selector_idents common_defs predefined_symbols | predefined_symbols.[PD_StdDynamic].pds_module == NoIndex = ({ dr_type_ident = undef @@ -763,4 +754,3 @@ create_dynamic_and_selector_idents common_defs predefined_symbols , dr_dynamic_symbol = dynamic_defined_symbol , dr_type_code_constructor_symb_ident = type_code_constructor_symb_ident }, predefined_symbols) - |