Commit 0298f8ad authored by John van Groningen's avatar John van Groningen
Browse files

remove VI_ExpandedType from selector and constructor types in definition modules

parent fbc204ac
...@@ -556,20 +556,36 @@ removeExpandedTypesFromDclModules dcls used_module_numbers ...@@ -556,20 +556,36 @@ removeExpandedTypesFromDclModules dcls used_module_numbers
= foldStateWithIndexA removeExpandedTypesFromDclModule dcls = foldStateWithIndexA removeExpandedTypesFromDclModule dcls
where where
removeExpandedTypesFromDclModule :: ModuleIndex DclModule -> BackEnder removeExpandedTypesFromDclModule :: ModuleIndex DclModule -> BackEnder
removeExpandedTypesFromDclModule moduleIndex dclModule=:{dcl_functions} removeExpandedTypesFromDclModule moduleIndex dclModule=:{dcl_functions,dcl_common={com_cons_defs,com_selector_defs}}
| moduleIndex == cPredefinedModuleIndex || not (inNumberSet moduleIndex used_module_numbers) | moduleIndex == cPredefinedModuleIndex || not (inNumberSet moduleIndex used_module_numbers)
= identity = identity
= foldStateWithIndexA (removeExpandedTypesFromFunType moduleIndex) dcl_functions = foldStateA removeExpandedTypesFromFunType dcl_functions
o` foldStateA removeExpandedTypesFromConsType com_cons_defs
o` foldStateA removeExpandedTypesFromSelectorType com_selector_defs
where where
removeExpandedTypesFromFunType :: ModuleIndex Index FunType -> BackEnder removeExpandedTypesFromFunType :: FunType -> BackEnder
removeExpandedTypesFromFunType moduleIndex functionIndex {ft_ident, ft_type_ptr} removeExpandedTypesFromFunType {ft_type_ptr}
= \be0 -> let (ft_type,be) = read_from_var_heap ft_type_ptr be0 in = \be0 -> let (ft_type,be) = read_from_var_heap ft_type_ptr be0 in
(case ft_type of (case ft_type of
VI_ExpandedType expandedType VI_ExpandedType expandedType
-> write_to_var_heap ft_type_ptr VI_Empty -> write_to_var_heap ft_type_ptr VI_Empty
_ _
-> identity) be -> identity) be
removeExpandedTypesFromSelectorType :: SelectorDef -> BackEnder
removeExpandedTypesFromSelectorType {sd_type_ptr}
= \be0
| not (isNilPtr sd_type_ptr)
-> write_to_var_heap sd_type_ptr VI_Empty be0
-> be0
removeExpandedTypesFromConsType :: ConsDef -> BackEnder
removeExpandedTypesFromConsType {cons_type_ptr}
= \be0
| not (isNilPtr cons_type_ptr)
-> write_to_var_heap cons_type_ptr VI_Empty be0
-> be0
:: DeclVarsInput :== Ident :: DeclVarsInput :== Ident
class declareVars a :: a !DeclVarsInput -> BackEnder class declareVars a :: a !DeclVarsInput -> BackEnder
...@@ -2129,8 +2145,6 @@ markExports {dcl_functions,dcl_common={com_type_defs,com_cons_defs,com_selector_ ...@@ -2129,8 +2145,6 @@ markExports {dcl_functions,dcl_common={com_type_defs,com_cons_defs,com_selector_
where where
iclTypeIndex iclTypeIndex
= iclClasses.[classIndex].class_dictionary.ds_index = iclClasses.[classIndex].class_dictionary.ds_index
dclTypeIndex
= dclClasses.[classIndex].class_dictionary.ds_index
{td_rhs = RecordType {rt_fields}} {td_rhs = RecordType {rt_fields}}
= iclTypes.[iclTypeIndex] = iclTypes.[iclTypeIndex]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment