Changes in src/GenPoly/Box.cc [1ba88a0:f18a711]
- File:
-
- 1 edited
-
src/GenPoly/Box.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r1ba88a0 rf18a711 158 158 class PolyGenericCalculator : public PolyMutator { 159 159 public: 160 typedef PolyMutator Parent;161 using Parent::mutate;162 163 160 template< typename DeclClass > 164 161 DeclClass *handleDecl( DeclClass *decl, Type *type ); … … 1678 1675 DeclClass * PolyGenericCalculator::handleDecl( DeclClass *decl, Type *type ) { 1679 1676 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(); 1687 1684 endTypeScope(); 1688 1685 return ret; … … 1694 1691 1695 1692 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() ); 1703 1694 } 1704 1695 … … 1709 1700 TypeDecl * PolyGenericCalculator::mutate( TypeDecl *typeDecl ) { 1710 1701 scopeTyVars[ typeDecl->get_name() ] = typeDecl->get_kind(); 1711 return Parent::mutate( typeDecl );1702 return Mutator::mutate( typeDecl ); 1712 1703 } 1713 1704 … … 1715 1706 beginTypeScope( pointerType ); 1716 1707 1717 Type *ret = Parent::mutate( pointerType );1708 Type *ret = Mutator::mutate( pointerType ); 1718 1709 1719 1710 endTypeScope(); … … 1733 1724 } 1734 1725 1735 Type *ret = Parent::mutate( funcType );1726 Type *ret = Mutator::mutate( funcType ); 1736 1727 1737 1728 endTypeScope(); … … 1754 1745 } 1755 1746 } 1756 return Parent::mutate( declStmt );1747 return Mutator::mutate( declStmt ); 1757 1748 } 1758 1749 … … 1796 1787 Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) { 1797 1788 // mutate, exiting early if no longer MemberExpr 1798 Expression *expr = Parent::mutate( memberExpr );1789 Expression *expr = Mutator::mutate( memberExpr ); 1799 1790 memberExpr = dynamic_cast< MemberExpr* >( expr ); 1800 1791 if ( ! memberExpr ) return expr; … … 1981 1972 Expression *PolyGenericCalculator::mutate( OffsetofExpr *offsetofExpr ) { 1982 1973 // mutate, exiting early if no longer OffsetofExpr 1983 Expression *expr = Parent::mutate( offsetofExpr );1974 Expression *expr = Mutator::mutate( offsetofExpr ); 1984 1975 offsetofExpr = dynamic_cast< OffsetofExpr* >( expr ); 1985 1976 if ( ! offsetofExpr ) return expr;
Note:
See TracChangeset
for help on using the changeset viewer.