Changes in / [b13fc10:1ed841f]
- Location:
- src
- Files:
-
- 2 deleted
- 8 edited
-
CodeTools/TrackLoc.cc (deleted)
-
CodeTools/TrackLoc.h (deleted)
-
CodeTools/module.mk (modified) (1 diff)
-
GenPoly/InstantiateGeneric.cc (modified) (3 diffs)
-
Makefile.in (modified) (6 diffs)
-
Parser/parser.yy (modified) (3 diffs)
-
SymTab/Validate.cc (modified) (2 diffs)
-
SynTree/PointerType.cc (modified) (2 diffs)
-
SynTree/Type.h (modified) (1 diff)
-
SynTree/Visitor.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/module.mk
rb13fc10 r1ed841f 15 15 ############################################################################### 16 16 17 SRC += CodeTools/DeclStats.cc \ 18 CodeTools/TrackLoc.cc 17 SRC += CodeTools/DeclStats.cc -
src/GenPoly/InstantiateGeneric.cc
rb13fc10 r1ed841f 233 233 } else { 234 234 // normalize possibly dtype-static parameter type 235 out.push_back( new TypeExpr{ 235 out.push_back( new TypeExpr{ 236 236 ScrubTyVars::scrubAll( paramType->get_type()->clone() ) } ); 237 237 gt |= genericType::concrete; … … 369 369 DeclMutator::addDeclaration( concDecl ); 370 370 insert( inst, typeSubs, concDecl ); 371 concDecl->acceptMutator( *this ); // recursively instantiate members372 371 } 373 372 StructInstType *newInst = new StructInstType( inst->get_qualifiers(), concDecl->get_name() ); … … 424 423 DeclMutator::addDeclaration( concDecl ); 425 424 insert( inst, typeSubs, concDecl ); 426 concDecl->acceptMutator( *this ); // recursively instantiate members427 425 } 428 426 UnionInstType *newInst = new UnionInstType( inst->get_qualifiers(), concDecl->get_name() ); -
src/Makefile.in
rb13fc10 r1ed841f 108 108 CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) \ 109 109 CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) \ 110 CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT) \111 110 Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT) \ 112 111 Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \ … … 389 388 CodeGen/FixNames.cc CodeGen/FixMain.cc \ 390 389 CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \ 391 CodeTools/TrackLoc.cc Concurrency/Keywords.cc \ 392 Common/SemanticError.cc Common/UniqueName.cc \ 393 Common/DebugMalloc.cc Common/Assert.cc \ 390 Concurrency/Keywords.cc Common/SemanticError.cc \ 391 Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \ 394 392 ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \ 395 393 ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \ … … 547 545 @: > CodeTools/$(DEPDIR)/$(am__dirstamp) 548 546 CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT): \ 549 CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp)550 CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT): \551 547 CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp) 552 548 Concurrency/$(am__dirstamp): … … 847 843 -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) 848 844 -rm -f CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) 849 -rm -f CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT)850 845 -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT) 851 846 -rm -f Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT) … … 959 954 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@ 960 955 @AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/driver_cfa_cpp-DeclStats.Po@am__quote@ 961 @AMDEP_TRUE@@am__include@ @am__quote@CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Po@am__quote@962 956 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@ 963 957 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@ … … 1201 1195 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-DeclStats.obj `if test -f 'CodeTools/DeclStats.cc'; then $(CYGPATH_W) 'CodeTools/DeclStats.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/DeclStats.cc'; fi` 1202 1196 1203 CodeTools/driver_cfa_cpp-TrackLoc.o: CodeTools/TrackLoc.cc1204 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeTools/driver_cfa_cpp-TrackLoc.o -MD -MP -MF CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Tpo -c -o CodeTools/driver_cfa_cpp-TrackLoc.o `test -f 'CodeTools/TrackLoc.cc' || echo '$(srcdir)/'`CodeTools/TrackLoc.cc1205 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Tpo CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Po1206 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CodeTools/TrackLoc.cc' object='CodeTools/driver_cfa_cpp-TrackLoc.o' libtool=no @AMDEPBACKSLASH@1207 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@1208 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-TrackLoc.o `test -f 'CodeTools/TrackLoc.cc' || echo '$(srcdir)/'`CodeTools/TrackLoc.cc1209 1210 CodeTools/driver_cfa_cpp-TrackLoc.obj: CodeTools/TrackLoc.cc1211 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT CodeTools/driver_cfa_cpp-TrackLoc.obj -MD -MP -MF CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Tpo -c -o CodeTools/driver_cfa_cpp-TrackLoc.obj `if test -f 'CodeTools/TrackLoc.cc'; then $(CYGPATH_W) 'CodeTools/TrackLoc.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/TrackLoc.cc'; fi`1212 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Tpo CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Po1213 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CodeTools/TrackLoc.cc' object='CodeTools/driver_cfa_cpp-TrackLoc.obj' libtool=no @AMDEPBACKSLASH@1214 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@1215 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o CodeTools/driver_cfa_cpp-TrackLoc.obj `if test -f 'CodeTools/TrackLoc.cc'; then $(CYGPATH_W) 'CodeTools/TrackLoc.cc'; else $(CYGPATH_W) '$(srcdir)/CodeTools/TrackLoc.cc'; fi`1216 1217 1197 Concurrency/driver_cfa_cpp-Keywords.o: Concurrency/Keywords.cc 1218 1198 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT Concurrency/driver_cfa_cpp-Keywords.o -MD -MP -MF Concurrency/$(DEPDIR)/driver_cfa_cpp-Keywords.Tpo -c -o Concurrency/driver_cfa_cpp-Keywords.o `test -f 'Concurrency/Keywords.cc' || echo '$(srcdir)/'`Concurrency/Keywords.cc -
src/Parser/parser.yy
rb13fc10 r1ed841f 393 393 | '(' compound_statement ')' // GCC, lambda expression 394 394 { $$ = new ExpressionNode( build_valexpr( $2 ) ); } 395 | primary_expression '{' argument_expression_list '}' // CFA396 {397 Token fn;398 fn.str = new std::string( "?{}" ); // location undefined - use location of '{'?399 $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) );400 }401 395 ; 402 396 … … 431 425 | '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal 432 426 { $$ = new ExpressionNode( build_compoundLiteral( $2, new InitializerNode( $5, true ) ) ); } 433 | '^' primary_expression '{' argument_expression_list '}' // CFA427 | postfix_expression '{' argument_expression_list '}' // CFA 434 428 { 435 429 Token fn; 436 fn.str = new st ring( "^?{}" ); // location undefined437 $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4) ) );430 fn.str = new std::string( "?{}" ); // location undefined - use location of '{'? 431 $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) ) ); 438 432 } 439 433 ; … … 736 730 | exception_statement 737 731 | asm_statement 732 | '^' postfix_expression '{' argument_expression_list '}' ';' // CFA 733 { 734 Token fn; 735 fn.str = new string( "^?{}" ); // location undefined 736 $$ = new StatementNode( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ) ) ); 737 } 738 ; 738 739 739 740 labeled_statement: -
src/SymTab/Validate.cc
rb13fc10 r1ed841f 240 240 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 241 241 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 242 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist243 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors244 242 Concurrency::applyKeywords( translationUnit ); 245 243 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass 246 244 Concurrency::implementMutexFuncs( translationUnit ); 247 245 Concurrency::implementThreadStarter( translationUnit ); 246 acceptAll( translationUnit, epc ); 248 247 ReturnChecker::checkFunctionReturns( translationUnit ); 249 248 compoundliteral.mutateDeclarationList( translationUnit ); 250 249 acceptAll( translationUnit, pass3 ); 250 VerifyCtorDtorAssign::verify( translationUnit ); 251 251 ArrayLength::computeLength( translationUnit ); 252 252 } … … 817 817 throw SemanticError( "Constructors, destructors, and assignment functions require at least one parameter ", funcDecl ); 818 818 } 819 PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() ); 820 if ( ! ptrType || ptrType->is_array() ) { 819 if ( ! dynamic_cast< PointerType * >( params.front()->get_type() ) ) { 821 820 throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl ); 822 821 } -
src/SynTree/PointerType.cc
rb13fc10 r1ed841f 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // PointerType.cc -- 7 // PointerType.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 38 38 void PointerType::print( std::ostream &os, int indent ) const { 39 39 Type::print( os, indent ); 40 if ( ! is_array() ) { 41 os << "pointer to "; 42 } else { 43 os << "decayed "; 44 if ( isStatic ) { 45 os << "static "; 46 } // if 47 if ( isVarLen ) { 48 os << "variable length array of "; 49 } else if ( dimension ) { 50 os << "array of "; 51 dimension->print( os, indent ); 52 os << " "; 53 } // if 54 } 40 os << "pointer to "; 41 if ( isStatic ) { 42 os << "static "; 43 } // if 44 if ( isVarLen ) { 45 os << "variable length array of "; 46 } else if ( dimension ) { 47 os << "array of "; 48 dimension->print( os, indent ); 49 } // if 55 50 if ( base ) { 56 51 base->print( os, indent ); -
src/SynTree/Type.h
rb13fc10 r1ed841f 247 247 void set_isStatic( bool newValue ) { isStatic = newValue; } 248 248 249 bool is_array() const { return isStatic || isVarLen || dimension; }250 251 249 virtual PointerType *clone() const { return new PointerType( *this ); } 252 250 virtual void accept( Visitor & v ) { v.visit( this ); } -
src/SynTree/Visitor.h
rb13fc10 r1ed841f 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed May 3 08:58:00201711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 9 14:23:24 2017 13 13 // Update Count : 10 14 14 // … … 26 26 virtual ~Visitor(); 27 27 public: 28 // visit: Default implementation of all functions visits the children29 // of the given syntax node, but performs no other action.30 31 28 virtual void visit( ObjectDecl *objectDecl ); 32 29 virtual void visit( FunctionDecl *functionDecl );
Note:
See TracChangeset
for help on using the changeset viewer.