Changeset b13fc10
- Timestamp:
- May 3, 2017, 3:15:09 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 9643b31
- Parents:
- 1ed841f (diff), dba6db9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/CodeTools/module.mk ¶
r1ed841f rb13fc10 15 15 ############################################################################### 16 16 17 SRC += CodeTools/DeclStats.cc 17 SRC += CodeTools/DeclStats.cc \ 18 CodeTools/TrackLoc.cc -
TabularUnified src/GenPoly/InstantiateGeneric.cc ¶
r1ed841f rb13fc10 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 members 371 372 } 372 373 StructInstType *newInst = new StructInstType( inst->get_qualifiers(), concDecl->get_name() ); … … 423 424 DeclMutator::addDeclaration( concDecl ); 424 425 insert( inst, typeSubs, concDecl ); 426 concDecl->acceptMutator( *this ); // recursively instantiate members 425 427 } 426 428 UnionInstType *newInst = new UnionInstType( inst->get_qualifiers(), concDecl->get_name() ); -
TabularUnified src/Makefile.in ¶
r1ed841f rb13fc10 108 108 CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) \ 109 109 CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) \ 110 CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT) \ 110 111 Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT) \ 111 112 Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \ … … 388 389 CodeGen/FixNames.cc CodeGen/FixMain.cc \ 389 390 CodeGen/OperatorTable.cc CodeTools/DeclStats.cc \ 390 Concurrency/Keywords.cc Common/SemanticError.cc \ 391 Common/UniqueName.cc Common/DebugMalloc.cc Common/Assert.cc \ 391 CodeTools/TrackLoc.cc Concurrency/Keywords.cc \ 392 Common/SemanticError.cc Common/UniqueName.cc \ 393 Common/DebugMalloc.cc Common/Assert.cc \ 392 394 ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \ 393 395 ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \ … … 545 547 @: > CodeTools/$(DEPDIR)/$(am__dirstamp) 546 548 CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT): \ 549 CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp) 550 CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT): \ 547 551 CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp) 548 552 Concurrency/$(am__dirstamp): … … 843 847 -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) 844 848 -rm -f CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) 849 -rm -f CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT) 845 850 -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT) 846 851 -rm -f Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT) … … 954 959 @AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@ 955 960 @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@ 956 962 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@ 957 963 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@ … … 1195 1201 @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` 1196 1202 1203 CodeTools/driver_cfa_cpp-TrackLoc.o: CodeTools/TrackLoc.cc 1204 @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.cc 1205 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Tpo CodeTools/$(DEPDIR)/driver_cfa_cpp-TrackLoc.Po 1206 @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.cc 1209 1210 CodeTools/driver_cfa_cpp-TrackLoc.obj: CodeTools/TrackLoc.cc 1211 @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.Po 1213 @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 1197 1217 Concurrency/driver_cfa_cpp-Keywords.o: Concurrency/Keywords.cc 1198 1218 @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 -
TabularUnified src/Parser/parser.yy ¶
r1ed841f rb13fc10 393 393 | '(' compound_statement ')' // GCC, lambda expression 394 394 { $$ = new ExpressionNode( build_valexpr( $2 ) ); } 395 | primary_expression '{' argument_expression_list '}' // CFA 396 { 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 } 395 401 ; 396 402 … … 425 431 | '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal 426 432 { $$ = new ExpressionNode( build_compoundLiteral( $2, new InitializerNode( $5, true ) ) ); } 427 | postfix_expression '{' argument_expression_list '}' // CFA433 | '^' primary_expression '{' argument_expression_list '}' // CFA 428 434 { 429 435 Token fn; 430 fn.str = new st d::string( "?{}" ); // location undefined - use location of '{'?431 $$ = new ExpressionNode( new ConstructorExpr( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 )) ) );436 fn.str = new string( "^?{}" ); // location undefined 437 $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ); 432 438 } 433 439 ; … … 730 736 | exception_statement 731 737 | asm_statement 732 | '^' postfix_expression '{' argument_expression_list '}' ';' // CFA733 {734 Token fn;735 fn.str = new string( "^?{}" ); // location undefined736 $$ = new StatementNode( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ) ) );737 }738 ;739 738 740 739 labeled_statement: -
TabularUnified src/SymTab/Validate.cc ¶
r1ed841f rb13fc10 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 exist 243 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors 242 244 Concurrency::applyKeywords( translationUnit ); 243 245 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass 244 246 Concurrency::implementMutexFuncs( translationUnit ); 245 247 Concurrency::implementThreadStarter( translationUnit ); 246 acceptAll( translationUnit, epc );247 248 ReturnChecker::checkFunctionReturns( translationUnit ); 248 249 compoundliteral.mutateDeclarationList( translationUnit ); 249 250 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 if ( ! dynamic_cast< PointerType * >( params.front()->get_type() ) ) { 819 PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() ); 820 if ( ! ptrType || ptrType->is_array() ) { 820 821 throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl ); 821 822 } -
TabularUnified src/SynTree/PointerType.cc ¶
r1ed841f rb13fc10 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 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 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 } 50 55 if ( base ) { 51 56 base->print( os, indent ); -
TabularUnified src/SynTree/Type.h ¶
r1ed841f rb13fc10 247 247 void set_isStatic( bool newValue ) { isStatic = newValue; } 248 248 249 bool is_array() const { return isStatic || isVarLen || dimension; } 250 249 251 virtual PointerType *clone() const { return new PointerType( *this ); } 250 252 virtual void accept( Visitor & v ) { v.visit( this ); } -
TabularUnified src/SynTree/Visitor.h ¶
r1ed841f rb13fc10 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Feb 9 14:23:24201711 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 3 08:58:00 2017 13 13 // Update Count : 10 14 14 // … … 26 26 virtual ~Visitor(); 27 27 public: 28 // visit: Default implementation of all functions visits the children 29 // of the given syntax node, but performs no other action. 30 28 31 virtual void visit( ObjectDecl *objectDecl ); 29 32 virtual void visit( FunctionDecl *functionDecl );
Note: See TracChangeset
for help on using the changeset viewer.