Changeset 3403534 for src/GenPoly/Box.cc


Ignore:
Timestamp:
Sep 4, 2016, 10:34:35 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
f04a8b81
Parents:
28307be (diff), b16898e (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 plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r28307be r3403534  
    158158                class PolyGenericCalculator : public PolyMutator {
    159159                public:
     160                        typedef PolyMutator Parent;
     161                        using Parent::mutate;
     162
    160163                        template< typename DeclClass >
    161164                        DeclClass *handleDecl( DeclClass *decl, Type *type );
     
    16751678                DeclClass * PolyGenericCalculator::handleDecl( DeclClass *decl, Type *type ) {
    16761679                        beginTypeScope( type );
     1680                        // knownLayouts.beginScope();
     1681                        // knownOffsets.beginScope();
     1682
     1683                        DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
     1684
     1685                        // knownOffsets.endScope();
     1686                        // knownLayouts.endScope();
     1687                        endTypeScope();
     1688                        return ret;
     1689                }
     1690
     1691                ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) {
     1692                        return handleDecl( objectDecl, objectDecl->get_type() );
     1693                }
     1694
     1695                DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) {
    16771696                        knownLayouts.beginScope();
    16781697                        knownOffsets.beginScope();
    16791698
    1680                         DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) );
    1681 
     1699                        DeclarationWithType * decl = handleDecl( functionDecl, functionDecl->get_functionType() );
    16821700                        knownOffsets.endScope();
    16831701                        knownLayouts.endScope();
    1684                         endTypeScope();
    1685                         return ret;
    1686                 }
    1687 
    1688                 ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) {
    1689                         return handleDecl( objectDecl, objectDecl->get_type() );
    1690                 }
    1691 
    1692                 DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) {
    1693                         return handleDecl( functionDecl, functionDecl->get_functionType() );
     1702                        return decl;
    16941703                }
    16951704
     
    17001709                TypeDecl * PolyGenericCalculator::mutate( TypeDecl *typeDecl ) {
    17011710                        scopeTyVars[ typeDecl->get_name() ] = typeDecl->get_kind();
    1702                         return Mutator::mutate( typeDecl );
     1711                        return Parent::mutate( typeDecl );
    17031712                }
    17041713
     
    17061715                        beginTypeScope( pointerType );
    17071716
    1708                         Type *ret = Mutator::mutate( pointerType );
     1717                        Type *ret = Parent::mutate( pointerType );
    17091718
    17101719                        endTypeScope();
     
    17241733                        }
    17251734
    1726                         Type *ret = Mutator::mutate( funcType );
     1735                        Type *ret = Parent::mutate( funcType );
    17271736
    17281737                        endTypeScope();
     
    17451754                                }
    17461755                        }
    1747                         return Mutator::mutate( declStmt );
     1756                        return Parent::mutate( declStmt );
    17481757                }
    17491758
     
    17871796                Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) {
    17881797                        // mutate, exiting early if no longer MemberExpr
    1789                         Expression *expr = Mutator::mutate( memberExpr );
     1798                        Expression *expr = Parent::mutate( memberExpr );
    17901799                        memberExpr = dynamic_cast< MemberExpr* >( expr );
    17911800                        if ( ! memberExpr ) return expr;
     
    19721981                Expression *PolyGenericCalculator::mutate( OffsetofExpr *offsetofExpr ) {
    19731982                        // mutate, exiting early if no longer OffsetofExpr
    1974                         Expression *expr = Mutator::mutate( offsetofExpr );
     1983                        Expression *expr = Parent::mutate( offsetofExpr );
    19751984                        offsetofExpr = dynamic_cast< OffsetofExpr* >( expr );
    19761985                        if ( ! offsetofExpr ) return expr;
Note: See TracChangeset for help on using the changeset viewer.