Changeset eb779d5
- Timestamp:
- Oct 9, 2023, 12:55:09 PM (15 months ago)
- Branches:
- master
- Children:
- 26dfce5
- Parents:
- 0d49efb
- Location:
- src
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r0d49efb reb779d5 650 650 } 651 651 652 const ast::Stmt * visit( const ast::CorunStmt * node ) override final { 653 // There is no old-AST CorunStmt, so this should never be called. 654 assert( !node ); 655 return nullptr; 656 } 657 652 658 TypeSubstitution * convertTypeSubstitution(const ast::TypeSubstitution * src) { 653 659 -
src/AST/Fwd.hpp
r0d49efb reb779d5 67 67 class ImplicitCtorDtorStmt; 68 68 class MutexStmt; 69 class CorunStmt; 69 70 70 71 class Expr; -
src/AST/Node.cpp
r0d49efb reb779d5 192 192 template class ast::ptr_base< ast::MutexStmt, ast::Node::ref_type::weak >; 193 193 template class ast::ptr_base< ast::MutexStmt, ast::Node::ref_type::strong >; 194 template class ast::ptr_base< ast::CorunStmt, ast::Node::ref_type::weak >; 195 template class ast::ptr_base< ast::CorunStmt, ast::Node::ref_type::strong >; 194 196 template class ast::ptr_base< ast::Expr, ast::Node::ref_type::weak >; 195 197 template class ast::ptr_base< ast::Expr, ast::Node::ref_type::strong >; -
src/AST/Pass.hpp
r0d49efb reb779d5 171 171 const ast::Stmt * visit( const ast::ImplicitCtorDtorStmt * ) override final; 172 172 const ast::Stmt * visit( const ast::MutexStmt * ) override final; 173 const ast::Stmt * visit( const ast::CorunStmt * ) override final; 173 174 const ast::Expr * visit( const ast::ApplicationExpr * ) override final; 174 175 const ast::Expr * visit( const ast::UntypedExpr * ) override final; -
src/AST/Pass.impl.hpp
r0d49efb reb779d5 1121 1121 1122 1122 //-------------------------------------------------------------------------- 1123 // CorunStmt 1124 template< typename core_t > 1125 const ast::Stmt * ast::Pass< core_t >::visit( const ast::CorunStmt * node ) { 1126 VISIT_START( node ); 1127 1128 if ( __visit_children() ) { 1129 maybe_accept( node, &CorunStmt::stmt ); 1130 } 1131 1132 VISIT_END( Stmt, node ); 1133 } 1134 1135 //-------------------------------------------------------------------------- 1123 1136 // ApplicationExpr 1124 1137 template< typename core_t > -
src/AST/Print.cpp
r0d49efb reb779d5 922 922 } 923 923 924 virtual const ast::Stmt * visit( const ast::CorunStmt * node ) override final { 925 os << "Corun Statement" << endl; 926 os << indent << "... with Statement: "; 927 ++indent; 928 safe_print( node->stmt ); 929 --indent; 930 os << endl; 931 932 return node; 933 } 934 924 935 virtual const ast::Expr * visit( const ast::ApplicationExpr * node ) override final { 925 936 ++indent; -
src/AST/Stmt.hpp
r0d49efb reb779d5 532 532 }; 533 533 534 // Corun Statement 535 class CorunStmt final : public Stmt { 536 public: 537 ptr<Stmt> stmt; 538 539 CorunStmt( const CodeLocation & loc, const Stmt * stmt, const std::vector<Label> && labels = {} ) 540 : Stmt(loc, std::move(labels)), stmt(stmt) {} 541 542 const Stmt * accept( Visitor & v ) const override { return v.visit( this ); } 543 private: 544 CorunStmt * clone() const override { return new CorunStmt{ *this }; } 545 MUTATE_FRIEND 546 }; 547 534 548 } // namespace ast 535 549 -
src/AST/Visitor.hpp
r0d49efb reb779d5 59 59 virtual const ast::Stmt * visit( const ast::ImplicitCtorDtorStmt * ) = 0; 60 60 virtual const ast::Stmt * visit( const ast::MutexStmt * ) = 0; 61 virtual const ast::Stmt * visit( const ast::CorunStmt * ) = 0; 61 62 virtual const ast::Expr * visit( const ast::ApplicationExpr * ) = 0; 62 63 virtual const ast::Expr * visit( const ast::UntypedExpr * ) = 0; -
src/Common/CodeLocationTools.cpp
r0d49efb reb779d5 137 137 macro(ImplicitCtorDtorStmt, Stmt) \ 138 138 macro(MutexStmt, Stmt) \ 139 macro(CorunStmt, Stmt) \ 139 140 macro(ApplicationExpr, Expr) \ 140 141 macro(UntypedExpr, Expr) \ -
src/Concurrency/module.mk
r0d49efb reb779d5 18 18 Concurrency/Actors.cpp \ 19 19 Concurrency/Actors.hpp \ 20 Concurrency/Corun.cpp \ 21 Concurrency/Corun.hpp \ 20 22 Concurrency/KeywordsNew.cpp \ 21 23 Concurrency/Keywords.cc \ -
src/Parser/StatementNode.cc
r0d49efb reb779d5 498 498 } // build_mutex 499 499 500 ast::Stmt * build_corun( const CodeLocation & location, StatementNode * stmt ) { 501 ast::Stmt * body = maybeMoveBuild( stmt ); 502 return new ast::CorunStmt( location, body ); 503 } // build_corun 504 500 505 // Local Variables: // 501 506 // tab-width: 4 // -
src/Parser/StatementNode.h
r0d49efb reb779d5 105 105 ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt ); 106 106 ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt ); 107 ast::Stmt * build_corun( const CodeLocation &, StatementNode * stmt ); -
src/Parser/parser.yy
r0d49efb reb779d5 1721 1721 corun_statement: 1722 1722 CORUN statement 1723 { SemanticError( yylloc, "corun statement is currently unimplemented." ); $$ = nullptr; }1723 { $$ = new StatementNode( build_corun( yylloc, $2 ) ); } 1724 1724 ; 1725 1725 -
src/main.cc
r0d49efb reb779d5 46 46 #include "Common/utility.h" // for deleteAll, filter, printAll 47 47 #include "Concurrency/Actors.hpp" // for implementActors 48 #include "Concurrency/Corun.hpp" // for implementCorun 48 49 #include "Concurrency/Keywords.h" // for implementMutex, implement... 49 50 #include "Concurrency/Waitfor.h" // for generateWaitfor … … 345 346 PASS( "Implement Concurrent Keywords", Concurrency::implementKeywords, transUnit ); 346 347 PASS( "Fix Unique Ids", Validate::fixUniqueIds, transUnit ); 348 PASS( "Implement Corun", Concurrency::implementCorun, transUnit ); 347 349 PASS( "Hoist Control Declarations", ControlStruct::hoistControlDecls, transUnit ); 348 350
Note: See TracChangeset
for help on using the changeset viewer.