@@ -77,11 +77,6 @@ Error ERROR_ambiguous_group = ERROR_none;
7777Error WARNING_fn_skip_branch = ERROR_none ;
7878Error WARNING_case_skip_label = ERROR_none ;
7979
80-
81- static void ENTITYresolve_subtypes ( Schema );
82- static void ENTITYresolve_supertypes ( Entity );
83- static void TYPEresolve_expressions ( Type , Scope );
84-
8580static Error ERROR_wrong_arg_count ;
8681static Error ERROR_supertype_resolve ;
8782static Error ERROR_subtype_resolve ;
@@ -115,7 +110,6 @@ static bool found_self; /**< remember whether we've seen a SELF in a WHERE clau
115110/* function prototypes */
116111/***********************/
117112
118- static int WHEREresolve ( Linked_List , Scope , int );
119113extern void VAR_resolve_expressions ( Variable , Entity );
120114extern void VAR_resolve_types ( Variable v );
121115
@@ -940,21 +934,6 @@ void STMTresolve( Statement statement, Scope scope ) {
940934 }
941935}
942936
943- void ALGresolve_expressions_statements ( Scope s , Linked_List statements ) {
944- int status = 0 ;
945-
946- if ( print_objects_while_running & OBJ_ALGORITHM_BITS &
947- OBJget_bits ( s -> type ) ) {
948- fprintf ( stderr , "pass %d: %s (%s)\n" , EXPRESSpass ,
949- s -> symbol .name , OBJget_type ( s -> type ) );
950- }
951-
952- SCOPEresolve_expressions_statements ( s );
953- STMTlist_resolve ( statements , s );
954-
955- s -> symbol .resolved = status ;
956- }
957-
958937static Variable ENTITY_get_local_attribute ( Entity e , char * name ) {
959938 LISTdo ( e -> u .entity -> attributes , a , Variable )
960939 if ( !strcmp ( VARget_simple_name ( a ), name ) ) {
@@ -1194,52 +1173,8 @@ void SCOPEresolve_types( Scope s ) {
11941173 }
11951174}
11961175
1197-
1198-
1199- /********************************new****************************************/
1200-
1201- void SCOPEresolve_subsupers ( Scope scope ) {
1202- DictionaryEntry de ;
1203- void * x ;
1204- char type ;
1205- Symbol * sym ;
1206- Type t ;
1207-
1208- if ( print_objects_while_running & OBJ_SCOPE_BITS &
1209- OBJget_bits ( scope -> type ) ) {
1210- fprintf ( stderr , "pass %d: %s (%s)\n" , EXPRESSpass ,
1211- scope -> symbol .name , OBJget_type ( scope -> type ) );
1212- }
1213-
1214- DICTdo_init ( scope -> symbol_table , & de );
1215- while ( 0 != ( x = DICTdo ( & de ) ) ) {
1216- switch ( type = DICT_type ) {
1217- case OBJ_ENTITY :
1218- ENTITYresolve_supertypes ( ( Entity )x );
1219- ENTITYresolve_subtypes ( ( Entity )x );
1220- break ;
1221- case OBJ_FUNCTION :
1222- case OBJ_PROCEDURE :
1223- case OBJ_RULE :
1224- SCOPEresolve_subsupers ( ( Scope )x );
1225- break ;
1226- case OBJ_TYPE :
1227- t = ( Type )x ;
1228- TYPEresolve ( & t );
1229- break ;
1230- default :
1231- /* ignored everything else */
1232- break ;
1233- }
1234- sym = OBJget_symbol ( x , type );
1235- if ( is_resolve_failed_raw ( sym ) ) {
1236- resolve_failed ( scope );
1237- }
1238- }
1239- }
1240-
12411176/** for each supertype, find the entity it refs to */
1242- static void ENTITYresolve_supertypes ( Entity e ) {
1177+ void ENTITYresolve_supertypes ( Entity e ) {
12431178 Entity ref_entity ;
12441179
12451180 if ( print_objects_while_running & OBJ_ENTITY_BITS ) {
@@ -1296,7 +1231,7 @@ static void ENTITYresolve_supertypes( Entity e ) {
12961231 } LISTod ;
12971232}
12981233
1299- static void ENTITYresolve_subtypes ( Entity e ) {
1234+ void ENTITYresolve_subtypes ( Entity e ) {
13001235 int i ;
13011236
13021237 if ( print_objects_while_running & OBJ_ENTITY_BITS ) {
@@ -1389,7 +1324,7 @@ void ENTITYresolve_types( Entity e ) {
13891324}
13901325
13911326/** resolve all expressions in type definitions */
1392- static void TYPEresolve_expressions ( Type t , Scope s ) {
1327+ void TYPEresolve_expressions ( Type t , Scope s ) {
13931328 TypeBody body ;
13941329
13951330 /* meaning of self in a type declaration refers to the type itself, so */
@@ -1427,58 +1362,7 @@ static void TYPEresolve_expressions( Type t, Scope s ) {
14271362 self = self_old ;
14281363}
14291364
1430- void SCOPEresolve_expressions_statements ( Scope s ) {
1431- DictionaryEntry de ;
1432- void * x ;
1433- Variable v ;
1434-
1435- if ( print_objects_while_running & OBJ_SCOPE_BITS &
1436- OBJget_bits ( s -> type ) ) {
1437- fprintf ( stderr , "pass %d: %s (%s)\n" , EXPRESSpass ,
1438- s -> symbol .name , OBJget_type ( s -> type ) );
1439- }
1440-
1441- DICTdo_init ( s -> symbol_table , & de );
1442- while ( 0 != ( x = DICTdo ( & de ) ) ) {
1443- switch ( DICT_type ) {
1444- case OBJ_SCHEMA :
1445- if ( is_not_resolvable ( ( Schema )x ) ) {
1446- break ;
1447- }
1448- SCOPEresolve_expressions_statements ( ( Scope )x );
1449- break ;
1450- case OBJ_ENTITY :
1451- ENTITYresolve_expressions ( ( Entity )x );
1452- break ;
1453- case OBJ_FUNCTION :
1454- ALGresolve_expressions_statements ( ( Scope )x , ( ( Scope )x )-> u .func -> body );
1455- break ;
1456- case OBJ_PROCEDURE :
1457- ALGresolve_expressions_statements ( ( Scope )x , ( ( Scope )x )-> u .proc -> body );
1458- break ;
1459- case OBJ_RULE :
1460- ALGresolve_expressions_statements ( ( Scope )x , ( ( Scope )x )-> u .rule -> body );
1461-
1462- WHEREresolve ( RULEget_where ( ( Scope )x ), ( Scope )x , 0 );
1463- break ;
1464- case OBJ_VARIABLE :
1465- v = ( Variable )x ;
1466- TYPEresolve_expressions ( v -> type , s );
1467- if ( v -> initializer ) {
1468- EXPresolve ( v -> initializer , s , v -> type );
1469- }
1470- break ;
1471- case OBJ_TYPE :
1472- TYPEresolve_expressions ( ( Type )x , s );
1473- break ;
1474- default :
1475- /* ignored everything else */
1476- break ;
1477- }
1478- }
1479- }
1480-
1481- static int WHEREresolve ( Linked_List list , Scope scope , int need_self ) {
1365+ int WHEREresolve ( Linked_List list , Scope scope , int need_self ) {
14821366 int status = 0 ;
14831367
14841368 LISTdo ( list , w , Where )
0 commit comments