Changeset ce36b55
- Timestamp:
- Nov 15, 2021, 2:51:44 PM (23 months ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 1387ea0
- Parents:
- 5dcb881
- Location:
- src
- Files:
-
- 5 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Copy.cpp
r5dcb881 rce36b55 105 105 } 106 106 107 Node * deepCopyNode( const Node * localRoot ) { 107 template<> 108 Node * deepCopy<Node>( const Node * localRoot ) { 108 109 Pass< DeepCopyCore > dc; 109 110 Node const * newRoot = localRoot->accept( dc ); -
src/AST/Copy.hpp
r5dcb881 rce36b55 44 44 } 45 45 46 Node * deepCopyNode( const Node * node );47 48 46 template<typename node_t> 49 47 node_t * deepCopy( const node_t * localRoot ) { 50 return strict_dynamic_cast<node_t *>( deepCopy Node( localRoot ) );48 return strict_dynamic_cast<node_t *>( deepCopy<Node>( localRoot ) ); 51 49 } 50 51 template<> 52 Node * deepCopy<Node>( const Node * localRoot ); 52 53 53 54 } -
src/AST/Init.hpp
r5dcb881 rce36b55 98 98 const_iterator begin() const { return initializers.begin(); } 99 99 const_iterator end() const { return initializers.end(); } 100 size_t size() const { return initializers.size(); } 100 101 101 102 const Init * accept( Visitor & v ) const override { return v.visit( this ); } -
src/AST/Pass.hpp
r5dcb881 rce36b55 109 109 static auto read( node_type const * node, Args&&... args ) { 110 110 Pass<core_t> visitor( std::forward<Args>( args )... ); 111 node_typeconst * temp = node->accept( visitor );111 auto const * temp = node->accept( visitor ); 112 112 assert( temp == node ); 113 113 return visitor.get_result(); … … 124 124 static auto read( node_type const * node ) { 125 125 Pass<core_t> visitor; 126 node_typeconst * temp = node->accept( visitor );126 auto const * temp = node->accept( visitor ); 127 127 assert( temp == node ); 128 128 return visitor.get_result(); -
src/InitTweak/FixInitNew.cpp
r5dcb881 rce36b55 591 591 // need to add __Destructor for _tmp_cp variables as well 592 592 593 assertf( ast::dtorStruct && ast::dtorStruct->members.size() == 2, "Destructor generation requires __Destructor definition." ); 593 assertf( ast::dtorStruct, "Destructor generation requires __Destructor definition." ); 594 assertf( ast::dtorStruct->members.size() == 2, "__Destructor definition does not have expected fields." ); 594 595 assertf( ast::dtorStructDestroy, "Destructor generation requires __destroy_Destructor." ); 595 596 … … 1216 1217 1217 1218 static UniqueName memberDtorNamer = { "__memberDtor" }; 1218 assertf( Validate::dtorStruct, "builtin __Destructor not found." );1219 assertf( Validate::dtorStructDestroy, "builtin __destroy_Destructor not found." );1219 assertf( ast::dtorStruct, "builtin __Destructor not found." ); 1220 assertf( ast::dtorStructDestroy, "builtin __destroy_Destructor not found." ); 1220 1221 1221 1222 ast::Expr * thisExpr = new ast::CastExpr( new ast::AddressExpr( new ast::VariableExpr(loc, thisParam ) ), new ast::PointerType( new ast::VoidType(), ast::CV::Qualifiers() ) ); -
src/Validate/FindSpecialDecls.h
r5dcb881 rce36b55 9 9 // Author : Rob Schluntz 10 10 // Created On : Thu Aug 30 09:49:02 2018 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Thu Aug 30 09:51:12 201813 // Update Count : 211 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Nov 10 15:16:00 2021 13 // Update Count : 3 14 14 // 15 15 … … 22 22 class StructDecl; 23 23 class Type; 24 25 namespace ast { 26 class TranslationUnit; 27 } 24 28 25 29 namespace Validate { … … 38 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. 39 43 void findSpecialDecls( std::list< Declaration * > & translationUnit ); 44 45 /// find and remember some of the special declarations that are useful for 46 /// generating code, so that they do not have to be discovered multiple times. 47 void findGlobalDecls( ast::TranslationUnit & translationUnit ); 48 40 49 } // namespace Validate 41 50 -
src/Validate/module.mk
r5dcb881 rce36b55 15 15 ############################################################################### 16 16 17 SRC += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h 18 SRCDEMANGLE += Validate/HandleAttributes.cc Validate/HandleAttributes.h Validate/FindSpecialDecls.cc Validate/FindSpecialDecls.h 17 SRC_VALIDATE = \ 18 Validate/HandleAttributes.cc \ 19 Validate/HandleAttributes.h \ 20 Validate/InitializerLength.cpp \ 21 Validate/InitializerLength.hpp \ 22 Validate/LabelAddressFixer.cpp \ 23 Validate/LabelAddressFixer.hpp \ 24 Validate/FindSpecialDeclsNew.cpp \ 25 Validate/FindSpecialDecls.cc \ 26 Validate/FindSpecialDecls.h 27 28 SRC += $(SRC_VALIDATE) 29 SRCDEMANGLE += $(SRC_VALIDATE) -
src/main.cc
r5dcb881 rce36b55 72 72 #include "SynTree/Visitor.h" // for acceptAll 73 73 #include "Tuples/Tuples.h" // for expandMemberTuples, expan... 74 #include "Validate/FindSpecialDecls.h" // for findGlobalDecls 75 #include "Validate/InitializerLength.hpp" // for setLengthFromInitializer 76 #include "Validate/LabelAddressFixer.hpp" // for fixLabelAddresses 74 77 #include "Virtual/ExpandCasts.h" // for expandCasts 75 78 … … 323 326 PASS( "Validate-D", SymTab::validate_D( translationUnit ) ); 324 327 PASS( "Validate-E", SymTab::validate_E( translationUnit ) ); 325 PASS( "Validate-F", SymTab::validate_F( translationUnit ) );326 328 327 329 CodeTools::fillLocations( translationUnit ); … … 336 338 forceFillCodeLocations( transUnit ); 337 339 340 PASS( "Set Length From Initializer", Validate::setLengthFromInitializer( transUnit ) ); 341 PASS( "Find Global Decls", Validate::findGlobalDecls( transUnit ) ); 342 PASS( "Fix Label Address", Validate::fixLabelAddresses( transUnit ) ); 343 338 344 if ( symtabp ) { 339 345 return EXIT_SUCCESS; … … 396 402 translationUnit = convert( move( transUnit ) ); 397 403 } else { 404 PASS( "Validate-F", SymTab::validate_F( translationUnit ) ); 405 398 406 if ( symtabp ) { 399 407 deleteAll( translationUnit );
Note: See TracChangeset
for help on using the changeset viewer.