Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r1ba88a0 rf18a711  
    158158                class PolyGenericCalculator : public PolyMutator {
    159159                public:
    160                         typedef PolyMutator Parent;
    161                         using Parent::mutate;
    162 
    163160                        template< typename DeclClass >
    164161                        DeclClass *handleDecl( DeclClass *decl, Type *type );
     
    16781675                DeclClass * PolyGenericCalculator::handleDecl( DeclClass *decl, Type *type ) {
    16791676                        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();
     1677                        knownLayouts.beginScope();
     1678                        knownOffsets.beginScope();
     1679
     1680                        DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) );
     1681
     1682                        knownOffsets.endScope();
     1683                        knownLayouts.endScope();
    16871684                        endTypeScope();
    16881685                        return ret;
     
    16941691
    16951692                DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) {
    1696                         knownLayouts.beginScope();
    1697                         knownOffsets.beginScope();
    1698 
    1699                         DeclarationWithType * decl = handleDecl( functionDecl, functionDecl->get_functionType() );
    1700                         knownOffsets.endScope();
    1701                         knownLayouts.endScope();
    1702                         return decl;
     1693                        return handleDecl( functionDecl, functionDecl->get_functionType() );
    17031694                }
    17041695
     
    17091700                TypeDecl * PolyGenericCalculator::mutate( TypeDecl *typeDecl ) {
    17101701                        scopeTyVars[ typeDecl->get_name() ] = typeDecl->get_kind();
    1711                         return Parent::mutate( typeDecl );
     1702                        return Mutator::mutate( typeDecl );
    17121703                }
    17131704
     
    17151706                        beginTypeScope( pointerType );
    17161707
    1717                         Type *ret = Parent::mutate( pointerType );
     1708                        Type *ret = Mutator::mutate( pointerType );
    17181709
    17191710                        endTypeScope();
     
    17331724                        }
    17341725
    1735                         Type *ret = Parent::mutate( funcType );
     1726                        Type *ret = Mutator::mutate( funcType );
    17361727
    17371728                        endTypeScope();
     
    17541745                                }
    17551746                        }
    1756                         return Parent::mutate( declStmt );
     1747                        return Mutator::mutate( declStmt );
    17571748                }
    17581749
     
    17961787                Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) {
    17971788                        // mutate, exiting early if no longer MemberExpr
    1798                         Expression *expr = Parent::mutate( memberExpr );
     1789                        Expression *expr = Mutator::mutate( memberExpr );
    17991790                        memberExpr = dynamic_cast< MemberExpr* >( expr );
    18001791                        if ( ! memberExpr ) return expr;
     
    19811972                Expression *PolyGenericCalculator::mutate( OffsetofExpr *offsetofExpr ) {
    19821973                        // mutate, exiting early if no longer OffsetofExpr
    1983                         Expression *expr = Parent::mutate( offsetofExpr );
     1974                        Expression *expr = Mutator::mutate( offsetofExpr );
    19841975                        offsetofExpr = dynamic_cast< OffsetofExpr* >( expr );
    19851976                        if ( ! offsetofExpr ) return expr;
Note: See TracChangeset for help on using the changeset viewer.