Changeset 298fe57 for src/Validate
- Timestamp:
- Apr 29, 2022, 1:30:49 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 4cb1a24
- Parents:
- ffef246
- Location:
- src/Validate
- Files:
-
- 7 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/ForallPointerDecay.cpp
rffef246 r298fe57 10 10 // Created On : Tue Dec 7 16:15:00 2021 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Feb 11 10:59:00 202213 // Update Count : 012 // Last Modified On : Sat Apr 23 13:10:00 2022 13 // Update Count : 1 14 14 // 15 15 … … 237 237 } 238 238 239 std::vector<ast::ptr<ast::DeclWithType>> expandAssertions( 240 std::vector<ast::ptr<ast::DeclWithType>> const & old ) { 241 return TraitExpander::expandAssertions( old ); 242 } 243 239 244 } // namespace Validate 240 245 -
src/Validate/ForallPointerDecay.hpp
rffef246 r298fe57 10 10 // Created On : Tue Dec 7 16:15:00 2021 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tue Dec 8 11:50:00 202113 // Update Count : 012 // Last Modified On : Sat Apr 23 13:13:00 2022 13 // Update Count : 1 14 14 // 15 15 16 16 #pragma once 17 17 18 #include <vector> 19 #include "AST/Node.hpp" 20 18 21 namespace ast { 22 class DeclWithType; 19 23 class TranslationUnit; 20 24 } … … 27 31 void decayForallPointers( ast::TranslationUnit & transUnit ); 28 32 33 /// Expand all traits in an assertion list. 34 std::vector<ast::ptr<ast::DeclWithType>> expandAssertions( 35 std::vector<ast::ptr<ast::DeclWithType>> const & ); 36 29 37 } 30 38 -
src/Validate/GenericParameter.cpp
rffef246 r298fe57 10 10 // Created On : Fri Mar 21 10:02:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Apr 13 10:09:00 202213 // Update Count : 012 // Last Modified On : Fri Apr 22 16:43:00 2022 13 // Update Count : 1 14 14 // 15 15 … … 22 22 #include "AST/TranslationUnit.hpp" 23 23 #include "AST/Type.hpp" 24 #include "Validate/NoIdSymbolTable.hpp" 24 25 25 26 namespace Validate { … … 138 139 // -------------------------------------------------------------------------- 139 140 140 // A SymbolTable that only has the operations used in the Translate Dimension 141 // pass. More importantly, it doesn't have some methods that should no be 142 // called by the Pass template (lookupId and addId). 143 class NoIdSymbolTable { 144 ast::SymbolTable base; 145 public: 146 # define FORWARD_X( func, types_and_names, just_names ) \ 147 inline auto func types_and_names -> decltype( base.func just_names ) { \ 148 return base.func just_names ; \ 149 } 150 # define FORWARD_0( func ) FORWARD_X( func, (), () ) 151 # define FORWARD_1( func, type ) FORWARD_X( func, (type arg), (arg) ) 152 # define FORWARD_2( func, t0, t1 ) FORWARD_X( func, (t0 a0, t1 a1), (a0, a1) ) 153 154 FORWARD_0( enterScope ) 155 FORWARD_0( leaveScope ) 156 FORWARD_1( lookupType, const std::string & ) 157 FORWARD_1( addType , const ast::NamedTypeDecl * ) 158 FORWARD_1( addStruct , const ast::StructDecl * ) 159 FORWARD_1( addEnum , const ast::EnumDecl * ) 160 FORWARD_1( addUnion , const ast::UnionDecl * ) 161 FORWARD_1( addTrait , const ast::TraitDecl * ) 162 FORWARD_2( addWith , const std::vector< ast::ptr<ast::Expr> > &, const ast::Decl * ) 163 }; 164 165 struct TranslateDimensionCore : public ast::WithGuards { 166 NoIdSymbolTable symtab; 141 struct TranslateDimensionCore : 142 public WithNoIdSymbolTable, public ast::WithGuards { 167 143 168 144 // SUIT: Struct- or Union- InstType -
src/Validate/module.mk
rffef246 r298fe57 20 20 Validate/CompoundLiteral.cpp \ 21 21 Validate/CompoundLiteral.hpp \ 22 Validate/EliminateTypedef.cpp \ 23 Validate/EliminateTypedef.hpp \ 24 Validate/FixQualifiedTypes.cpp \ 25 Validate/FixQualifiedTypes.hpp \ 22 26 Validate/ForallPointerDecay.cpp \ 23 27 Validate/ForallPointerDecay.hpp \ … … 26 30 Validate/HandleAttributes.cc \ 27 31 Validate/HandleAttributes.h \ 32 Validate/HoistStruct.cpp \ 33 Validate/HoistStruct.hpp \ 28 34 Validate/InitializerLength.cpp \ 29 35 Validate/InitializerLength.hpp \ 30 36 Validate/LabelAddressFixer.cpp \ 31 37 Validate/LabelAddressFixer.hpp \ 38 Validate/NoIdSymbolTable.hpp \ 32 39 Validate/ReturnCheck.cpp \ 33 40 Validate/ReturnCheck.hpp \
Note: See TracChangeset
for help on using the changeset viewer.