Changes in / [51ff278:19e567dd]


Ignore:
Location:
src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.hpp

    r51ff278 r19e567dd  
    521521};
    522522
    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 
    524524/// calls, one for each argument
    525525class ImplicitCopyCtorExpr final : public Expr {
     
    621621};
    622622
    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, 
    625625///     e.g. `[a, b, c] = [d, e, f];`
    626626/// mass-assignment: left-hand side has tuple type and right-hand side does not:
     
    630630        ptr<StmtExpr> stmtExpr;
    631631
    632         TupleAssignExpr(
    633                 const CodeLocation & loc, std::vector<ptr<Expr>> && assigns,
     632        TupleAssignExpr( 
     633                const CodeLocation & loc, std::vector<ptr<Expr>> && assigns, 
    634634                std::vector<ptr<ObjectDecl>> && tempDecls );
    635 
     635       
    636636        const Expr * accept( Visitor & v ) const override { return v.visit( this ); }
    637637private:
  • src/AST/Fwd.hpp

    r51ff278 r19e567dd  
    1515
    1616#pragma once
    17 
    18 #include <string>
    1917
    2018#include "AST/Node.hpp"
     
    136134
    137135template < typename ... Params >
    138 std::string toString( const Params & ... params ) {
    139         #warning not implemented
    140         return "";
    141 }
     136std::string toString( const Params & ... params );
    142137
    143138typedef unsigned int UniqueId;
  • src/AST/Pass.impl.hpp

    r51ff278 r19e567dd  
    571571        __pass::indexer::addType( pass, 0, node );
    572572
    573         VISIT( maybe_accept( node, &TypedefDecl::assertions ); )
     573        maybe_accept( node, &TypedefDecl::assertions );
    574574
    575575        VISIT_END( Decl, node );
     
    626626// ExprStmt
    627627template< typename pass_t >
    628 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ExprStmt * node ) {
     628const ast::Stmt * ast::Pass< pass_t >::visit( const ExprStmt * node ) {
    629629        VISIT_START( node );
    630630
     
    666666const ast::Stmt * ast::Pass< pass_t >::visit( const ast::IfStmt * node ) {
    667667        VISIT_START( node );
    668 
    669668        VISIT({
    670669                // if statements introduce a level of scope (for the initialization)
     
    675674                maybe_accept( node, &IfStmt::elsePart );
    676675        })
    677 
    678676        VISIT_END( Stmt, node );
    679677}
     
    682680// WhileStmt
    683681template< typename pass_t >
    684 const ast::Stmt * ast::Pass< pass_t >::visit( const ast::WhileStmt * node ) {
     682const ast::Stmt * ast::Pass< pass_t >::visit( const WhileStmt * node ) {
    685683        VISIT_START( node );
    686684
     
    912910}
    913911
    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 }
     912
    1559913
    1560914
     
    1616970}
    1617971
    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 // }
     972//--------------------------------------------------------------------------
     973// TypeSubstitution
     974template< typename pass_t >
     975const 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}
    16601014
    16611015#undef VISIT_START
  • src/AST/module.mk

    r51ff278 r19e567dd  
    1 ######################### -*- Mode: Makefile-Gmake -*- ########################
     1######################### -*- Mode: Makefile-Gmake -*-
     2########################
    23##
    34## Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo
     
    1617
    1718SRC_AST = \
    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
     19     AST/Convert.cpp \
     20     AST/Node.cpp \
     21     AST/TypeSubstitution.cpp
    2922
    3023
     
    3225SRC += $(SRC_AST)
    3326SRCDEMANGLE += $(SRC_AST)
     27
  • src/Common/Eval.cc

    r51ff278 r19e567dd  
    9090}
    9191
    92 std::pair<long long int, bool> eval(const ast::Expr * expr) {
    93         #warning not implemented
    94         return { 0, false };
    95 }
    96 
    9792// Local Variables: //
    9893// tab-width: 4 //
  • src/Makefile.am

    r51ff278 r19e567dd  
    3737endif
    3838
    39 include AST/module.mk
    4039include CodeGen/module.mk
    4140include CodeTools/module.mk
  • src/Makefile.in

    r51ff278 r19e567dd  
    1616
    1717######################## -*- Mode: Makefile-Automake -*- ######################
    18 ###############################################################################
    19 
    20 ######################### -*- Mode: Makefile-Gmake -*- ########################
    2118###############################################################################
    2219
     
    165162libdemangle_a_LIBADD =
    166163am__dirstamp = $(am__leading_dot)dirstamp
    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) \
     164am__objects_1 = CodeGen/CodeGenerator.$(OBJEXT) \
    174165        CodeGen/FixMain.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \
    175166        CodeGen/OperatorTable.$(OBJEXT)
    176 am__objects_3 = Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \
     167am__objects_2 = Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \
    177168        Common/PassVisitor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \
    178169        Common/Stats/Counter.$(OBJEXT) Common/Stats/Heap.$(OBJEXT) \
    179170        Common/Stats/Stats.$(OBJEXT) Common/Stats/Time.$(OBJEXT) \
    180171        Common/UniqueName.$(OBJEXT)
    181 am__objects_4 = ControlStruct/ForExprMutator.$(OBJEXT) \
     172am__objects_3 = ControlStruct/ForExprMutator.$(OBJEXT) \
    182173        ControlStruct/LabelFixer.$(OBJEXT) \
    183174        ControlStruct/LabelGenerator.$(OBJEXT) \
    184175        ControlStruct/MLEMutator.$(OBJEXT) \
    185176        ControlStruct/Mutate.$(OBJEXT)
    186 am__objects_5 = ResolvExpr/AdjustExprType.$(OBJEXT) \
     177am__objects_4 = ResolvExpr/AdjustExprType.$(OBJEXT) \
    187178        ResolvExpr/Alternative.$(OBJEXT) \
    188179        ResolvExpr/AlternativeFinder.$(OBJEXT) \
     
    202193        ResolvExpr/TypeEnvironment.$(OBJEXT) \
    203194        ResolvExpr/Unify.$(OBJEXT)
    204 am__objects_6 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
     195am__objects_5 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
    205196        SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \
    206197        SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT)
    207 am__objects_7 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
     198am__objects_6 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
    208199        SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \
    209200        SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \
     
    225216        SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \
    226217        SynTree/DeclReplacer.$(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) \
     218am__objects_7 = CompilationState.$(OBJEXT) $(am__objects_1) \
     219        Concurrency/Keywords.$(OBJEXT) $(am__objects_2) \
     220        $(am__objects_3) GenPoly/GenPoly.$(OBJEXT) \
    230221        GenPoly/Lvalue.$(OBJEXT) InitTweak/GenInit.$(OBJEXT) \
    231222        InitTweak/InitTweak.$(OBJEXT) Parser/LinkageSpec.$(OBJEXT) \
    232         $(am__objects_5) $(am__objects_6) SymTab/Demangle.$(OBJEXT) \
    233         $(am__objects_7) Tuples/TupleAssignment.$(OBJEXT) \
     223        $(am__objects_4) $(am__objects_5) SymTab/Demangle.$(OBJEXT) \
     224        $(am__objects_6) Tuples/TupleAssignment.$(OBJEXT) \
    234225        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
    235226        Validate/HandleAttributes.$(OBJEXT)
    236 am_libdemangle_a_OBJECTS = $(am__objects_8)
     227am_libdemangle_a_OBJECTS = $(am__objects_7)
    237228libdemangle_a_OBJECTS = $(am_libdemangle_a_OBJECTS)
    238229am__installdirs = "$(DESTDIR)$(cfa_cpplibdir)"
    239230PROGRAMS = $(cfa_cpplib_PROGRAMS)
    240 am__objects_9 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
    241         CompilationState.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
     231am__objects_8 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
     232        CompilationState.$(OBJEXT) $(am__objects_1) \
    242233        CodeGen/Generate.$(OBJEXT) CodeGen/FixNames.$(OBJEXT) \
    243234        CodeTools/DeclStats.$(OBJEXT) \
    244235        CodeTools/ResolvProtoDump.$(OBJEXT) \
    245236        CodeTools/TrackLoc.$(OBJEXT) Concurrency/Keywords.$(OBJEXT) \
    246         Concurrency/Waitfor.$(OBJEXT) $(am__objects_3) \
    247         Common/DebugMalloc.$(OBJEXT) $(am__objects_4) \
     237        Concurrency/Waitfor.$(OBJEXT) $(am__objects_2) \
     238        Common/DebugMalloc.$(OBJEXT) $(am__objects_3) \
    248239        ControlStruct/ExceptTranslate.$(OBJEXT) GenPoly/Box.$(OBJEXT) \
    249240        GenPoly/GenPoly.$(OBJEXT) GenPoly/ScrubTyVars.$(OBJEXT) \
     
    259250        Parser/InitializerNode.$(OBJEXT) Parser/TypeData.$(OBJEXT) \
    260251        Parser/LinkageSpec.$(OBJEXT) Parser/parserutility.$(OBJEXT) \
    261         $(am__objects_5) ResolvExpr/AlternativePrinter.$(OBJEXT) \
    262         $(am__objects_6) $(am__objects_7) \
     252        $(am__objects_4) ResolvExpr/AlternativePrinter.$(OBJEXT) \
     253        $(am__objects_5) $(am__objects_6) \
    263254        Tuples/TupleAssignment.$(OBJEXT) \
    264255        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
    265256        Validate/HandleAttributes.$(OBJEXT) \
    266257        Virtual/ExpandCasts.$(OBJEXT)
    267 am____driver_cfa_cpp_OBJECTS = $(am__objects_9)
     258am____driver_cfa_cpp_OBJECTS = $(am__objects_8)
    268259___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS)
    269260am__DEPENDENCIES_1 =
     
    375366ETAGS = etags
    376367CTAGS = ctags
    377 am__DIST_COMMON = $(srcdir)/AST/module.mk $(srcdir)/CodeGen/module.mk \
     368am__DIST_COMMON = $(srcdir)/CodeGen/module.mk \
    378369        $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk \
    379370        $(srcdir)/Concurrency/module.mk \
     
    535526AUTOMAKE_OPTIONS = foreign subdir-objects
    536527ACLOCAL_AMFLAGS = -I automake
    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) \
     528SRC = 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        Concurrency/Keywords.cc Concurrency/Waitfor.cc $(SRC_COMMON) \
     532        Common/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        Virtual/ExpandCasts.cc
     548SRCDEMANGLE = CompilationState.cc $(SRC_CODEGEN) \
    558549        Concurrency/Keywords.cc $(SRC_COMMON) $(SRC_CONTROLSTRUCT) \
    559550        GenPoly/GenPoly.cc GenPoly/Lvalue.cc InitTweak/GenInit.cc \
     
    568559@WITH_LIBTCMALLOC_TRUE@LIBTCMALLOC = -ltcmalloc
    569560@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 
    583561SRC_CODEGEN = \
    584562        CodeGen/CodeGenerator.cc \
     
    689667
    690668.SUFFIXES:
    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)
     669.SUFFIXES: .cc .ll .lo .o .obj .yy
     670$(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)
    693671        @for dep in $?; do \
    694672          case '$(am__configure_deps)' in \
     
    710688            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    711689        esac;
    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):
     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):
    713691
    714692$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    723701clean-noinstLIBRARIES:
    724702        -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)
    747703CodeGen/$(am__dirstamp):
    748704        @$(MKDIR_P) CodeGen
     
    11411097mostlyclean-compile:
    11421098        -rm -f *.$(OBJEXT)
    1143         -rm -f AST/*.$(OBJEXT)
    11441099        -rm -f CodeGen/*.$(OBJEXT)
    11451100        -rm -f CodeTools/*.$(OBJEXT)
     
    11641119@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MakeLibCfa.Po@am__quote@
    11651120@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@
    11771121@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/CodeGenerator.Po@am__quote@
    11781122@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/FixMain.Po@am__quote@
     
    13171261@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
    13181262
    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 
    13431263.ll.cc:
    13441264        $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
     
    14731393        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
    14741394        -rm -f ../driver/$(am__dirstamp)
    1475         -rm -f AST/$(DEPDIR)/$(am__dirstamp)
    1476         -rm -f AST/$(am__dirstamp)
    14771395        -rm -f CodeGen/$(DEPDIR)/$(am__dirstamp)
    14781396        -rm -f CodeGen/$(am__dirstamp)
     
    15201438
    15211439distclean: distclean-am
    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)
     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)
    15231441        -rm -f Makefile
    15241442distclean-am: clean-am distclean-compile distclean-generic \
     
    15661484
    15671485maintainer-clean: maintainer-clean-am
    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)
     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)
    15691487        -rm -f Makefile
    15701488maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/Tuples/TupleExpansion.cc

    r51ff278 r19e567dd  
    353353        }
    354354
    355         const ast::TypeInstType * isTtype( const ast::Type * type ) {
    356                 #warning unimplemented
    357                 return nullptr;
    358         }
    359 
    360355        namespace {
    361356                /// 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

    r51ff278 r19e567dd  
    4040#include "Common/Stats.h"
    4141#include "Common/PassVisitor.h"
     42// #include "AST/Pass.hpp"
    4243#include "Common/SemanticError.h"           // for SemanticError
    4344#include "Common/UnimplementedError.h"      // for UnimplementedError
Note: See TracChangeset for help on using the changeset viewer.