Changes in / [19e567dd:51ff278]
- Location:
- src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r19e567dd r51ff278 521 521 }; 522 522 523 /// The application of a function to a set of parameters, along with a set of copy constructor 523 /// The application of a function to a set of parameters, along with a set of copy constructor 524 524 /// calls, one for each argument 525 525 class ImplicitCopyCtorExpr final : public Expr { … … 621 621 }; 622 622 623 /// A multiple- or mass-assignment operation, or a tuple ctor/dtor expression. 624 /// multiple-assignment: both sides of the assignment have tuple type, 623 /// A multiple- or mass-assignment operation, or a tuple ctor/dtor expression. 624 /// multiple-assignment: both sides of the assignment have tuple type, 625 625 /// e.g. `[a, b, c] = [d, e, f];` 626 626 /// mass-assignment: left-hand side has tuple type and right-hand side does not: … … 630 630 ptr<StmtExpr> stmtExpr; 631 631 632 TupleAssignExpr( 633 const CodeLocation & loc, std::vector<ptr<Expr>> && assigns, 632 TupleAssignExpr( 633 const CodeLocation & loc, std::vector<ptr<Expr>> && assigns, 634 634 std::vector<ptr<ObjectDecl>> && tempDecls ); 635 635 636 636 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } 637 637 private: -
src/AST/Fwd.hpp
r19e567dd r51ff278 15 15 16 16 #pragma once 17 18 #include <string> 17 19 18 20 #include "AST/Node.hpp" … … 134 136 135 137 template < typename ... Params > 136 std::string toString( const Params & ... params ); 138 std::string toString( const Params & ... params ) { 139 #warning not implemented 140 return ""; 141 } 137 142 138 143 typedef unsigned int UniqueId; -
src/AST/Pass.impl.hpp
r19e567dd r51ff278 571 571 __pass::indexer::addType( pass, 0, node ); 572 572 573 maybe_accept( node, &TypedefDecl::assertions );573 VISIT( maybe_accept( node, &TypedefDecl::assertions ); ) 574 574 575 575 VISIT_END( Decl, node ); … … 626 626 // ExprStmt 627 627 template< typename pass_t > 628 const ast::Stmt * ast::Pass< pass_t >::visit( const ExprStmt * node ) {628 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ExprStmt * node ) { 629 629 VISIT_START( node ); 630 630 … … 666 666 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::IfStmt * node ) { 667 667 VISIT_START( node ); 668 668 669 VISIT({ 669 670 // if statements introduce a level of scope (for the initialization) … … 674 675 maybe_accept( node, &IfStmt::elsePart ); 675 676 }) 677 676 678 VISIT_END( Stmt, node ); 677 679 } … … 680 682 // WhileStmt 681 683 template< typename pass_t > 682 const ast::Stmt * ast::Pass< pass_t >::visit( const WhileStmt * node ) {684 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::WhileStmt * node ) { 683 685 VISIT_START( node ); 684 686 … … 910 912 } 911 913 912 914 //-------------------------------------------------------------------------- 915 // ApplicationExpr 916 template< typename pass_t > 917 const ast::Expr * ast::Pass< pass_t >::visit( const ast::ApplicationExpr * node ) { 918 VISIT_START( node ); 919 920 VISIT( 921 { 922 guard_indexer guard { *this }; 923 maybe_accept( node, &ApplicationExpr::result ); 924 } 925 maybe_accept( node, &ApplicationExpr::func ); 926 maybe_accept( node, &ApplicationExpr::args ); 927 ) 928 929 VISIT_END( Expr, node ); 930 } 931 932 //-------------------------------------------------------------------------- 933 // UntypedExpr 934 template< typename pass_t > 935 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedExpr * node ) { 936 VISIT_START( node ); 937 938 VISIT( 939 { 940 guard_indexer guard { *this }; 941 maybe_accept( node, &UntypedExpr::result ); 942 } 943 944 maybe_accept( node, &UntypedExpr::args ); 945 ) 946 947 VISIT_END( Expr, node ); 948 } 949 950 //-------------------------------------------------------------------------- 951 // NameExpr 952 template< typename pass_t > 953 const ast::Expr * ast::Pass< pass_t >::visit( const ast::NameExpr * node ) { 954 VISIT_START( node ); 955 956 VISIT({ 957 guard_indexer guard { *this }; 958 maybe_accept( node, &NameExpr::result ); 959 }) 960 961 VISIT_END( Expr, node ); 962 } 963 964 //-------------------------------------------------------------------------- 965 // CastExpr 966 template< typename pass_t > 967 const ast::Expr * ast::Pass< pass_t >::visit( const ast::CastExpr * node ) { 968 VISIT_START( node ); 969 970 VISIT({ 971 guard_indexer guard { *this }; 972 maybe_accept( node, &CastExpr::result ); 973 } 974 maybe_accept( node, &CastExpr::arg ); 975 ) 976 977 VISIT_END( Expr, node ); 978 } 979 980 //-------------------------------------------------------------------------- 981 // KeywordCastExpr 982 template< typename pass_t > 983 const ast::Expr * ast::Pass< pass_t >::visit( const ast::KeywordCastExpr * node ) { 984 VISIT_START( node ); 985 986 VISIT({ 987 guard_indexer guard { *this }; 988 maybe_accept( node, &KeywordCastExpr::result ); 989 } 990 maybe_accept( node, &KeywordCastExpr::arg ); 991 ) 992 993 VISIT_END( Expr, node ); 994 } 995 996 //-------------------------------------------------------------------------- 997 // VirtualCastExpr 998 template< typename pass_t > 999 const ast::Expr * ast::Pass< pass_t >::visit( const ast::VirtualCastExpr * node ) { 1000 VISIT_START( node ); 1001 1002 VISIT({ 1003 guard_indexer guard { *this }; 1004 maybe_accept( node, &VirtualCastExpr::result ); 1005 } 1006 maybe_accept( node, &VirtualCastExpr::arg ); 1007 ) 1008 1009 VISIT_END( Expr, node ); 1010 } 1011 1012 //-------------------------------------------------------------------------- 1013 // AddressExpr 1014 template< typename pass_t > 1015 const ast::Expr * ast::Pass< pass_t >::visit( const ast::AddressExpr * node ) { 1016 VISIT_START( node ); 1017 1018 VISIT({ 1019 guard_indexer guard { *this }; 1020 maybe_accept( node, &AddressExpr::result ); 1021 } 1022 maybe_accept( node, &AddressExpr::arg ); 1023 ) 1024 1025 VISIT_END( Expr, node ); 1026 } 1027 1028 //-------------------------------------------------------------------------- 1029 // LabelAddressExpr 1030 template< typename pass_t > 1031 const ast::Expr * ast::Pass< pass_t >::visit( const ast::LabelAddressExpr * node ) { 1032 VISIT_START( node ); 1033 1034 VISIT({ 1035 guard_indexer guard { *this }; 1036 maybe_accept( node, &LabelAddressExpr::result ); 1037 }) 1038 1039 VISIT_END( Expr, node ); 1040 } 1041 1042 //-------------------------------------------------------------------------- 1043 // UntypedMemberExpr 1044 template< typename pass_t > 1045 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedMemberExpr * node ) { 1046 VISIT_START( node ); 1047 1048 VISIT({ 1049 guard_indexer guard { *this }; 1050 maybe_accept( node, &UntypedMemberExpr::result ); 1051 } 1052 maybe_accept( node, &UntypedMemberExpr::aggregate ); 1053 maybe_accept( node, &UntypedMemberExpr::member ); 1054 ) 1055 1056 VISIT_END( Expr, node ); 1057 } 1058 1059 //-------------------------------------------------------------------------- 1060 // MemberExpr 1061 template< typename pass_t > 1062 const ast::Expr * ast::Pass< pass_t >::visit( const ast::MemberExpr * node ) { 1063 VISIT_START( node ); 1064 1065 VISIT({ 1066 guard_indexer guard { *this }; 1067 maybe_accept( node, &MemberExpr::result ); 1068 } 1069 maybe_accept( node, &MemberExpr::aggregate ); 1070 ) 1071 1072 VISIT_END( Expr, node ); 1073 } 1074 1075 //-------------------------------------------------------------------------- 1076 // VariableExpr 1077 template< typename pass_t > 1078 const ast::Expr * ast::Pass< pass_t >::visit( const ast::VariableExpr * node ) { 1079 VISIT_START( node ); 1080 1081 VISIT({ 1082 guard_indexer guard { *this }; 1083 maybe_accept( node, &VariableExpr::result ); 1084 }) 1085 1086 VISIT_END( Expr, node ); 1087 } 1088 1089 //-------------------------------------------------------------------------- 1090 // ConstantExpr 1091 template< typename pass_t > 1092 const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConstantExpr * node ) { 1093 VISIT_START( node ); 1094 1095 VISIT({ 1096 guard_indexer guard { *this }; 1097 maybe_accept( node, &ConstantExpr::result ); 1098 }) 1099 1100 VISIT_END( Expr, node ); 1101 } 1102 1103 //-------------------------------------------------------------------------- 1104 // SizeofExpr 1105 template< typename pass_t > 1106 const ast::Expr * ast::Pass< pass_t >::visit( const ast::SizeofExpr * node ) { 1107 VISIT_START( node ); 1108 1109 VISIT({ 1110 guard_indexer guard { *this }; 1111 maybe_accept( node, &SizeofExpr::result ); 1112 } 1113 if ( node->type ) { 1114 maybe_accept( node, &SizeofExpr::type ); 1115 } else { 1116 maybe_accept( node, &SizeofExpr::expr ); 1117 } 1118 ) 1119 1120 VISIT_END( Expr, node ); 1121 } 1122 1123 //-------------------------------------------------------------------------- 1124 // AlignofExpr 1125 template< typename pass_t > 1126 const ast::Expr * ast::Pass< pass_t >::visit( const ast::AlignofExpr * node ) { 1127 VISIT_START( node ); 1128 1129 VISIT({ 1130 guard_indexer guard { *this }; 1131 maybe_accept( node, &AlignofExpr::result ); 1132 } 1133 if ( node->type ) { 1134 maybe_accept( node, &AlignofExpr::type ); 1135 } else { 1136 maybe_accept( node, &AlignofExpr::expr ); 1137 } 1138 ) 1139 1140 VISIT_END( Expr, node ); 1141 } 1142 1143 //-------------------------------------------------------------------------- 1144 // UntypedOffsetofExpr 1145 template< typename pass_t > 1146 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedOffsetofExpr * node ) { 1147 VISIT_START( node ); 1148 1149 VISIT({ 1150 guard_indexer guard { *this }; 1151 maybe_accept( node, &UntypedOffsetofExpr::result ); 1152 } 1153 maybe_accept( node, &UntypedOffsetofExpr::type ); 1154 ) 1155 1156 VISIT_END( Expr, node ); 1157 } 1158 1159 //-------------------------------------------------------------------------- 1160 // OffsetofExpr 1161 template< typename pass_t > 1162 const ast::Expr * ast::Pass< pass_t >::visit( const ast::OffsetofExpr * node ) { 1163 VISIT_START( node ); 1164 1165 VISIT({ 1166 guard_indexer guard { *this }; 1167 maybe_accept( node, &OffsetofExpr::result ); 1168 } 1169 maybe_accept( node, &OffsetofExpr::type ); 1170 ) 1171 1172 VISIT_END( Expr, node ); 1173 } 1174 1175 //-------------------------------------------------------------------------- 1176 // OffsetPackExpr 1177 template< typename pass_t > 1178 const ast::Expr * ast::Pass< pass_t >::visit( const ast::OffsetPackExpr * node ) { 1179 VISIT_START( node ); 1180 1181 VISIT({ 1182 guard_indexer guard { *this }; 1183 maybe_accept( node, &OffsetPackExpr::result ); 1184 } 1185 maybe_accept( node, &OffsetPackExpr::type ); 1186 ) 1187 1188 VISIT_END( Expr, node ); 1189 } 1190 1191 //-------------------------------------------------------------------------- 1192 // LogicalExpr 1193 template< typename pass_t > 1194 const ast::Expr * ast::Pass< pass_t >::visit( const ast::LogicalExpr * node ) { 1195 VISIT_START( node ); 1196 1197 VISIT({ 1198 guard_indexer guard { *this }; 1199 maybe_accept( node, &LogicalExpr::result ); 1200 } 1201 maybe_accept( node, &LogicalExpr::arg1 ); 1202 maybe_accept( node, &LogicalExpr::arg2 ); 1203 ) 1204 1205 VISIT_END( Expr, node ); 1206 } 1207 1208 //-------------------------------------------------------------------------- 1209 // ConditionalExpr 1210 template< typename pass_t > 1211 const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConditionalExpr * node ) { 1212 VISIT_START( node ); 1213 1214 VISIT({ 1215 guard_indexer guard { *this }; 1216 maybe_accept( node, &ConditionalExpr::result ); 1217 } 1218 maybe_accept( node, &ConditionalExpr::arg1 ); 1219 maybe_accept( node, &ConditionalExpr::arg2 ); 1220 maybe_accept( node, &ConditionalExpr::arg3 ); 1221 ) 1222 1223 VISIT_END( Expr, node ); 1224 } 1225 1226 //-------------------------------------------------------------------------- 1227 // CommaExpr 1228 template< typename pass_t > 1229 const ast::Expr * ast::Pass< pass_t >::visit( const ast::CommaExpr * node ) { 1230 VISIT_START( node ); 1231 1232 VISIT({ 1233 guard_indexer guard { *this }; 1234 maybe_accept( node, &CommaExpr::result ); 1235 } 1236 maybe_accept( node, &CommaExpr::arg1 ); 1237 maybe_accept( node, &CommaExpr::arg2 ); 1238 ) 1239 1240 VISIT_END( Expr, node ); 1241 } 1242 1243 //-------------------------------------------------------------------------- 1244 // TypeExpr 1245 template< typename pass_t > 1246 const ast::Expr * ast::Pass< pass_t >::visit( const ast::TypeExpr * node ) { 1247 VISIT_START( node ); 1248 1249 VISIT({ 1250 guard_indexer guard { *this }; 1251 maybe_accept( node, &TypeExpr::result ); 1252 } 1253 maybe_accept( node, &TypeExpr::type ); 1254 ) 1255 1256 VISIT_END( Expr, node ); 1257 } 1258 1259 //-------------------------------------------------------------------------- 1260 // AsmExpr 1261 template< typename pass_t > 1262 const ast::Expr * ast::Pass< pass_t >::visit( const ast::AsmExpr * node ) { 1263 VISIT_START( node ); 1264 1265 VISIT({ 1266 guard_indexer guard { *this }; 1267 maybe_accept( node, &AsmExpr::result ); 1268 } 1269 maybe_accept( node, &AsmExpr::inout ); 1270 maybe_accept( node, &AsmExpr::constraint ); 1271 maybe_accept( node, &AsmExpr::operand ); 1272 ) 1273 1274 VISIT_END( Expr, node ); 1275 } 1276 1277 //-------------------------------------------------------------------------- 1278 // ImplicitCopyCtorExpr 1279 template< typename pass_t > 1280 const ast::Expr * ast::Pass< pass_t >::visit( const ast::ImplicitCopyCtorExpr * node ) { 1281 VISIT_START( node ); 1282 1283 VISIT({ 1284 guard_indexer guard { *this }; 1285 maybe_accept( node, &ImplicitCopyCtorExpr::result ); 1286 } 1287 maybe_accept( node, &ImplicitCopyCtorExpr::callExpr ); 1288 maybe_accept( node, &ImplicitCopyCtorExpr::tempDecls ); 1289 maybe_accept( node, &ImplicitCopyCtorExpr::returnDecls ); 1290 maybe_accept( node, &ImplicitCopyCtorExpr::dtors ); 1291 ) 1292 1293 VISIT_END( Expr, node ); 1294 } 1295 1296 //-------------------------------------------------------------------------- 1297 // ConstructorExpr 1298 template< typename pass_t > 1299 const ast::Expr * ast::Pass< pass_t >::visit( const ast::ConstructorExpr * node ) { 1300 VISIT_START( node ); 1301 1302 VISIT({ 1303 guard_indexer guard { *this }; 1304 maybe_accept( node, &ConstructorExpr::result ); 1305 } 1306 maybe_accept( node, &ConstructorExpr::callExpr ); 1307 ) 1308 1309 VISIT_END( Expr, node ); 1310 } 1311 1312 //-------------------------------------------------------------------------- 1313 // CompoundLiteralExpr 1314 template< typename pass_t > 1315 const ast::Expr * ast::Pass< pass_t >::visit( const ast::CompoundLiteralExpr * node ) { 1316 VISIT_START( node ); 1317 1318 VISIT({ 1319 guard_indexer guard { *this }; 1320 maybe_accept( node, &CompoundLiteralExpr::result ); 1321 } 1322 maybe_accept( node, &CompoundLiteralExpr::init ); 1323 ) 1324 1325 VISIT_END( Expr, node ); 1326 } 1327 1328 //-------------------------------------------------------------------------- 1329 // RangeExpr 1330 template< typename pass_t > 1331 const ast::Expr * ast::Pass< pass_t >::visit( const ast::RangeExpr * node ) { 1332 VISIT_START( node ); 1333 1334 VISIT({ 1335 guard_indexer guard { *this }; 1336 maybe_accept( node, &RangeExpr::result ); 1337 } 1338 maybe_accept( node, &RangeExpr::low ); 1339 maybe_accept( node, &RangeExpr::high ); 1340 ) 1341 1342 VISIT_END( Expr, node ); 1343 } 1344 1345 //-------------------------------------------------------------------------- 1346 // UntypedTupleExpr 1347 template< typename pass_t > 1348 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedTupleExpr * node ) { 1349 VISIT_START( node ); 1350 1351 VISIT({ 1352 guard_indexer guard { *this }; 1353 maybe_accept( node, &UntypedTupleExpr::result ); 1354 } 1355 maybe_accept( node, &UntypedTupleExpr::exprs ); 1356 ) 1357 1358 VISIT_END( Expr, node ); 1359 } 1360 1361 //-------------------------------------------------------------------------- 1362 // TupleExpr 1363 template< typename pass_t > 1364 const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleExpr * node ) { 1365 VISIT_START( node ); 1366 1367 VISIT({ 1368 guard_indexer guard { *this }; 1369 maybe_accept( node, &TupleExpr::result ); 1370 } 1371 maybe_accept( node, &TupleExpr::exprs ); 1372 ) 1373 1374 VISIT_END( Expr, node ); 1375 } 1376 1377 //-------------------------------------------------------------------------- 1378 // TupleIndexExpr 1379 template< typename pass_t > 1380 const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleIndexExpr * node ) { 1381 VISIT_START( node ); 1382 1383 VISIT({ 1384 guard_indexer guard { *this }; 1385 maybe_accept( node, &TupleIndexExpr::result ); 1386 } 1387 maybe_accept( node, &TupleIndexExpr::tuple ); 1388 ) 1389 1390 VISIT_END( Expr, node ); 1391 } 1392 1393 //-------------------------------------------------------------------------- 1394 // TupleAssignExpr 1395 template< typename pass_t > 1396 const ast::Expr * ast::Pass< pass_t >::visit( const ast::TupleAssignExpr * node ) { 1397 VISIT_START( node ); 1398 1399 VISIT({ 1400 guard_indexer guard { *this }; 1401 maybe_accept( node, &TupleAssignExpr::result ); 1402 } 1403 maybe_accept( node, &TupleAssignExpr::stmtExpr ); 1404 ) 1405 1406 VISIT_END( Expr, node ); 1407 } 1408 1409 //-------------------------------------------------------------------------- 1410 // StmtExpr 1411 template< typename pass_t > 1412 const ast::Expr * ast::Pass< pass_t >::visit( const ast::StmtExpr * node ) { 1413 VISIT_START( node ); 1414 1415 VISIT(// don't want statements from outer CompoundStmts to be added to this StmtExpr 1416 // get the stmts that will need to be spliced in 1417 auto stmts_before = __pass::stmtsToAddBefore( pass, 0); 1418 auto stmts_after = __pass::stmtsToAddAfter ( pass, 0); 1419 1420 // These may be modified by subnode but most be restored once we exit this statemnet. 1421 ValueGuardPtr< const ast::TypeSubstitution * > __old_env( __pass::env( pass, 0) ); 1422 ValueGuardPtr< typename std::remove_pointer< decltype(stmts_before) >::type > __old_decls_before( stmts_before ); 1423 ValueGuardPtr< typename std::remove_pointer< decltype(stmts_after ) >::type > __old_decls_after ( stmts_after ); 1424 1425 { 1426 guard_indexer guard { *this }; 1427 maybe_accept( node, &StmtExpr::result ); 1428 } 1429 maybe_accept( node, &StmtExpr::stmts ); 1430 maybe_accept( node, &StmtExpr::returnDecls ); 1431 maybe_accept( node, &StmtExpr::dtors ); 1432 ) 1433 1434 VISIT_END( Expr, node ); 1435 } 1436 1437 //-------------------------------------------------------------------------- 1438 // UniqueExpr 1439 template< typename pass_t > 1440 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UniqueExpr * node ) { 1441 VISIT_START( node ); 1442 1443 VISIT({ 1444 guard_indexer guard { *this }; 1445 maybe_accept( node, &UniqueExpr::result ); 1446 } 1447 maybe_accept( node, &UniqueExpr::expr ); 1448 ) 1449 1450 VISIT_END( Expr, node ); 1451 } 1452 1453 //-------------------------------------------------------------------------- 1454 // UntypedInitExpr 1455 template< typename pass_t > 1456 const ast::Expr * ast::Pass< pass_t >::visit( const ast::UntypedInitExpr * node ) { 1457 VISIT_START( node ); 1458 1459 VISIT({ 1460 guard_indexer guard { *this }; 1461 maybe_accept( node, &UntypedInitExpr::result ); 1462 } 1463 maybe_accept( node, &UntypedInitExpr::expr ); 1464 // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver. 1465 ) 1466 1467 VISIT_END( Expr, node ); 1468 } 1469 1470 //-------------------------------------------------------------------------- 1471 // InitExpr 1472 template< typename pass_t > 1473 const ast::Expr * ast::Pass< pass_t >::visit( const ast::InitExpr * node ) { 1474 VISIT_START( node ); 1475 1476 VISIT({ 1477 guard_indexer guard { *this }; 1478 maybe_accept( node, &InitExpr::result ); 1479 } 1480 maybe_accept( node, &InitExpr::expr ); 1481 maybe_accept( node, &InitExpr::designation ); 1482 ) 1483 1484 VISIT_END( Expr, node ); 1485 } 1486 1487 //-------------------------------------------------------------------------- 1488 // DeletedExpr 1489 template< typename pass_t > 1490 const ast::Expr * ast::Pass< pass_t >::visit( const ast::DeletedExpr * node ) { 1491 VISIT_START( node ); 1492 1493 VISIT({ 1494 guard_indexer guard { *this }; 1495 maybe_accept( node, &DeletedExpr::result ); 1496 } 1497 maybe_accept( node, &DeletedExpr::expr ); 1498 // don't visit deleteStmt, because it is a pointer to somewhere else in the tree. 1499 ) 1500 1501 VISIT_END( Expr, node ); 1502 } 1503 1504 //-------------------------------------------------------------------------- 1505 // DefaultArgExpr 1506 template< typename pass_t > 1507 const ast::Expr * ast::Pass< pass_t >::visit( const ast::DefaultArgExpr * node ) { 1508 VISIT_START( node ); 1509 1510 VISIT({ 1511 guard_indexer guard { *this }; 1512 maybe_accept( node, &DefaultArgExpr::result ); 1513 } 1514 maybe_accept( node, &DefaultArgExpr::expr ); 1515 ) 1516 1517 VISIT_END( Expr, node ); 1518 } 1519 1520 //-------------------------------------------------------------------------- 1521 // GenericExpr 1522 template< typename pass_t > 1523 const ast::Expr * ast::Pass< pass_t >::visit( const ast::GenericExpr * node ) { 1524 VISIT_START( node ); 1525 1526 VISIT({ 1527 guard_indexer guard { *this }; 1528 maybe_accept( node, &GenericExpr::result ); 1529 } 1530 maybe_accept( node, &GenericExpr::control ); 1531 1532 std::vector<GenericExpr::Association> new_kids; 1533 new_kids.reserve(node->associations.size()); 1534 bool mutated = false; 1535 for( const auto & assoc : node->associations ) { 1536 Type * type = nullptr; 1537 if( assoc.type ) { 1538 guard_indexer guard { *this }; 1539 type = assoc.type->accept( *this ); 1540 if( type != assoc.type ) mutated = true; 1541 } 1542 Expr * expr = nullptr; 1543 if( assoc.expr ) { 1544 expr = assoc.expr->accept( *this ); 1545 if( expr != assoc.expr ) mutated = true; 1546 } 1547 new_kids.emplace_back( type, expr ); 1548 } 1549 1550 if(mutated) { 1551 auto n = mutate(node); 1552 n->associations = std::move( new_kids ); 1553 node = n; 1554 } 1555 ) 1556 1557 VISIT_END( Expr, node ); 1558 } 913 1559 914 1560 … … 970 1616 } 971 1617 972 // --------------------------------------------------------------------------973 // TypeSubstitution974 template< typename pass_t >975 const ast::TypeSubstitution * ast::Pass< pass_t >::visit( const ast::TypeSubstitution * node ) {976 VISIT_START( node );977 978 VISIT(979 {980 bool mutated = false;981 std::unordered_map< std::string, ast::ptr< ast::Type > > new_map;982 for ( const auto & p : node->typeEnv ) {983 guard_indexer guard { *this };984 auto new_node = p.second->accept( *this );985 if (new_node != p.second) mutated = false;986 new_map.insert({ p.first, new_node });987 }988 if (mutated) {989 auto new_node = mutate( node );990 new_node->typeEnv.swap( new_map );991 node = new_node;992 }993 }994 995 {996 bool mutated = false;997 std::unordered_map< std::string, ast::ptr< ast::Expr > > new_map;998 for ( const auto & p : node->varEnv ) {999 guard_indexer guard { *this };1000 auto new_node = p.second->accept( *this );1001 if (new_node != p.second) mutated = false;1002 new_map.insert({ p.first, new_node });1003 }1004 if (mutated) {1005 auto new_node = mutate( node );1006 new_node->varEnv.swap( new_map );1007 node = new_node;1008 }1009 }1010 )1011 1012 VISIT_END( TypeSubstitution, node );1013 }1618 // //-------------------------------------------------------------------------- 1619 // // TypeSubstitution 1620 // template< typename pass_t > 1621 // const ast::TypeSubstitution * ast::Pass< pass_t >::visit( const ast::TypeSubstitution * node ) { 1622 // VISIT_START( node ); 1623 1624 // VISIT( 1625 // { 1626 // bool mutated = false; 1627 // std::unordered_map< std::string, ast::ptr< ast::Type > > new_map; 1628 // for ( const auto & p : node->typeEnv ) { 1629 // guard_indexer guard { *this }; 1630 // auto new_node = p.second->accept( *this ); 1631 // if (new_node != p.second) mutated = false; 1632 // new_map.insert({ p.first, new_node }); 1633 // } 1634 // if (mutated) { 1635 // auto new_node = mutate( node ); 1636 // new_node->typeEnv.swap( new_map ); 1637 // node = new_node; 1638 // } 1639 // } 1640 1641 // { 1642 // bool mutated = false; 1643 // std::unordered_map< std::string, ast::ptr< ast::Expr > > new_map; 1644 // for ( const auto & p : node->varEnv ) { 1645 // guard_indexer guard { *this }; 1646 // auto new_node = p.second->accept( *this ); 1647 // if (new_node != p.second) mutated = false; 1648 // new_map.insert({ p.first, new_node }); 1649 // } 1650 // if (mutated) { 1651 // auto new_node = mutate( node ); 1652 // new_node->varEnv.swap( new_map ); 1653 // node = new_node; 1654 // } 1655 // } 1656 // ) 1657 1658 // VISIT_END( TypeSubstitution, node ); 1659 // } 1014 1660 1015 1661 #undef VISIT_START -
src/AST/module.mk
r19e567dd r51ff278 1 ######################### -*- Mode: Makefile-Gmake -*- 2 ######################## 1 ######################### -*- Mode: Makefile-Gmake -*- ######################## 3 2 ## 4 3 ## Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo … … 17 16 18 17 SRC_AST = \ 19 AST/Convert.cpp \ 20 AST/Node.cpp \ 21 AST/TypeSubstitution.cpp 18 AST/Attribute.cpp \ 19 AST/Convert.cpp \ 20 AST/Decl.cpp \ 21 AST/DeclReplacer.cpp \ 22 AST/Expr.cpp \ 23 AST/Init.cpp \ 24 AST/LinkageSpec.cpp \ 25 AST/Node.cpp \ 26 AST/Stmt.cpp \ 27 AST/Type.cpp \ 28 AST/TypeSubstitution.cpp 22 29 23 30 … … 25 32 SRC += $(SRC_AST) 26 33 SRCDEMANGLE += $(SRC_AST) 27 -
src/Common/Eval.cc
r19e567dd r51ff278 90 90 } 91 91 92 std::pair<long long int, bool> eval(const ast::Expr * expr) { 93 #warning not implemented 94 return { 0, false }; 95 } 96 92 97 // Local Variables: // 93 98 // tab-width: 4 // -
src/Makefile.am
r19e567dd r51ff278 37 37 endif 38 38 39 include AST/module.mk 39 40 include CodeGen/module.mk 40 41 include CodeTools/module.mk -
src/Makefile.in
r19e567dd r51ff278 16 16 17 17 ######################## -*- Mode: Makefile-Automake -*- ###################### 18 ############################################################################### 19 20 ######################### -*- Mode: Makefile-Gmake -*- ######################## 18 21 ############################################################################### 19 22 … … 162 165 libdemangle_a_LIBADD = 163 166 am__dirstamp = $(am__leading_dot)dirstamp 164 am__objects_1 = CodeGen/CodeGenerator.$(OBJEXT) \ 167 am__objects_1 = AST/Attribute.$(OBJEXT) AST/Convert.$(OBJEXT) \ 168 AST/Decl.$(OBJEXT) AST/DeclReplacer.$(OBJEXT) \ 169 AST/Expr.$(OBJEXT) AST/Init.$(OBJEXT) \ 170 AST/LinkageSpec.$(OBJEXT) AST/Node.$(OBJEXT) \ 171 AST/Stmt.$(OBJEXT) AST/Type.$(OBJEXT) \ 172 AST/TypeSubstitution.$(OBJEXT) 173 am__objects_2 = CodeGen/CodeGenerator.$(OBJEXT) \ 165 174 CodeGen/FixMain.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \ 166 175 CodeGen/OperatorTable.$(OBJEXT) 167 am__objects_ 2= Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \176 am__objects_3 = Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \ 168 177 Common/PassVisitor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \ 169 178 Common/Stats/Counter.$(OBJEXT) Common/Stats/Heap.$(OBJEXT) \ 170 179 Common/Stats/Stats.$(OBJEXT) Common/Stats/Time.$(OBJEXT) \ 171 180 Common/UniqueName.$(OBJEXT) 172 am__objects_ 3= ControlStruct/ForExprMutator.$(OBJEXT) \181 am__objects_4 = ControlStruct/ForExprMutator.$(OBJEXT) \ 173 182 ControlStruct/LabelFixer.$(OBJEXT) \ 174 183 ControlStruct/LabelGenerator.$(OBJEXT) \ 175 184 ControlStruct/MLEMutator.$(OBJEXT) \ 176 185 ControlStruct/Mutate.$(OBJEXT) 177 am__objects_ 4= ResolvExpr/AdjustExprType.$(OBJEXT) \186 am__objects_5 = ResolvExpr/AdjustExprType.$(OBJEXT) \ 178 187 ResolvExpr/Alternative.$(OBJEXT) \ 179 188 ResolvExpr/AlternativeFinder.$(OBJEXT) \ … … 193 202 ResolvExpr/TypeEnvironment.$(OBJEXT) \ 194 203 ResolvExpr/Unify.$(OBJEXT) 195 am__objects_ 5= SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \204 am__objects_6 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \ 196 205 SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \ 197 206 SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT) 198 am__objects_ 6= SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \207 am__objects_7 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \ 199 208 SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \ 200 209 SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \ … … 216 225 SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \ 217 226 SynTree/DeclReplacer.$(OBJEXT) 218 am__objects_ 7= CompilationState.$(OBJEXT) $(am__objects_1) \219 Concurrency/Keywords.$(OBJEXT) $(am__objects_2) \220 $(am__objects_3) GenPoly/GenPoly.$(OBJEXT) \227 am__objects_8 = CompilationState.$(OBJEXT) $(am__objects_1) \ 228 $(am__objects_2) Concurrency/Keywords.$(OBJEXT) \ 229 $(am__objects_3) $(am__objects_4) GenPoly/GenPoly.$(OBJEXT) \ 221 230 GenPoly/Lvalue.$(OBJEXT) InitTweak/GenInit.$(OBJEXT) \ 222 231 InitTweak/InitTweak.$(OBJEXT) Parser/LinkageSpec.$(OBJEXT) \ 223 $(am__objects_ 4) $(am__objects_5) SymTab/Demangle.$(OBJEXT) \224 $(am__objects_ 6) Tuples/TupleAssignment.$(OBJEXT) \232 $(am__objects_5) $(am__objects_6) SymTab/Demangle.$(OBJEXT) \ 233 $(am__objects_7) Tuples/TupleAssignment.$(OBJEXT) \ 225 234 Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \ 226 235 Validate/HandleAttributes.$(OBJEXT) 227 am_libdemangle_a_OBJECTS = $(am__objects_ 7)236 am_libdemangle_a_OBJECTS = $(am__objects_8) 228 237 libdemangle_a_OBJECTS = $(am_libdemangle_a_OBJECTS) 229 238 am__installdirs = "$(DESTDIR)$(cfa_cpplibdir)" 230 239 PROGRAMS = $(cfa_cpplib_PROGRAMS) 231 am__objects_ 8= main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \232 CompilationState.$(OBJEXT) $(am__objects_1) \240 am__objects_9 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \ 241 CompilationState.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ 233 242 CodeGen/Generate.$(OBJEXT) CodeGen/FixNames.$(OBJEXT) \ 234 243 CodeTools/DeclStats.$(OBJEXT) \ 235 244 CodeTools/ResolvProtoDump.$(OBJEXT) \ 236 245 CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \ 237 Concurrency/Waitfor.$(OBJEXT) $(am__objects_ 2) \238 Common/DebugMalloc.$(OBJEXT) $(am__objects_ 3) \246 Concurrency/Waitfor.$(OBJEXT) $(am__objects_3) \ 247 Common/DebugMalloc.$(OBJEXT) $(am__objects_4) \ 239 248 ControlStruct/ExceptTranslate.$(OBJEXT) GenPoly/Box.$(OBJEXT) \ 240 249 GenPoly/GenPoly.$(OBJEXT) GenPoly/ScrubTyVars.$(OBJEXT) \ … … 250 259 Parser/InitializerNode.$(OBJEXT) Parser/TypeData.$(OBJEXT) \ 251 260 Parser/LinkageSpec.$(OBJEXT) Parser/parserutility.$(OBJEXT) \ 252 $(am__objects_ 4) ResolvExpr/AlternativePrinter.$(OBJEXT) \253 $(am__objects_ 5) $(am__objects_6) \261 $(am__objects_5) ResolvExpr/AlternativePrinter.$(OBJEXT) \ 262 $(am__objects_6) $(am__objects_7) \ 254 263 Tuples/TupleAssignment.$(OBJEXT) \ 255 264 Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \ 256 265 Validate/HandleAttributes.$(OBJEXT) \ 257 266 Virtual/ExpandCasts.$(OBJEXT) 258 am____driver_cfa_cpp_OBJECTS = $(am__objects_ 8)267 am____driver_cfa_cpp_OBJECTS = $(am__objects_9) 259 268 ___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS) 260 269 am__DEPENDENCIES_1 = … … 366 375 ETAGS = etags 367 376 CTAGS = ctags 368 am__DIST_COMMON = $(srcdir)/ CodeGen/module.mk \377 am__DIST_COMMON = $(srcdir)/AST/module.mk $(srcdir)/CodeGen/module.mk \ 369 378 $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk \ 370 379 $(srcdir)/Concurrency/module.mk \ … … 526 535 AUTOMAKE_OPTIONS = foreign subdir-objects 527 536 ACLOCAL_AMFLAGS = -I automake 528 SRC = main.cc MakeLibCfa.cc CompilationState.cc $(SRC_ CODEGEN) \529 CodeGen/Generate.cc CodeGen/FixNames.cc CodeTools/DeclStats.cc \530 CodeTools/ ResolvProtoDump.cc CodeTools/TrackLoc.cc \531 Co ncurrency/Keywords.cc Concurrency/Waitfor.cc $(SRC_COMMON)\532 Co mmon/DebugMalloc.cc $(SRC_CONTROLSTRUCT)\533 ControlStruct/ExceptTranslate.cc GenPoly/Box.cc \534 GenPoly/ GenPoly.cc GenPoly/ScrubTyVars.cc GenPoly/Lvalue.cc \535 GenPoly/ Specialize.cc GenPoly/FindFunction.cc \536 GenPoly/ InstantiateGeneric.cc InitTweak/GenInit.cc \537 InitTweak/ FixInit.cc InitTweak/FixGlobalInit.cc \538 InitTweak/ InitTweak.cc Parser/parser.yy Parser/lex.ll\539 Parser/ TypedefTable.cc Parser/ParseNode.cc \540 Parser/ DeclarationNode.cc Parser/ExpressionNode.cc \541 Parser/ StatementNode.cc Parser/InitializerNode.cc \542 Parser/ TypeData.cc Parser/LinkageSpec.cc \543 Parser/ parserutility.cc $(SRC_RESOLVEXPR)\544 ResolvExpr/AlternativePrinter.cc $(SRC_SYMTAB) $(SRC_SYNTREE)\545 Tuples/TupleAssignment.cc Tuples/TupleExpansion.cc \546 Tuples/ Explode.cc Validate/HandleAttributes.cc \547 V irtual/ExpandCasts.cc548 SRCDEMANGLE = CompilationState.cc $(SRC_ CODEGEN) \537 SRC = main.cc MakeLibCfa.cc CompilationState.cc $(SRC_AST) \ 538 $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/FixNames.cc \ 539 CodeTools/DeclStats.cc CodeTools/ResolvProtoDump.cc \ 540 CodeTools/TrackLoc.cc Concurrency/Keywords.cc \ 541 Concurrency/Waitfor.cc $(SRC_COMMON) Common/DebugMalloc.cc \ 542 $(SRC_CONTROLSTRUCT) ControlStruct/ExceptTranslate.cc \ 543 GenPoly/Box.cc GenPoly/GenPoly.cc GenPoly/ScrubTyVars.cc \ 544 GenPoly/Lvalue.cc GenPoly/Specialize.cc \ 545 GenPoly/FindFunction.cc GenPoly/InstantiateGeneric.cc \ 546 InitTweak/GenInit.cc InitTweak/FixInit.cc \ 547 InitTweak/FixGlobalInit.cc InitTweak/InitTweak.cc \ 548 Parser/parser.yy Parser/lex.ll Parser/TypedefTable.cc \ 549 Parser/ParseNode.cc Parser/DeclarationNode.cc \ 550 Parser/ExpressionNode.cc Parser/StatementNode.cc \ 551 Parser/InitializerNode.cc Parser/TypeData.cc \ 552 Parser/LinkageSpec.cc Parser/parserutility.cc \ 553 $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc \ 554 $(SRC_SYMTAB) $(SRC_SYNTREE) Tuples/TupleAssignment.cc \ 555 Tuples/TupleExpansion.cc Tuples/Explode.cc \ 556 Validate/HandleAttributes.cc Virtual/ExpandCasts.cc 557 SRCDEMANGLE = CompilationState.cc $(SRC_AST) $(SRC_CODEGEN) \ 549 558 Concurrency/Keywords.cc $(SRC_COMMON) $(SRC_CONTROLSTRUCT) \ 550 559 GenPoly/GenPoly.cc GenPoly/Lvalue.cc InitTweak/GenInit.cc \ … … 559 568 @WITH_LIBTCMALLOC_TRUE@LIBTCMALLOC = -ltcmalloc 560 569 @WITH_LIBTCMALLOC_TRUE@TCMALLOCFLAG = -DTCMALLOC 570 SRC_AST = \ 571 AST/Attribute.cpp \ 572 AST/Convert.cpp \ 573 AST/Decl.cpp \ 574 AST/DeclReplacer.cpp \ 575 AST/Expr.cpp \ 576 AST/Init.cpp \ 577 AST/LinkageSpec.cpp \ 578 AST/Node.cpp \ 579 AST/Stmt.cpp \ 580 AST/Type.cpp \ 581 AST/TypeSubstitution.cpp 582 561 583 SRC_CODEGEN = \ 562 584 CodeGen/CodeGenerator.cc \ … … 667 689 668 690 .SUFFIXES: 669 .SUFFIXES: .cc . ll .lo .o .obj .yy670 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/ CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)691 .SUFFIXES: .cc .cpp .ll .lo .o .obj .yy 692 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/AST/module.mk $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps) 671 693 @for dep in $?; do \ 672 694 case '$(am__configure_deps)' in \ … … 688 710 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 689 711 esac; 690 $(srcdir)/ CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__empty):712 $(srcdir)/AST/module.mk $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__empty): 691 713 692 714 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) … … 701 723 clean-noinstLIBRARIES: 702 724 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) 725 AST/$(am__dirstamp): 726 @$(MKDIR_P) AST 727 @: > AST/$(am__dirstamp) 728 AST/$(DEPDIR)/$(am__dirstamp): 729 @$(MKDIR_P) AST/$(DEPDIR) 730 @: > AST/$(DEPDIR)/$(am__dirstamp) 731 AST/Attribute.$(OBJEXT): AST/$(am__dirstamp) \ 732 AST/$(DEPDIR)/$(am__dirstamp) 733 AST/Convert.$(OBJEXT): AST/$(am__dirstamp) \ 734 AST/$(DEPDIR)/$(am__dirstamp) 735 AST/Decl.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 736 AST/DeclReplacer.$(OBJEXT): AST/$(am__dirstamp) \ 737 AST/$(DEPDIR)/$(am__dirstamp) 738 AST/Expr.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 739 AST/Init.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 740 AST/LinkageSpec.$(OBJEXT): AST/$(am__dirstamp) \ 741 AST/$(DEPDIR)/$(am__dirstamp) 742 AST/Node.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 743 AST/Stmt.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 744 AST/Type.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp) 745 AST/TypeSubstitution.$(OBJEXT): AST/$(am__dirstamp) \ 746 AST/$(DEPDIR)/$(am__dirstamp) 703 747 CodeGen/$(am__dirstamp): 704 748 @$(MKDIR_P) CodeGen … … 1097 1141 mostlyclean-compile: 1098 1142 -rm -f *.$(OBJEXT) 1143 -rm -f AST/*.$(OBJEXT) 1099 1144 -rm -f CodeGen/*.$(OBJEXT) 1100 1145 -rm -f CodeTools/*.$(OBJEXT) … … 1119 1164 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MakeLibCfa.Po@am__quote@ 1120 1165 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ 1166 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Attribute.Po@am__quote@ 1167 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Convert.Po@am__quote@ 1168 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Decl.Po@am__quote@ 1169 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/DeclReplacer.Po@am__quote@ 1170 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Expr.Po@am__quote@ 1171 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Init.Po@am__quote@ 1172 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/LinkageSpec.Po@am__quote@ 1173 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Node.Po@am__quote@ 1174 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Stmt.Po@am__quote@ 1175 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Type.Po@am__quote@ 1176 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/TypeSubstitution.Po@am__quote@ 1121 1177 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/CodeGenerator.Po@am__quote@ 1122 1178 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/FixMain.Po@am__quote@ … … 1261 1317 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 1262 1318 1319 .cpp.o: 1320 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ 1321 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 1322 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po 1323 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 1324 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1325 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< 1326 1327 .cpp.obj: 1328 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ 1329 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ 1330 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po 1331 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 1332 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1333 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 1334 1335 .cpp.lo: 1336 @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ 1337 @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ 1338 @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo 1339 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 1340 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1341 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 1342 1263 1343 .ll.cc: 1264 1344 $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) … … 1393 1473 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 1394 1474 -rm -f ../driver/$(am__dirstamp) 1475 -rm -f AST/$(DEPDIR)/$(am__dirstamp) 1476 -rm -f AST/$(am__dirstamp) 1395 1477 -rm -f CodeGen/$(DEPDIR)/$(am__dirstamp) 1396 1478 -rm -f CodeGen/$(am__dirstamp) … … 1438 1520 1439 1521 distclean: distclean-am 1440 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)1522 -rm -rf ./$(DEPDIR) AST/$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR) 1441 1523 -rm -f Makefile 1442 1524 distclean-am: clean-am distclean-compile distclean-generic \ … … 1484 1566 1485 1567 maintainer-clean: maintainer-clean-am 1486 -rm -rf ./$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR)1568 -rm -rf ./$(DEPDIR) AST/$(DEPDIR) CodeGen/$(DEPDIR) CodeTools/$(DEPDIR) Common/$(DEPDIR) Common/Stats/$(DEPDIR) Concurrency/$(DEPDIR) ControlStruct/$(DEPDIR) GenPoly/$(DEPDIR) InitTweak/$(DEPDIR) Parser/$(DEPDIR) ResolvExpr/$(DEPDIR) SymTab/$(DEPDIR) SynTree/$(DEPDIR) Tuples/$(DEPDIR) Validate/$(DEPDIR) Virtual/$(DEPDIR) 1487 1569 -rm -f Makefile 1488 1570 maintainer-clean-am: distclean-am maintainer-clean-generic -
src/Tuples/TupleExpansion.cc
r19e567dd r51ff278 353 353 } 354 354 355 const ast::TypeInstType * isTtype( const ast::Type * type ) { 356 #warning unimplemented 357 return nullptr; 358 } 359 355 360 namespace { 356 361 /// determines if impurity (read: side-effects) may exist in a piece of code. Currently gives a very crude approximation, wherein any function call expression means the code may be impure -
src/main.cc
r19e567dd r51ff278 40 40 #include "Common/Stats.h" 41 41 #include "Common/PassVisitor.h" 42 // #include "AST/Pass.hpp"43 42 #include "Common/SemanticError.h" // for SemanticError 44 43 #include "Common/UnimplementedError.h" // for UnimplementedError
Note: See TracChangeset
for help on using the changeset viewer.