Changeset d1b9d78 for src/SymTab


Ignore:
Timestamp:
Jul 13, 2016, 1:44:00 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
9c791dd
Parents:
8884112 (diff), ed9ecda (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SymTab
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/AddVisit.h

    r8884112 rd1b9d78  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 16:14:32 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Apr 14 15:52:42 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 12 17:46:33 2016
     13// Update Count     : 6
    1414//
    1515
     
    3838
    3939        template< typename Visitor >
    40         inline void addVisit(ChooseStmt *switchStmt, Visitor &visitor) {
    41                 addVisitStatementList( switchStmt->get_branches(), visitor );
    42                 maybeAccept( switchStmt->get_condition(), visitor );
    43         }
    44 
    45         // template< typename Visitor >
    46         // inline void addVisit(CaseStmt *caseStmt, Visitor &visitor) {
    47         //      addVisitStatementList( caseStmt->get_statements(), visitor );
    48         //      maybeAccept( caseStmt->get_condition(), visitor );
    49         // }
    50 
    51         template< typename Visitor >
    5240        void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) {
    5341                std::list< Declaration * >::iterator i = translationUnit.begin();
  • src/SymTab/Autogen.cc

    r8884112 rd1b9d78  
    99// Author           : Rob Schluntz
    1010// Created On       : Thu Mar 03 15:45:56 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu May 26 14:14:09 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 12 17:47:17 2016
     13// Update Count     : 2
    1414//
    1515
     
    4242                virtual void visit( CompoundStmt *compoundStmt );
    4343                virtual void visit( SwitchStmt *switchStmt );
    44                 virtual void visit( ChooseStmt *chooseStmt );
    45                 // virtual void visit( CaseStmt *caseStmt );
    4644
    4745                AutogenerateRoutines() : functionNesting( 0 ) {}
     
    559557                visitStatement( switchStmt );
    560558        }
    561 
    562         void AutogenerateRoutines::visit( ChooseStmt *switchStmt ) {
    563                 visitStatement( switchStmt );
    564         }
    565 
    566         // void AutogenerateRoutines::visit( CaseStmt *caseStmt ) {
    567         //      visitStatement( caseStmt );
    568         // }
    569559} // SymTab
  • src/SymTab/Indexer.cc

    r8884112 rd1b9d78  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:37:33 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri Apr 22 15:25:43 2016
    13 // Update Count     : 11
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 12 17:47:47 2016
     13// Update Count     : 12
    1414//
    1515
     
    520520                        const MangleTable &mangleTable = decls->second;
    521521                        for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) {
    522                                 // check for C decls with the same name, skipping
    523                                 // those with a compatible type (by mangleName)
     522                                // check for C decls with the same name, skipping those with a compatible type (by mangleName)
    524523                                if ( decl->second->get_linkage() == LinkageSpec::C && decl->first != mangleName ) return true;
    525524                        }
  • src/SymTab/Validate.cc

    r8884112 rd1b9d78  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 11 13:17:52 2016
    13 // Update Count     : 297
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 12 17:49:21 2016
     13// Update Count     : 298
    1414//
    1515
     
    7474                virtual void visit( CompoundStmt *compoundStmt );
    7575                virtual void visit( SwitchStmt *switchStmt );
    76                 virtual void visit( ChooseStmt *chooseStmt );
    77                 // virtual void visit( CaseStmt *caseStmt );
    7876          private:
    7977                HoistStruct();
     
    268266                addVisit( switchStmt, *this );
    269267        }
    270 
    271         void HoistStruct::visit( ChooseStmt *switchStmt ) {
    272                 addVisit( switchStmt, *this );
    273         }
    274 
    275         // void HoistStruct::visit( CaseStmt *caseStmt ) {
    276         //      addVisit( caseStmt, *this );
    277         // }
    278268
    279269        void Pass1::visit( EnumDecl *enumDecl ) {
     
    551541                if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( tyDecl->get_base() ) ) {
    552542                        return new StructDecl( aggDecl->get_name() );
     543//                      return aggDecl->get_baseStruct();
    553544                } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( tyDecl->get_base() ) ) {
    554545                        return new UnionDecl( aggDecl->get_name() );
     
    645636                } // if
    646637        }
     638
    647639        Declaration *EliminateTypedef::mutate( StructDecl * structDecl ) {
    648640                addImplicitTypedef( structDecl );
     
    691683
    692684                Visitor::visit( funcDecl );
    693                 // original idea: modify signature of ctor/dtors and insert appropriate return statements
    694                 // to cause desired behaviour
    695                 // new idea: add comma exprs to every ctor call to produce first parameter.
    696                 // this requires some memoization of the first parameter, because it can be a
    697                 // complicated expression with side effects (see: malloc). idea: add temporary variable
    698                 // that is assigned address of constructed object in ctor argument position and
    699                 // return the temporary. It should also be done after all implicit ctors are
    700                 // added, so not in this pass!
    701685        }
    702686
Note: See TracChangeset for help on using the changeset viewer.