Changeset ed96731
- Timestamp:
- Nov 18, 2024, 3:43:38 PM (4 months ago)
- Branches:
- master
- Children:
- 29075d1
- Parents:
- 0dffe91
- Location:
- src
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/AST/Pass.hpp ¶
r0dffe91 red96731 327 327 /// The Pass template handles what *before* and *after* means automatically 328 328 template< template<class...> class container_t = std::list > 329 struct WithStmtsToAdd {329 struct WithStmtsToAddX { 330 330 container_t< ptr<Stmt> > stmtsToAddBefore; 331 331 container_t< ptr<Stmt> > stmtsToAddAfter; 332 332 }; 333 334 struct WithStmtsToAdd : public WithStmtsToAddX<> {}; 333 335 334 336 /// Used if visitor requires added declarations before or after the current node. 335 337 /// The Pass template handles what *before* and *after* means automatically 336 338 template< template<class...> class container_t = std::list > 337 struct WithDeclsToAdd {339 struct WithDeclsToAddX { 338 340 container_t< ptr<Decl> > declsToAddBefore; 339 341 container_t< ptr<Decl> > declsToAddAfter; 340 342 }; 343 344 struct WithDeclsToAdd : public WithDeclsToAddX<> {}; 341 345 342 346 /// Use if visitation should stop at certain levels -
TabularUnified src/Concurrency/Actors.cpp ¶
r0dffe91 red96731 194 194 // collects data needed for next pass that does the circular defn resolution 195 195 // for message send operators (via table above) 196 struct GenFuncsCreateTables : public ast::WithDeclsToAdd <>{196 struct GenFuncsCreateTables : public ast::WithDeclsToAdd { 197 197 unordered_set<const StructDecl *> & actorStructDecls; 198 198 unordered_set<const StructDecl *> & messageStructDecls; … … 451 451 // separate pass is needed since this pass resolves circular defn issues 452 452 // generates the forward declarations of the send operator for actor routines 453 struct FwdDeclOperator : public ast::WithDeclsToAdd <>{453 struct FwdDeclOperator : public ast::WithDeclsToAdd { 454 454 unordered_set<const StructDecl *> & actorStructDecls; 455 455 unordered_set<const StructDecl *> & messageStructDecls; -
TabularUnified src/Concurrency/Corun.cpp ¶
r0dffe91 red96731 25 25 namespace Concurrency { 26 26 27 struct CorunKeyword : public WithDeclsToAdd <>, public WithStmtsToAdd<>{27 struct CorunKeyword : public WithDeclsToAdd, public WithStmtsToAdd { 28 28 UniqueName CorunFnNamer = "__CFA_corun_lambda_"s; 29 29 UniqueName CoforFnNamer = "__CFA_cofor_lambda_"s; -
TabularUnified src/Concurrency/Keywords.cpp ¶
r0dffe91 red96731 117 117 118 118 // -------------------------------------------------------------------------- 119 struct ConcurrentSueKeyword : public ast::WithDeclsToAdd <>{119 struct ConcurrentSueKeyword : public ast::WithDeclsToAdd { 120 120 ConcurrentSueKeyword( 121 121 std::string&& type_name, std::string&& field_name, … … 639 639 // -------------------------------------------------------------------------- 640 640 struct SuspendKeyword final : 641 public ast::WithStmtsToAdd <>, public ast::WithGuards {641 public ast::WithStmtsToAdd, public ast::WithGuards { 642 642 SuspendKeyword() = default; 643 643 virtual ~SuspendKeyword() = default; … … 860 860 861 861 // -------------------------------------------------------------------------- 862 struct MutexKeyword final : public ast::WithDeclsToAdd <>{862 struct MutexKeyword final : public ast::WithDeclsToAdd { 863 863 const ast::FunctionDecl * postvisit( const ast::FunctionDecl * decl ); 864 864 void postvisit( const ast::StructDecl * decl ); -
TabularUnified src/Concurrency/Waituntil.cpp ¶
r0dffe91 red96731 1398 1398 // To add the predicates at global scope we need to do it in a second pass 1399 1399 // Predicates are added after "struct select_node { ... };" 1400 class AddPredicateDecls final : public WithDeclsToAdd <>{1400 class AddPredicateDecls final : public WithDeclsToAdd { 1401 1401 vector<FunctionDecl *> & satFns; 1402 1402 const StructDecl * selectNodeDecl = nullptr; -
TabularUnified src/ControlStruct/ExceptDecl.cpp ¶
r0dffe91 red96731 401 401 } 402 402 403 struct ExceptDeclCore : public ast::WithDeclsToAdd <>{403 struct ExceptDeclCore : public ast::WithDeclsToAdd { 404 404 ast::StructDecl const * transformExcept( ast::StructDecl const * decl ); 405 405 ast::ObjectDecl const * transformVTable( -
TabularUnified src/GenPoly/Box.cpp ¶
r0dffe91 red96731 55 55 /// Adds layout-generation functions to polymorphic types. 56 56 struct LayoutFunctionBuilder final : 57 public ast::WithDeclsToAdd <>,57 public ast::WithDeclsToAdd, 58 58 public ast::WithShortCircuiting, 59 59 public ast::WithVisitorRef<LayoutFunctionBuilder> { … … 344 344 public ast::WithGuards, 345 345 public ast::WithShortCircuiting, 346 public ast::WithStmtsToAdd <>,346 public ast::WithStmtsToAdd, 347 347 public ast::WithVisitorRef<CallAdapter> { 348 348 CallAdapter(); … … 1575 1575 struct PolyGenericCalculator final : 1576 1576 public ast::WithConstTypeSubstitution, 1577 public ast::WithDeclsToAdd <>,1577 public ast::WithDeclsToAdd, 1578 1578 public ast::WithGuards, 1579 public ast::WithStmtsToAdd <>,1579 public ast::WithStmtsToAdd, 1580 1580 public ast::WithVisitorRef<PolyGenericCalculator> { 1581 1581 PolyGenericCalculator(); -
TabularUnified src/GenPoly/InstantiateGeneric.cpp ¶
r0dffe91 red96731 277 277 public ast::WithVisitorRef<FixDtypeStatic>, 278 278 public ast::WithShortCircuiting, 279 public ast::WithStmtsToAdd <>{279 public ast::WithStmtsToAdd { 280 280 ast::ApplicationExpr const * previsit( ast::ApplicationExpr const * expr ); 281 281 void previsit( ast::AddressExpr const * expr ); … … 421 421 public ast::WithCodeLocation, 422 422 public ast::WithConstTypeSubstitution, 423 public ast::WithDeclsToAdd <>,423 public ast::WithDeclsToAdd, 424 424 public ast::WithGuards, 425 425 public ast::WithVisitorRef<GenericInstantiator> -
TabularUnified src/GenPoly/Lvalue.cpp ¶
r0dffe91 red96731 85 85 struct ReferenceConversions final : 86 86 public ast::WithConstTranslationUnit, 87 public ast::WithGuards, public ast::WithStmtsToAdd <>{87 public ast::WithGuards, public ast::WithStmtsToAdd { 88 88 ast::Expr const * postvisit( ast::CastExpr const * expr ); 89 89 ast::Expr const * postvisit( ast::AddressExpr const * expr ); -
TabularUnified src/GenPoly/Specialize.cpp ¶
r0dffe91 red96731 30 30 struct SpecializeCore final : 31 31 public ast::WithConstTypeSubstitution, 32 public ast::WithDeclsToAdd <>,32 public ast::WithDeclsToAdd, 33 33 public ast::WithVisitorRef<SpecializeCore> { 34 34 std::string paramPrefix = "_p"; -
TabularUnified src/InitTweak/FixInit.cpp ¶
r0dffe91 red96731 105 105 /// generate/resolve copy construction expressions for each, and generate/resolve destructors for both 106 106 /// arguments and return value temporaries 107 struct ResolveCopyCtors final : public ast::WithGuards, public ast::WithStmtsToAdd <>, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithVisitorRef<ResolveCopyCtors>, public ast::WithConstTranslationUnit {107 struct ResolveCopyCtors final : public ast::WithGuards, public ast::WithStmtsToAdd, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithVisitorRef<ResolveCopyCtors>, public ast::WithConstTranslationUnit { 108 108 const ast::Expr * postvisit( const ast::ImplicitCopyCtorExpr * impCpCtorExpr ); 109 109 const ast::StmtExpr * previsit( const ast::StmtExpr * stmtExpr ); … … 177 177 /// insert destructor calls at the appropriate places. must happen before CtorInit nodes are removed 178 178 /// (currently by FixInit) 179 struct InsertDtors final : public ObjDeclCollector, public ast::WithStmtsToAdd <>{179 struct InsertDtors final : public ObjDeclCollector, public ast::WithStmtsToAdd { 180 180 InsertDtors( ast::Pass<LabelFinder> & finder ) : finder( finder ), labelVars( finder.core.vars ) {} 181 181 … … 194 194 195 195 /// expand each object declaration to use its constructor after it is declared. 196 struct FixInit : public ast::WithStmtsToAdd <>{196 struct FixInit : public ast::WithStmtsToAdd { 197 197 static void fixInitializers( ast::TranslationUnit &translationUnit ); 198 198 … … 230 230 231 231 /// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument 232 struct FixCtorExprs final : public ast::WithDeclsToAdd <>, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithConstTranslationUnit {232 struct FixCtorExprs final : public ast::WithDeclsToAdd, public ast::WithSymbolTable, public ast::WithShortCircuiting, public ast::WithConstTranslationUnit { 233 233 const ast::Expr * postvisit( const ast::ConstructorExpr * ctorExpr ); 234 234 }; -
TabularUnified src/InitTweak/GenInit.cpp ¶
r0dffe91 red96731 46 46 // Outer pass finds declarations, for their type could wrap a type that needs hoisting 47 47 struct HoistArrayDimension_NoResolve final : 48 public ast::WithDeclsToAdd <>, public ast::WithShortCircuiting,48 public ast::WithDeclsToAdd, public ast::WithShortCircuiting, 49 49 public ast::WithGuards, public ast::WithConstTranslationUnit, 50 50 public ast::WithVisitorRef<HoistArrayDimension_NoResolve>, … … 205 205 206 206 struct ReturnFixer final : 207 public ast::WithStmtsToAdd <>, ast::WithGuards, ast::WithShortCircuiting {207 public ast::WithStmtsToAdd, ast::WithGuards, ast::WithShortCircuiting { 208 208 void previsit( const ast::FunctionDecl * decl ); 209 209 const ast::ReturnStmt * previsit( const ast::ReturnStmt * stmt ); -
TabularUnified src/ResolvExpr/Resolver.cpp ¶
r0dffe91 red96731 375 375 : public ast::WithSymbolTable, public ast::WithGuards, 376 376 public ast::WithVisitorRef<Resolver>, public ast::WithShortCircuiting, 377 public ast::WithStmtsToAdd <>{377 public ast::WithStmtsToAdd { 378 378 379 379 ast::ptr< ast::Type > functionReturn = nullptr; -
TabularUnified src/Tuples/TupleExpansion.cpp ¶
r0dffe91 red96731 28 28 }; 29 29 30 struct UniqueExprExpander final : public ast::WithDeclsToAdd <>{30 struct UniqueExprExpander final : public ast::WithDeclsToAdd { 31 31 const ast::Expr * postvisit( const ast::UniqueExpr * unqExpr ); 32 32 // Not a vector, because they may not be adding in increasing order. … … 37 37 struct TupleMainExpander final : 38 38 public ast::WithCodeLocation, 39 public ast::WithDeclsToAdd <>,39 public ast::WithDeclsToAdd, 40 40 public ast::WithGuards, 41 41 public ast::WithVisitorRef<TupleMainExpander> { -
TabularUnified src/Validate/Autogen.cpp ¶
r0dffe91 red96731 50 50 // -------------------------------------------------------------------------- 51 51 struct AutogenerateRoutines final : 52 public ast::WithDeclsToAdd <>,52 public ast::WithDeclsToAdd, 53 53 public ast::WithShortCircuiting { 54 54 void previsit( const ast::EnumDecl * enumDecl ); -
TabularUnified src/Validate/CompoundLiteral.cpp ¶
r0dffe91 red96731 27 27 28 28 struct CompoundLiteral final : 29 public ast::WithDeclsToAdd <>{29 public ast::WithDeclsToAdd { 30 30 ast::Storage::Classes storageClasses; 31 31 -
TabularUnified src/Validate/HoistStruct.cpp ¶
r0dffe91 red96731 68 68 */ 69 69 struct HoistStructCore final : 70 public ast::WithDeclsToAdd <>, public ast::WithGuards {70 public ast::WithDeclsToAdd, public ast::WithGuards { 71 71 ast::StructDecl const * previsit( ast::StructDecl const * decl ); 72 72 ast::StructDecl const * postvisit( ast::StructDecl const * decl ); -
TabularUnified src/Validate/HoistTypeDecls.cpp ¶
r0dffe91 red96731 22 22 namespace { 23 23 24 struct HoistTypeDecls final : public ast::WithDeclsToAdd <>{24 struct HoistTypeDecls final : public ast::WithDeclsToAdd { 25 25 void previsit( ast::SizeofExpr const * ); 26 26 void previsit( ast::AlignofExpr const * ); -
TabularUnified src/Validate/ImplementEnumFunc.cpp ¶
r0dffe91 red96731 472 472 473 473 struct ImplementEnumFunc final : 474 public ast::WithDeclsToAdd <>, public ast::WithShortCircuiting {474 public ast::WithDeclsToAdd, public ast::WithShortCircuiting { 475 475 void previsit(const ast::EnumDecl* enumDecl); 476 476 void previsit(const ast::FunctionDecl* functionDecl); -
TabularUnified src/Validate/LinkInstanceTypes.cpp ¶
r0dffe91 red96731 27 27 struct LinkTypesCore : public WithNoIdSymbolTable, 28 28 public ast::WithCodeLocation, 29 public ast::WithDeclsToAdd <>,29 public ast::WithDeclsToAdd, 30 30 public ast::WithGuards, 31 31 public ast::WithShortCircuiting, -
TabularUnified src/Validate/ReplaceTypedef.cpp ¶
r0dffe91 red96731 28 28 struct ReplaceTypedefCore final : 29 29 public ast::WithCodeLocation, 30 public ast::WithDeclsToAdd <>,30 public ast::WithDeclsToAdd, 31 31 public ast::WithGuards, 32 32 public ast::WithShortCircuiting, -
TabularUnified src/Virtual/VirtualDtor.cpp ¶
r0dffe91 red96731 119 119 // collects data needed for next pass that does the circular defn resolution 120 120 // for dtor setters and delete fns (via table above) 121 struct GenFuncsCreateTables : public ast::WithDeclsToAdd <>{121 struct GenFuncsCreateTables : public ast::WithDeclsToAdd { 122 122 unordered_map<const StructDecl *, CtorDtor> & structDecls; 123 123 CtorDtorTable & torDecls; … … 351 351 // separate pass is needed since __CFA_set_dtor needs to be defined after 352 352 // the last dtor defn which is found in prior pass 353 struct GenSetDtor : public ast::WithDeclsToAdd <>{353 struct GenSetDtor : public ast::WithDeclsToAdd { 354 354 unordered_map<const StructDecl *, CtorDtor> & structDecls; // set of decls that inherit from virt dtor 355 355 CtorDtorTable & torDecls;
Note: See TracChangeset
for help on using the changeset viewer.