Commit 5b864e69 authored by John van Groningen's avatar John van Groningen

refactor, sim_members always has type [FunDef], remove parameter from type...

refactor, sim_members always has type [FunDef], remove parameter from type ScannedInstanceAndMembersR
parent 6aa2f047
......@@ -2579,14 +2579,14 @@ check_module1 cdefs icl_global_function_range fun_defs optional_dcl_mod optional
(cs_symbol_table, cs_error) = addDefToSymbolTable cGlobalScope mod_index mod.mod_ident (STE_Module mod) cs_symbol_table cs_error
= ((mod,sizes,defs),dcl_macro_defs,{ cs & cs_symbol_table = cs_symbol_table, cs_error = cs_error })
where
convert_dcl_class_instances :: ![ScannedInstanceAndMembersR a] -> [ClassInstance]
convert_dcl_class_instances :: ![ScannedInstanceAndMembers] -> [ClassInstance]
convert_dcl_class_instances [{sim_pi,sim_member_types} : pins]
# member_types_and_functions = [{dim_type=fun_type,dim_function_index = -1} \\ fun_type<-sim_member_types]
= [ParsedInstanceToClassInstance sim_pi member_types_and_functions {} : convert_dcl_class_instances pins]
convert_dcl_class_instances []
= []
convert_icl_class_instances1 :: .[ScannedInstanceAndMembersR a] -> .[ClassInstanceR a]
convert_icl_class_instances1 :: .[ScannedInstanceAndMembers] -> .[ClassInstanceR FunDef]
convert_icl_class_instances1 insams
= [ParsedInstanceToClassInstance sim_pi sim_members {} \\ {sim_pi,sim_members}<-insams]
......
......@@ -358,7 +358,7 @@ where
collectFunctions e icl_module ca
= (e, ca)
instance collectFunctions (ScannedInstanceAndMembersR FunDef) where
instance collectFunctions ScannedInstanceAndMembers where
collectFunctions inst=:{sim_members} icl_module ca
# (sim_members, ca) = collectFunctions sim_members icl_module ca
= ({inst & sim_members = sim_members }, ca)
......@@ -1400,7 +1400,7 @@ where
macro_count :: !Int
}
reorganiseDefinitions :: Bool [ParsedDefinition] !DefCounts *CollectAdmin -> (![FunDef],!CollectedDefinitions (ScannedInstanceAndMembersR FunDef), ![ParsedImport], ![ImportedObject],![ParsedForeignExport],!*CollectAdmin)
reorganiseDefinitions :: Bool [ParsedDefinition] !DefCounts *CollectAdmin -> (![FunDef],!CollectedDefinitions ScannedInstanceAndMembers, ![ParsedImport], ![ImportedObject],![ParsedForeignExport],!*CollectAdmin)
reorganiseDefinitions icl_module [PD_Function pos name is_infix args rhs fun_kind : defs] def_counts=:{macro_count} ca
# prio = if is_infix (Prio NoAssoc 9) NoPrio
fun_arity = length args
......
......@@ -118,7 +118,7 @@ instance == FunctionOrMacroIndex
}
:: ParsedModule :== Module [ParsedDefinition]
:: ScannedModule :== Module (CollectedDefinitions (ScannedInstanceAndMembersR FunDef))
:: ScannedModule :== Module (CollectedDefinitions ScannedInstanceAndMembers)
:: ModuleKind = MK_Main | MK_Module | MK_System | MK_None | MK_NoMainDcl
......@@ -315,9 +315,9 @@ cNameLocationDependent :== True
, pim_members :: ![ParsedDefinition]
}
:: ScannedInstanceAndMembersR icl_member =
:: ScannedInstanceAndMembers =
{ sim_pi :: !ParsedInstance
, sim_members :: ![icl_member] // for .icl
, sim_members :: ![FunDef] // for .icl
, sim_member_types :: ![FunType] // for .dcl
}
......
Markdown is supported
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