Changeset 8d182b1 for src/Validate
- Timestamp:
- Nov 14, 2023, 12:19:09 PM (23 months ago)
- Branches:
- master
- Children:
- 1ccae59, 89a8bab
- Parents:
- df8ba61a (diff), 5625427 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Validate
- Files:
-
- 3 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/Autogen.cpp
rdf8ba61a r8d182b1 49 49 50 50 // -------------------------------------------------------------------------- 51 struct AutogenerateRoutines _newfinal :51 struct AutogenerateRoutines final : 52 52 public ast::WithDeclsToAdd<>, 53 53 public ast::WithShortCircuiting { … … 232 232 233 233 // -------------------------------------------------------------------------- 234 void AutogenerateRoutines _new::previsit( const ast::EnumDecl * enumDecl ) {234 void AutogenerateRoutines::previsit( const ast::EnumDecl * enumDecl ) { 235 235 // Must visit children (enum constants) to add them to the symbol table. 236 236 if ( !enumDecl->body ) return; … … 249 249 } 250 250 251 void AutogenerateRoutines _new::previsit( const ast::StructDecl * structDecl ) {251 void AutogenerateRoutines::previsit( const ast::StructDecl * structDecl ) { 252 252 visit_children = false; 253 253 if ( !structDecl->body ) return; … … 265 265 } 266 266 267 void AutogenerateRoutines _new::previsit( const ast::UnionDecl * unionDecl ) {267 void AutogenerateRoutines::previsit( const ast::UnionDecl * unionDecl ) { 268 268 visit_children = false; 269 269 if ( !unionDecl->body ) return; … … 282 282 283 283 /// Generate ctor/dtors/assign for typedecls, e.g., otype T = int *; 284 void AutogenerateRoutines _new::previsit( const ast::TypeDecl * typeDecl ) {284 void AutogenerateRoutines::previsit( const ast::TypeDecl * typeDecl ) { 285 285 if ( !typeDecl->base ) return; 286 286 … … 290 290 } 291 291 292 void AutogenerateRoutines _new::previsit( const ast::TraitDecl * ) {292 void AutogenerateRoutines::previsit( const ast::TraitDecl * ) { 293 293 // Ensure that we don't add assignment ops for types defined as part of the trait 294 294 visit_children = false; 295 295 } 296 296 297 void AutogenerateRoutines _new::previsit( const ast::FunctionDecl * ) {297 void AutogenerateRoutines::previsit( const ast::FunctionDecl * ) { 298 298 // Track whether we're currently in a function. 299 299 // Can ignore function type idiosyncrasies, because function type can never … … 302 302 } 303 303 304 void AutogenerateRoutines _new::postvisit( const ast::FunctionDecl * ) {304 void AutogenerateRoutines::postvisit( const ast::FunctionDecl * ) { 305 305 functionNesting -= 1; 306 306 } … … 521 521 const ast::Expr * src, const ast::ObjectDecl * field, 522 522 ast::FunctionDecl * func, SymTab::LoopDirection direction ) { 523 InitTweak::InitExpander _newsrcParam( src );523 InitTweak::InitExpander srcParam( src ); 524 524 // Assign to destination. 525 525 ast::MemberExpr * dstSelect = new ast::MemberExpr( … … 795 795 796 796 void autogenerateRoutines( ast::TranslationUnit & translationUnit ) { 797 ast::Pass<AutogenerateRoutines _new>::run( translationUnit );797 ast::Pass<AutogenerateRoutines>::run( translationUnit ); 798 798 } 799 799 -
src/Validate/FindSpecialDecls.h
rdf8ba61a r8d182b1 16 16 #pragma once 17 17 18 #include <list> // for list19 20 class Declaration;21 class FunctionDecl;22 class StructDecl;23 class Type;24 25 18 namespace ast { 26 19 class TranslationUnit; … … 28 21 29 22 namespace Validate { 30 /// size_t type - set when size_t typedef is seen. Useful in a few places,31 /// such as in determining array dimension type32 extern Type * SizeType;33 34 /// intrinsic dereference operator for unqualified types - set when *? function is seen in FindSpecialDeclarations.35 /// Useful for creating dereference ApplicationExprs without a full resolver pass.36 extern FunctionDecl * dereferenceOperator;37 38 /// special built-in functions and data structures necessary for destructor generation39 extern StructDecl * dtorStruct;40 extern FunctionDecl * dtorStructDestroy;41 42 /// find and remember some of the special declarations that are useful for generating code, so that they do not have to be discovered multiple times.43 void findSpecialDecls( std::list< Declaration * > & translationUnit );44 23 45 24 /// Find and remember some of the special declarations that are useful for -
src/Validate/module.mk
rdf8ba61a r8d182b1 16 16 17 17 SRC_VALIDATE = \ 18 Validate/FindSpecialDecls.cc \19 18 Validate/FindSpecialDecls.h 20 19 … … 37 36 Validate/GenericParameter.cpp \ 38 37 Validate/GenericParameter.hpp \ 39 Validate/HandleAttributes.cc \40 Validate/HandleAttributes.h \41 38 Validate/HoistStruct.cpp \ 42 39 Validate/HoistStruct.hpp \
Note:
See TracChangeset
for help on using the changeset viewer.