Changes in / [25793da:ce31925]
- Files:
-
- 14 edited
-
driver/Makefile.am (modified) (1 diff)
-
libcfa/prelude/Makefile.am (modified) (1 diff)
-
src/AST/Pass.hpp (modified) (1 diff)
-
src/AST/Pass.impl.hpp (modified) (1 diff)
-
src/AST/Pass.proto.hpp (modified) (2 diffs)
-
src/Common/utility.h (modified) (1 diff)
-
src/ControlStruct/LabelFixer.cc (modified) (1 diff)
-
src/ControlStruct/LabelFixer.h (modified) (1 diff)
-
src/ControlStruct/MLEMutator.cc (modified) (1 diff)
-
src/ControlStruct/MLEMutator.h (modified) (1 diff)
-
src/GenPoly/InstantiateGenericNew.cpp (modified) (2 diffs)
-
src/Makefile.am (modified) (1 diff)
-
src/SynTree/Statement.cc (modified) (4 diffs)
-
src/SynTree/Statement.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
driver/Makefile.am
r25793da rce31925 19 19 20 20 # applies to both programs 21 AM_CXXFLAGS = @HOST_FLAGS@ -Wall -Wextra -Werror=return-type -O2 -g -std=c++1 7-I${abs_top_srcdir}/src -I${abs_top_srcdir}/src/include21 AM_CXXFLAGS = @HOST_FLAGS@ -Wall -Wextra -Werror=return-type -O2 -g -std=c++14 -I${abs_top_srcdir}/src -I${abs_top_srcdir}/src/include 22 22 23 23 # don't install cfa directly -
libcfa/prelude/Makefile.am
r25793da rce31925 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 752 ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14 53 53 @./prelude-gen > ${@} 54 54 @rm ./prelude-gen -
src/AST/Pass.hpp
r25793da rce31925 327 327 struct PureVisitor {}; 328 328 329 struct WithCodeLocation {330 const CodeLocation * location = nullptr;331 };332 333 329 /// Keep track of the polymorphic const TypeSubstitution * typeSubs for the current expression. 334 330 struct WithConstTypeSubstitution { -
src/AST/Pass.impl.hpp
r25793da rce31925 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 ); \29 27 /* back-up the visit children */ \ 30 28 __attribute__((unused)) ast::__pass::visit_children_guard guard1( ast::__pass::visit_children(core, 0) ); \ -
src/AST/Pass.proto.hpp
r25793da rce31925 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 * )298 297 299 298 // Remove the macro to make sure we don't clash … … 325 324 static auto on_error (core_t & core, ptr<Decl> & decl, int) -> decltype(core.on_error(decl)) { 326 325 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 };341 326 } 342 327 -
src/Common/utility.h
r25793da rce31925 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; }326 324 ~ValueGuardPtr() { if( ref ) *ref = old; } 327 325 }; -
src/ControlStruct/LabelFixer.cc
r25793da rce31925 119 119 120 120 // Builds a table that maps a label to its defining statement. 121 std::map<Label, Statement * > * LabelFixer::resolveJumps() {121 std::map<Label, Statement * > * LabelFixer::resolveJumps() throw ( SemanticErrorException ) { 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
r25793da rce31925 33 33 LabelFixer( LabelGenerator *gen = 0 ); 34 34 35 std::map < Label, Statement * > *resolveJumps() ;35 std::map < Label, Statement * > *resolveJumps() throw ( SemanticErrorException ); 36 36 37 37 // Declarations -
src/ControlStruct/MLEMutator.cc
r25793da rce31925 141 141 142 142 143 Statement *MultiLevelExitMutator::postmutate( BranchStmt *branchStmt ) { 143 Statement *MultiLevelExitMutator::postmutate( BranchStmt *branchStmt ) 144 throw ( SemanticErrorException ) { 144 145 std::string originalTarget = branchStmt->originalTarget; 145 146 -
src/ControlStruct/MLEMutator.h
r25793da rce31925 41 41 42 42 void premutate( CompoundStmt *cmpndStmt ); 43 Statement * postmutate( BranchStmt *branchStmt ) ;43 Statement * postmutate( BranchStmt *branchStmt ) throw ( SemanticErrorException ); 44 44 void premutate( WhileDoStmt *whileDoStmt ); 45 45 Statement * postmutate( WhileDoStmt *whileDoStmt ); -
src/GenPoly/InstantiateGenericNew.cpp
r25793da rce31925 417 417 418 418 struct GenericInstantiator final : 419 public ast::WithCodeLocation, 419 public ast::WithGuards, 420 public ast::WithVisitorRef<GenericInstantiator>, 420 421 public ast::WithConstTypeSubstitution, 421 public ast::WithDeclsToAdd<>, 422 public ast::WithGuards, 423 public ast::WithVisitorRef<GenericInstantiator> 424 { 422 public ast::WithDeclsToAdd<> { 425 423 /// Map of (generic type, parameter list) pairs 426 424 /// to concrete type instantiations. … … 437 435 /// member from an instantiation. 438 436 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
r25793da rce31925 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 7$(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++14 $(TCMALLOCFLAG) 74 74 AM_LDFLAGS = @HOST_FLAGS@ -Xlinker -export-dynamic 75 75 ARFLAGS = cr -
src/SynTree/Statement.cc
r25793da rce31925 105 105 }; 106 106 107 BranchStmt::BranchStmt( Label target, Type type ) :107 BranchStmt::BranchStmt( Label target, Type type ) throw ( SemanticErrorException ) : 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 ) :115 BranchStmt::BranchStmt( Expression * computedTarget, Type type ) throw ( SemanticErrorException ) : 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 ) :213 CaseStmt::CaseStmt( Expression * condition, const list<Statement *> & statements, bool deflt ) throw ( SemanticErrorException ) : 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
r25793da rce31925 200 200 std::list<Statement *> stmts; 201 201 202 CaseStmt( Expression * conditions, const std::list<Statement *> & stmts, bool isdef = false ) ;202 CaseStmt( Expression * conditions, const std::list<Statement *> & stmts, bool isdef = false ) throw (SemanticErrorException); 203 203 CaseStmt( const CaseStmt & other ); 204 204 virtual ~CaseStmt(); … … 289 289 Type type; 290 290 291 BranchStmt( Label target, Type ) ;292 BranchStmt( Expression * computedTarget, Type ) ;291 BranchStmt( Label target, Type ) throw (SemanticErrorException); 292 BranchStmt( Expression * computedTarget, Type ) throw (SemanticErrorException); 293 293 294 294 Label get_originalTarget() { return originalTarget; }
Note:
See TracChangeset
for help on using the changeset viewer.