Changes in / [ce31925:25793da]
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/Makefile.am
rce31925 r25793da 19 19 20 20 # applies to both programs 21 AM_CXXFLAGS = @HOST_FLAGS@ -Wall -Wextra -Werror=return-type -O2 -g -std=c++1 4-I${abs_top_srcdir}/src -I${abs_top_srcdir}/src/include21 AM_CXXFLAGS = @HOST_FLAGS@ -Wall -Wextra -Werror=return-type -O2 -g -std=c++17 -I${abs_top_srcdir}/src -I${abs_top_srcdir}/src/include 22 22 23 23 # don't install cfa directly -
libcfa/prelude/Makefile.am
rce31925 r25793da 50 50 51 51 prelude.cfa : prelude-gen.cc 52 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++1 452 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++17 53 53 @./prelude-gen > ${@} 54 54 @rm ./prelude-gen -
src/AST/Pass.hpp
rce31925 r25793da 327 327 struct PureVisitor {}; 328 328 329 struct WithCodeLocation { 330 const CodeLocation * location = nullptr; 331 }; 332 329 333 /// Keep track of the polymorphic const TypeSubstitution * typeSubs for the current expression. 330 334 struct WithConstTypeSubstitution { -
src/AST/Pass.impl.hpp
rce31925 r25793da 25 25 #define VISIT_START( node ) \ 26 26 using namespace ast; \ 27 /* back-up the last known code location */ \ 28 __attribute__((unused)) auto loc_guard = ast::__pass::make_location_guard( core, node ); \ 27 29 /* back-up the visit children */ \ 28 30 __attribute__((unused)) ast::__pass::visit_children_guard guard1( ast::__pass::visit_children(core, 0) ); \ -
src/AST/Pass.proto.hpp
rce31925 r25793da 295 295 FIELD_PTR( at_cleanup, __pass::at_cleanup_t ) 296 296 FIELD_PTR( visitor, ast::Pass<core_t> * const ) 297 FIELD_PTR( location, const CodeLocation * ) 297 298 298 299 // Remove the macro to make sure we don't clash … … 324 325 static auto on_error (core_t & core, ptr<Decl> & decl, int) -> decltype(core.on_error(decl)) { 325 326 return core.on_error(decl); 327 } 328 329 template< typename core_t, typename node_t > 330 static auto make_location_guard(core_t & core, node_t * node) -> ValueGuardPtr<const CodeLocation *> { 331 if constexpr (std::is_base_of<ParseNode, node_t>::value) { 332 const CodeLocation ** p = location(core, 0); 333 if(p) { 334 ValueGuardPtr<const CodeLocation *> g = { p }; 335 *p = &node->location; 336 return g; 337 } 338 } 339 (void)node; 340 return { nullptr }; 326 341 } 327 342 -
src/Common/utility.h
rce31925 r25793da 322 322 323 323 ValueGuardPtr(T * inRef) : old( inRef ? *inRef : T() ), ref(inRef) {} 324 ValueGuardPtr(const ValueGuardPtr& other) = delete; 325 ValueGuardPtr(ValueGuardPtr&& other) : old(other.old), ref(other.ref) { other.ref = nullptr; } 324 326 ~ValueGuardPtr() { if( ref ) *ref = old; } 325 327 }; -
src/ControlStruct/LabelFixer.cc
rce31925 r25793da 119 119 120 120 // Builds a table that maps a label to its defining statement. 121 std::map<Label, Statement * > * LabelFixer::resolveJumps() throw ( SemanticErrorException ){121 std::map<Label, Statement * > * LabelFixer::resolveJumps() { 122 122 std::map< Label, Statement * > *ret = new std::map< Label, Statement * >(); 123 123 for ( std::map< Label, Entry * >::iterator i = labelTable.begin(); i != labelTable.end(); ++i ) { -
src/ControlStruct/LabelFixer.h
rce31925 r25793da 33 33 LabelFixer( LabelGenerator *gen = 0 ); 34 34 35 std::map < Label, Statement * > *resolveJumps() throw ( SemanticErrorException );35 std::map < Label, Statement * > *resolveJumps(); 36 36 37 37 // Declarations -
src/ControlStruct/MLEMutator.cc
rce31925 r25793da 141 141 142 142 143 Statement *MultiLevelExitMutator::postmutate( BranchStmt *branchStmt ) 144 throw ( SemanticErrorException ) { 143 Statement *MultiLevelExitMutator::postmutate( BranchStmt *branchStmt ) { 145 144 std::string originalTarget = branchStmt->originalTarget; 146 145 -
src/ControlStruct/MLEMutator.h
rce31925 r25793da 41 41 42 42 void premutate( CompoundStmt *cmpndStmt ); 43 Statement * postmutate( BranchStmt *branchStmt ) throw ( SemanticErrorException );43 Statement * postmutate( BranchStmt *branchStmt ); 44 44 void premutate( WhileDoStmt *whileDoStmt ); 45 45 Statement * postmutate( WhileDoStmt *whileDoStmt ); -
src/GenPoly/InstantiateGenericNew.cpp
rce31925 r25793da 417 417 418 418 struct GenericInstantiator final : 419 public ast::WithCodeLocation, 420 public ast::WithConstTypeSubstitution, 421 public ast::WithDeclsToAdd<>, 419 422 public ast::WithGuards, 420 public ast::WithVisitorRef<GenericInstantiator>, 421 public ast::WithConstTypeSubstitution, 422 public ast::WithDeclsToAdd<> { 423 public ast::WithVisitorRef<GenericInstantiator> 424 { 423 425 /// Map of (generic type, parameter list) pairs 424 426 /// to concrete type instantiations. … … 435 437 /// member from an instantiation. 436 438 int memberIndex = -1; 437 /// Keep track of the nearest location to fill in locations.438 CodeLocation const * location = nullptr;439 439 440 440 GenericInstantiator() : -
src/Makefile.am
rce31925 r25793da 71 71 EXTRA_DIST = include/cassert include/optional BasicTypes-gen.cc 72 72 73 AM_CXXFLAGS = @HOST_FLAGS@ -Wno-deprecated -Wall -Wextra -Werror=return-type -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O3 -g -std=c++1 4$(TCMALLOCFLAG)73 AM_CXXFLAGS = @HOST_FLAGS@ -Wno-deprecated -Wall -Wextra -Werror=return-type -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O3 -g -std=c++17 $(TCMALLOCFLAG) 74 74 AM_LDFLAGS = @HOST_FLAGS@ -Xlinker -export-dynamic 75 75 ARFLAGS = cr -
src/SynTree/Statement.cc
rce31925 r25793da 105 105 }; 106 106 107 BranchStmt::BranchStmt( Label target, Type type ) throw ( SemanticErrorException ):107 BranchStmt::BranchStmt( Label target, Type type ) : 108 108 Statement(), originalTarget( target ), target( target ), computedTarget( nullptr ), type( type ) { 109 109 //actually this is a syntactic error signaled by the parser … … 113 113 } 114 114 115 BranchStmt::BranchStmt( Expression * computedTarget, Type type ) throw ( SemanticErrorException ):115 BranchStmt::BranchStmt( Expression * computedTarget, Type type ) : 116 116 Statement(), computedTarget( computedTarget ), type( type ) { 117 117 if ( type != BranchStmt::Goto || computedTarget == nullptr ) { … … 211 211 } 212 212 213 CaseStmt::CaseStmt( Expression * condition, const list<Statement *> & statements, bool deflt ) throw ( SemanticErrorException ):213 CaseStmt::CaseStmt( Expression * condition, const list<Statement *> & statements, bool deflt ) : 214 214 Statement(), condition( condition ), stmts( statements ), _isDefault( deflt ) { 215 215 if ( isDefault() && condition != nullptr ) SemanticError( condition, "default case with condition: " ); … … 575 575 } 576 576 577 MutexStmt::MutexStmt( Statement * stmt, const list<Expression *> mutexObjs ) 577 MutexStmt::MutexStmt( Statement * stmt, const list<Expression *> mutexObjs ) 578 578 : Statement(), stmt( stmt ), mutexObjs( mutexObjs ) { } 579 579 -
src/SynTree/Statement.h
rce31925 r25793da 200 200 std::list<Statement *> stmts; 201 201 202 CaseStmt( Expression * conditions, const std::list<Statement *> & stmts, bool isdef = false ) throw (SemanticErrorException);202 CaseStmt( Expression * conditions, const std::list<Statement *> & stmts, bool isdef = false ); 203 203 CaseStmt( const CaseStmt & other ); 204 204 virtual ~CaseStmt(); … … 289 289 Type type; 290 290 291 BranchStmt( Label target, Type ) throw (SemanticErrorException);292 BranchStmt( Expression * computedTarget, Type ) throw (SemanticErrorException);291 BranchStmt( Label target, Type ); 292 BranchStmt( Expression * computedTarget, Type ); 293 293 294 294 Label get_originalTarget() { return originalTarget; }
Note:
See TracChangeset
for help on using the changeset viewer.