Changes in / [19e567dd:51ff278]


Ignore:
Location:
src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.hpp

    r19e567dd r51ff278  
    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

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

    r19e567dd r51ff278  
    571571        __pass::indexer::addType( pass, 0, node );
    572572
    573         maybe_accept( node, &TypedefDecl::assertions );
     573        VISIT( 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 ExprStmt * node ) {
     628const ast::Stmt * ast::Pass< pass_t >::visit( const ast::ExprStmt * node ) {
    629629        VISIT_START( node );
    630630
     
    666666const ast::Stmt * ast::Pass< pass_t >::visit( const ast::IfStmt * node ) {
    667667        VISIT_START( node );
     668
    668669        VISIT({
    669670                // if statements introduce a level of scope (for the initialization)
     
    674675                maybe_accept( node, &IfStmt::elsePart );
    675676        })
     677
    676678        VISIT_END( Stmt, node );
    677679}
     
    680682// WhileStmt
    681683template< typename pass_t >
    682 const ast::Stmt * ast::Pass< pass_t >::visit( const WhileStmt * node ) {
     684const ast::Stmt * ast::Pass< pass_t >::visit( const ast::WhileStmt * node ) {
    683685        VISIT_START( node );
    684686
     
    910912}
    911913
    912 
     914//--------------------------------------------------------------------------
     915// ApplicationExpr
     916template< typename pass_t >
     917const 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
     934template< typename pass_t >
     935const 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
     952template< typename pass_t >
     953const 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
     966template< typename pass_t >
     967const 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
     982template< typename pass_t >
     983const 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
     998template< typename pass_t >
     999const 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
     1014template< typename pass_t >
     1015const 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
     1030template< typename pass_t >
     1031const 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
     1044template< typename pass_t >
     1045const 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
     1061template< typename pass_t >
     1062const 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
     1077template< typename pass_t >
     1078const 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
     1091template< typename pass_t >
     1092const 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
     1105template< typename pass_t >
     1106const 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
     1125template< typename pass_t >
     1126const 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
     1145template< typename pass_t >
     1146const 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
     1161template< typename pass_t >
     1162const 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
     1177template< typename pass_t >
     1178const 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
     1193template< typename pass_t >
     1194const 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
     1210template< typename pass_t >
     1211const 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
     1228template< typename pass_t >
     1229const 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
     1245template< typename pass_t >
     1246const 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
     1261template< typename pass_t >
     1262const 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
     1279template< typename pass_t >
     1280const 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
     1298template< typename pass_t >
     1299const 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
     1314template< typename pass_t >
     1315const 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
     1330template< typename pass_t >
     1331const 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
     1347template< typename pass_t >
     1348const 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
     1363template< typename pass_t >
     1364const 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
     1379template< typename pass_t >
     1380const 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
     1395template< typename pass_t >
     1396const 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
     1411template< typename pass_t >
     1412const 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
     1439template< typename pass_t >
     1440const 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
     1455template< typename pass_t >
     1456const 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
     1472template< typename pass_t >
     1473const 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
     1489template< typename pass_t >
     1490const 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
     1506template< typename pass_t >
     1507const 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
     1522template< typename pass_t >
     1523const 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}
    9131559
    9141560
     
    9701616}
    9711617
    972 //--------------------------------------------------------------------------
    973 // TypeSubstitution
    974 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// }
    10141660
    10151661#undef VISIT_START
  • src/AST/module.mk

    r19e567dd r51ff278  
    1 ######################### -*- Mode: Makefile-Gmake -*-
    2 ########################
     1######################### -*- Mode: Makefile-Gmake -*- ########################
    32##
    43## Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo
     
    1716
    1817SRC_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
    2229
    2330
     
    2532SRC += $(SRC_AST)
    2633SRCDEMANGLE += $(SRC_AST)
    27 
  • src/Common/Eval.cc

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

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

    r19e567dd r51ff278  
    1616
    1717######################## -*- Mode: Makefile-Automake -*- ######################
     18###############################################################################
     19
     20######################### -*- Mode: Makefile-Gmake -*- ########################
    1821###############################################################################
    1922
     
    162165libdemangle_a_LIBADD =
    163166am__dirstamp = $(am__leading_dot)dirstamp
    164 am__objects_1 = CodeGen/CodeGenerator.$(OBJEXT) \
     167am__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)
     173am__objects_2 = CodeGen/CodeGenerator.$(OBJEXT) \
    165174        CodeGen/FixMain.$(OBJEXT) CodeGen/GenType.$(OBJEXT) \
    166175        CodeGen/OperatorTable.$(OBJEXT)
    167 am__objects_2 = Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \
     176am__objects_3 = Common/Assert.$(OBJEXT) Common/Eval.$(OBJEXT) \
    168177        Common/PassVisitor.$(OBJEXT) Common/SemanticError.$(OBJEXT) \
    169178        Common/Stats/Counter.$(OBJEXT) Common/Stats/Heap.$(OBJEXT) \
    170179        Common/Stats/Stats.$(OBJEXT) Common/Stats/Time.$(OBJEXT) \
    171180        Common/UniqueName.$(OBJEXT)
    172 am__objects_3 = ControlStruct/ForExprMutator.$(OBJEXT) \
     181am__objects_4 = ControlStruct/ForExprMutator.$(OBJEXT) \
    173182        ControlStruct/LabelFixer.$(OBJEXT) \
    174183        ControlStruct/LabelGenerator.$(OBJEXT) \
    175184        ControlStruct/MLEMutator.$(OBJEXT) \
    176185        ControlStruct/Mutate.$(OBJEXT)
    177 am__objects_4 = ResolvExpr/AdjustExprType.$(OBJEXT) \
     186am__objects_5 = ResolvExpr/AdjustExprType.$(OBJEXT) \
    178187        ResolvExpr/Alternative.$(OBJEXT) \
    179188        ResolvExpr/AlternativeFinder.$(OBJEXT) \
     
    193202        ResolvExpr/TypeEnvironment.$(OBJEXT) \
    194203        ResolvExpr/Unify.$(OBJEXT)
    195 am__objects_5 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
     204am__objects_6 = SymTab/Autogen.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
    196205        SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \
    197206        SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT)
    198 am__objects_6 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
     207am__objects_7 = SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
    199208        SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \
    200209        SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \
     
    216225        SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \
    217226        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) \
     227am__objects_8 = CompilationState.$(OBJEXT) $(am__objects_1) \
     228        $(am__objects_2) Concurrency/Keywords.$(OBJEXT) \
     229        $(am__objects_3) $(am__objects_4) GenPoly/GenPoly.$(OBJEXT) \
    221230        GenPoly/Lvalue.$(OBJEXT) InitTweak/GenInit.$(OBJEXT) \
    222231        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) \
    225234        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
    226235        Validate/HandleAttributes.$(OBJEXT)
    227 am_libdemangle_a_OBJECTS = $(am__objects_7)
     236am_libdemangle_a_OBJECTS = $(am__objects_8)
    228237libdemangle_a_OBJECTS = $(am_libdemangle_a_OBJECTS)
    229238am__installdirs = "$(DESTDIR)$(cfa_cpplibdir)"
    230239PROGRAMS = $(cfa_cpplib_PROGRAMS)
    231 am__objects_8 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
    232         CompilationState.$(OBJEXT) $(am__objects_1) \
     240am__objects_9 = main.$(OBJEXT) MakeLibCfa.$(OBJEXT) \
     241        CompilationState.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
    233242        CodeGen/Generate.$(OBJEXT) CodeGen/FixNames.$(OBJEXT) \
    234243        CodeTools/DeclStats.$(OBJEXT) \
    235244        CodeTools/ResolvProtoDump.$(OBJEXT) \
    236245        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) \
    239248        ControlStruct/ExceptTranslate.$(OBJEXT) GenPoly/Box.$(OBJEXT) \
    240249        GenPoly/GenPoly.$(OBJEXT) GenPoly/ScrubTyVars.$(OBJEXT) \
     
    250259        Parser/InitializerNode.$(OBJEXT) Parser/TypeData.$(OBJEXT) \
    251260        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) \
    254263        Tuples/TupleAssignment.$(OBJEXT) \
    255264        Tuples/TupleExpansion.$(OBJEXT) Tuples/Explode.$(OBJEXT) \
    256265        Validate/HandleAttributes.$(OBJEXT) \
    257266        Virtual/ExpandCasts.$(OBJEXT)
    258 am____driver_cfa_cpp_OBJECTS = $(am__objects_8)
     267am____driver_cfa_cpp_OBJECTS = $(am__objects_9)
    259268___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS)
    260269am__DEPENDENCIES_1 =
     
    366375ETAGS = etags
    367376CTAGS = ctags
    368 am__DIST_COMMON = $(srcdir)/CodeGen/module.mk \
     377am__DIST_COMMON = $(srcdir)/AST/module.mk $(srcdir)/CodeGen/module.mk \
    369378        $(srcdir)/CodeTools/module.mk $(srcdir)/Common/module.mk \
    370379        $(srcdir)/Concurrency/module.mk \
     
    526535AUTOMAKE_OPTIONS = foreign subdir-objects
    527536ACLOCAL_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         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
    548 SRCDEMANGLE = CompilationState.cc $(SRC_CODEGEN) \
     537SRC = 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
     557SRCDEMANGLE = CompilationState.cc $(SRC_AST) $(SRC_CODEGEN) \
    549558        Concurrency/Keywords.cc $(SRC_COMMON) $(SRC_CONTROLSTRUCT) \
    550559        GenPoly/GenPoly.cc GenPoly/Lvalue.cc InitTweak/GenInit.cc \
     
    559568@WITH_LIBTCMALLOC_TRUE@LIBTCMALLOC = -ltcmalloc
    560569@WITH_LIBTCMALLOC_TRUE@TCMALLOCFLAG = -DTCMALLOC
     570SRC_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
    561583SRC_CODEGEN = \
    562584        CodeGen/CodeGenerator.cc \
     
    667689
    668690.SUFFIXES:
    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)
     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)
    671693        @for dep in $?; do \
    672694          case '$(am__configure_deps)' in \
     
    688710            cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
    689711        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):
    691713
    692714$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     
    701723clean-noinstLIBRARIES:
    702724        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
     725AST/$(am__dirstamp):
     726        @$(MKDIR_P) AST
     727        @: > AST/$(am__dirstamp)
     728AST/$(DEPDIR)/$(am__dirstamp):
     729        @$(MKDIR_P) AST/$(DEPDIR)
     730        @: > AST/$(DEPDIR)/$(am__dirstamp)
     731AST/Attribute.$(OBJEXT): AST/$(am__dirstamp) \
     732        AST/$(DEPDIR)/$(am__dirstamp)
     733AST/Convert.$(OBJEXT): AST/$(am__dirstamp) \
     734        AST/$(DEPDIR)/$(am__dirstamp)
     735AST/Decl.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     736AST/DeclReplacer.$(OBJEXT): AST/$(am__dirstamp) \
     737        AST/$(DEPDIR)/$(am__dirstamp)
     738AST/Expr.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     739AST/Init.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     740AST/LinkageSpec.$(OBJEXT): AST/$(am__dirstamp) \
     741        AST/$(DEPDIR)/$(am__dirstamp)
     742AST/Node.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     743AST/Stmt.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     744AST/Type.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     745AST/TypeSubstitution.$(OBJEXT): AST/$(am__dirstamp) \
     746        AST/$(DEPDIR)/$(am__dirstamp)
    703747CodeGen/$(am__dirstamp):
    704748        @$(MKDIR_P) CodeGen
     
    10971141mostlyclean-compile:
    10981142        -rm -f *.$(OBJEXT)
     1143        -rm -f AST/*.$(OBJEXT)
    10991144        -rm -f CodeGen/*.$(OBJEXT)
    11001145        -rm -f CodeTools/*.$(OBJEXT)
     
    11191164@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MakeLibCfa.Po@am__quote@
    11201165@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@
    11211177@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/CodeGenerator.Po@am__quote@
    11221178@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/FixMain.Po@am__quote@
     
    12611317@am__fastdepCXX_FALSE@  $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
    12621318
     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
    12631343.ll.cc:
    12641344        $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
     
    13931473        -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
    13941474        -rm -f ../driver/$(am__dirstamp)
     1475        -rm -f AST/$(DEPDIR)/$(am__dirstamp)
     1476        -rm -f AST/$(am__dirstamp)
    13951477        -rm -f CodeGen/$(DEPDIR)/$(am__dirstamp)
    13961478        -rm -f CodeGen/$(am__dirstamp)
     
    14381520
    14391521distclean: 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)
    14411523        -rm -f Makefile
    14421524distclean-am: clean-am distclean-compile distclean-generic \
     
    14841566
    14851567maintainer-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)
    14871569        -rm -f Makefile
    14881570maintainer-clean-am: distclean-am maintainer-clean-generic
  • src/Tuples/TupleExpansion.cc

    r19e567dd r51ff278  
    353353        }
    354354
     355        const ast::TypeInstType * isTtype( const ast::Type * type ) {
     356                #warning unimplemented
     357                return nullptr;
     358        }
     359
    355360        namespace {
    356361                /// 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  
    4040#include "Common/Stats.h"
    4141#include "Common/PassVisitor.h"
    42 // #include "AST/Pass.hpp"
    4342#include "Common/SemanticError.h"           // for SemanticError
    4443#include "Common/UnimplementedError.h"      // for UnimplementedError
Note: See TracChangeset for help on using the changeset viewer.