Changes in / [b13fc10:1ed841f]


Ignore:
Location:
src
Files:
2 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • src/CodeTools/module.mk

    rb13fc10 r1ed841f  
    1515###############################################################################
    1616
    17 SRC += CodeTools/DeclStats.cc \
    18         CodeTools/TrackLoc.cc
     17SRC += CodeTools/DeclStats.cc
  • src/GenPoly/InstantiateGeneric.cc

    rb13fc10 r1ed841f  
    233233                                } else {
    234234                                        // normalize possibly dtype-static parameter type
    235                                         out.push_back( new TypeExpr{
     235                                        out.push_back( new TypeExpr{ 
    236236                                                ScrubTyVars::scrubAll( paramType->get_type()->clone() ) } );
    237237                                        gt |= genericType::concrete;
     
    369369                                DeclMutator::addDeclaration( concDecl );
    370370                                insert( inst, typeSubs, concDecl );
    371                                 concDecl->acceptMutator( *this ); // recursively instantiate members
    372371                        }
    373372                        StructInstType *newInst = new StructInstType( inst->get_qualifiers(), concDecl->get_name() );
     
    424423                                DeclMutator::addDeclaration( concDecl );
    425424                                insert( inst, typeSubs, concDecl );
    426                                 concDecl->acceptMutator( *this ); // recursively instantiate members
    427425                        }
    428426                        UnionInstType *newInst = new UnionInstType( inst->get_qualifiers(), concDecl->get_name() );
  • src/Makefile.in

    rb13fc10 r1ed841f  
    108108        CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT) \
    109109        CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT) \
    110         CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT) \
    111110        Concurrency/driver_cfa_cpp-Keywords.$(OBJEXT) \
    112111        Common/driver_cfa_cpp-SemanticError.$(OBJEXT) \
     
    389388        CodeGen/FixNames.cc CodeGen/FixMain.cc \
    390389        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 \
    394392        ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \
    395393        ControlStruct/MLEMutator.cc ControlStruct/Mutate.cc \
     
    547545        @: > CodeTools/$(DEPDIR)/$(am__dirstamp)
    548546CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT):  \
    549         CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp)
    550 CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT):  \
    551547        CodeTools/$(am__dirstamp) CodeTools/$(DEPDIR)/$(am__dirstamp)
    552548Concurrency/$(am__dirstamp):
     
    847843        -rm -f CodeGen/driver_cfa_cpp-OperatorTable.$(OBJEXT)
    848844        -rm -f CodeTools/driver_cfa_cpp-DeclStats.$(OBJEXT)
    849         -rm -f CodeTools/driver_cfa_cpp-TrackLoc.$(OBJEXT)
    850845        -rm -f Common/driver_cfa_cpp-Assert.$(OBJEXT)
    851846        -rm -f Common/driver_cfa_cpp-DebugMalloc.$(OBJEXT)
     
    959954@AMDEP_TRUE@@am__include@ @am__quote@CodeGen/$(DEPDIR)/driver_cfa_cpp-OperatorTable.Po@am__quote@
    960955@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@
    962956@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-Assert.Po@am__quote@
    963957@AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-DebugMalloc.Po@am__quote@
     
    12011195@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`
    12021196
    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 
    12171197Concurrency/driver_cfa_cpp-Keywords.o: Concurrency/Keywords.cc
    12181198@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  
    393393        | '(' compound_statement ')'                                            // GCC, lambda expression
    394394                { $$ = 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                 }
    401395        ;
    402396
     
    431425        | '(' type_name_no_function ')' '{' initializer_list comma_opt '}' // C99, compound-literal
    432426                { $$ = new ExpressionNode( build_compoundLiteral( $2, new InitializerNode( $5, true ) ) ); }
    433         | '^' primary_expression '{' argument_expression_list '}' // CFA
     427        | postfix_expression '{' argument_expression_list '}' // CFA
    434428                {
    435429                        Token fn;
    436                         fn.str = new string( "^?{}" );                          // location undefined
    437                         $$ = 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 ) ) ) );
    438432                }
    439433        ;
     
    736730        | exception_statement
    737731        | 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        ;
    738739
    739740labeled_statement:
  • src/SymTab/Validate.cc

    rb13fc10 r1ed841f  
    240240                ReturnTypeFixer::fix( translationUnit ); // must happen before autogen
    241241                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
    244242                Concurrency::applyKeywords( translationUnit );
    245243                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass
    246244                Concurrency::implementMutexFuncs( translationUnit );
    247245                Concurrency::implementThreadStarter( translationUnit );
     246                acceptAll( translationUnit, epc );
    248247                ReturnChecker::checkFunctionReturns( translationUnit );
    249248                compoundliteral.mutateDeclarationList( translationUnit );
    250249                acceptAll( translationUnit, pass3 );
     250                VerifyCtorDtorAssign::verify( translationUnit );
    251251                ArrayLength::computeLength( translationUnit );
    252252        }
     
    817817                                throw SemanticError( "Constructors, destructors, and assignment functions require at least one parameter ", funcDecl );
    818818                        }
    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() ) ) {
    821820                                throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl );
    822821                        }
  • src/SynTree/PointerType.cc

    rb13fc10 r1ed841f  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // PointerType.cc --
     7// PointerType.cc -- 
    88//
    99// Author           : Richard C. Bilson
     
    3838void PointerType::print( std::ostream &os, int indent ) const {
    3939        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
    5550        if ( base ) {
    5651                base->print( os, indent );
  • src/SynTree/Type.h

    rb13fc10 r1ed841f  
    247247        void set_isStatic( bool newValue ) { isStatic = newValue; }
    248248
    249         bool is_array() const { return isStatic || isVarLen || dimension; }
    250 
    251249        virtual PointerType *clone() const { return new PointerType( *this ); }
    252250        virtual void accept( Visitor & v ) { v.visit( this ); }
  • src/SynTree/Visitor.h

    rb13fc10 r1ed841f  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed May  3 08:58:00 2017
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Feb  9 14:23:24 2017
    1313// Update Count     : 10
    1414//
     
    2626        virtual ~Visitor();
    2727  public:
    28         // visit: Default implementation of all functions visits the children
    29     // of the given syntax node, but performs no other action.
    30 
    3128        virtual void visit( ObjectDecl *objectDecl );
    3229        virtual void visit( FunctionDecl *functionDecl );
Note: See TracChangeset for help on using the changeset viewer.