From: Eric B. <er...@us...> - 2003-11-25 21:11:35
|
Update of /cvsroot/gobo-eiffel/gobo/library/tools/eiffel/ast/class In directory sc8-pr-cvs1:/tmp/cvs-serv24314/library/tools/eiffel/ast/class Modified Files: et_formal_parameter.e et_formal_parameter_comma.e et_formal_parameter_item.e Log Message: Implemented cat-and-dog mechanism when routines have an argument whose type contains a formal generic parameter. Index: et_formal_parameter.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/tools/eiffel/ast/class/et_formal_parameter.e,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** et_formal_parameter.e 11 Jun 2003 03:59:04 -0000 1.4 --- et_formal_parameter.e 25 Nov 2003 21:10:26 -0000 1.5 *************** *** 21,25 **** make as make_type undefine ! type redefine process --- 21,25 ---- make as make_type undefine ! type, actual_parameter redefine process *************** *** 47,50 **** --- 47,53 ---- feature -- Access + cat_keyword: ET_KEYWORD + -- 'cat' keyword + constraint: ET_TYPE is -- Generic constraint *************** *** 84,87 **** --- 87,99 ---- end + feature -- Status report + + is_cat: BOOLEAN is + -- Will actual parameters associatied with current formal + -- generic parameter be all monomorphic types? + do + Result := cat_keyword /= Void + end + feature -- Setting *************** *** 94,97 **** --- 106,117 ---- ensure index_set: index = an_index + end + + set_cat_keyword (a_cat: like cat_keyword) is + -- Set `cat_keyword' to `a_cat'. + do + cat_keyword := a_cat + ensure + cat_keyword_set: cat_keyword = a_cat end Index: et_formal_parameter_comma.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/tools/eiffel/ast/class/et_formal_parameter_comma.e,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** et_formal_parameter_comma.e 1 Jun 2003 17:07:44 -0000 1.3 --- et_formal_parameter_comma.e 25 Nov 2003 21:10:26 -0000 1.4 *************** *** 59,63 **** feature -- Type processing ! resolved_formal_parameters (actual_parameters: ET_ACTUAL_PARAMETER_LIST): ET_TYPE_COMMA is -- Replace in current type the formal generic parameter -- types by those of `actual_parameters' when the --- 59,63 ---- feature -- Type processing ! resolved_formal_parameters (actual_parameters: ET_ACTUAL_PARAMETER_LIST): ET_ACTUAL_PARAMETER_COMMA is -- Replace in current type the formal generic parameter -- types by those of `actual_parameters' when the *************** *** 75,96 **** end end - - feature -- Conversion - - -- base_type (a_feature: ET_FEATURE; a_type: ET_CLASS_TYPE): ET_TYPE_COMMA is - -- -- Type, in the context of `a_feature' in `a_type', - -- -- only made up of class names and generic formal parameters - -- -- when `a_type' in a generic type not fully derived - -- -- (Definition of base type in ETL2 p.198) - -- local - -- a_base_type: ET_TYPE - -- do - -- a_base_type := formal_parameter.base_type (a_feature, a_type) - -- if a_base_type /= formal_parameter then - -- create Result.make (a_base_type, comma) - -- else - -- create Result.make (formal_parameter, comma) - -- end - -- end feature -- Processing --- 75,78 ---- Index: et_formal_parameter_item.e =================================================================== RCS file: /cvsroot/gobo-eiffel/gobo/library/tools/eiffel/ast/class/et_formal_parameter_item.e,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** et_formal_parameter_item.e 1 Jun 2003 17:07:44 -0000 1.3 --- et_formal_parameter_item.e 25 Nov 2003 21:10:26 -0000 1.4 *************** *** 15,19 **** inherit ! ET_TYPE_ITEM feature -- Access --- 15,19 ---- inherit ! ET_ACTUAL_PARAMETER_ITEM feature -- Access *************** *** 22,25 **** --- 22,31 ---- -- Formal generic parameter in comma-separated list deferred + end + + actual_parameter: ET_ACTUAL_PARAMETER is + -- Actual parameter in comma-separated list + do + Result := type end |