From c3a2cdaad45d3e1536d3b98d89036e549f159530 Mon Sep 17 00:00:00 2001 From: alimarin Date: Tue, 13 Mar 2001 15:36:49 +0000 Subject: Generics are added, but are disabled. Tested with compiling Object IO and butstrapping. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@329 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/overloading.icl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'frontend/overloading.icl') diff --git a/frontend/overloading.icl b/frontend/overloading.icl index 6fb4c94..3df8017 100644 --- a/frontend/overloading.icl +++ b/frontend/overloading.icl @@ -3,6 +3,7 @@ implementation module overloading import StdEnv import syntax, check, type, typesupport, utilities, unitype, predef, checktypes, convertDynamics // ,RWSDebug +import generics // AA :: InstanceTree = IT_Node !(Global Index) !InstanceTree !InstanceTree | IT_Empty @@ -711,6 +712,13 @@ where = find_instance_of_member me_class me_offset {rcs & rcs_constraints_contexts = rcs_constraints_contexts ++ rcss} find_instance_of_member_in_constraints me_class me_offset [] = abort "Error in module overloading: find_instance_of_member_in_constraints\n" +// AA.. +convertOverloadedCall defs contexts symbol=:{symb_kind = SK_Generic gen_glob kind} expr_ptr class_appls heaps_and_ptrs + # (found, member_glob) = getGenericMember gen_glob kind defs + | not found + = abort "convertOverloadedCall: no class for kind" + = convertOverloadedCall defs contexts {symbol & symb_kind = SK_OverloadedFunction member_glob} expr_ptr class_appls heaps_and_ptrs +// ..AA convertOverloadedCall defs contexts {symb_name,symb_kind = SK_TypeCode} expr_info_ptr class_appls heaps_and_ptrs # (class_expressions, (heaps, ptrs)) = convertClassApplsToExpressions defs contexts class_appls heaps_and_ptrs = ({ heaps & hp_expression_heap = heaps.hp_expression_heap <:= (expr_info_ptr, EI_TypeCodes (map expressionToTypeCodeExpression class_expressions))}, ptrs) @@ -868,7 +876,6 @@ getClassVariable symb var_info_ptr var_heap error (_, var_heap) -> (symb, var_info_ptr, var_heap, overloadingError symb error) - updateDynamics :: ![Index] ![LocalTypePatternVariable] !Int !*{#FunDef} !*{! FunctionType} !*ExpressionHeap !*TypeCodeInfo !*VarHeap !*ErrorAdmin !*{#PredefinedSymbol} -> (!*{#FunDef}, !*{! FunctionType}, !*ExpressionHeap, !*TypeCodeInfo, !*VarHeap, !*ErrorAdmin, !*{#PredefinedSymbol}) updateDynamics funs type_pattern_vars main_dcl_module_n fun_defs fun_env symbol_heap type_code_info var_heap error predef_symbols -- cgit v1.2.3