Ignore:
Timestamp:
Dec 16, 2014, 9:41:50 PM (10 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, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
17cd4eb
Parents:
3848e0e
Message:

remove Parser.old, add -XCFA to driver, copy ptrdiff_t from stddef.h in preclude, remove casts from initialization constants, adjust formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SynTree/Mutator.cc

    r3848e0e rd9a0e76  
    1 /*
    2  * This file is part of the Cforall project
    3  *
    4  * $Id: Mutator.cc,v 1.30 2005/08/29 20:59:25 rcbilson Exp $
    5  *
    6  */
    7 
    81#include <cassert>
    92#include "Mutator.h"
     
    169#include "utility.h"
    1710
    18 Mutator::Mutator()
    19 {
    20 }
    21 
    22 Mutator::~Mutator()
    23 {
    24 }
    25 
    26 ObjectDecl*
    27 Mutator::mutate(ObjectDecl *objectDecl)
    28 {
     11Mutator::Mutator() {}
     12
     13Mutator::~Mutator() {}
     14
     15ObjectDecl *Mutator::mutate( ObjectDecl *objectDecl ) {
    2916    objectDecl->set_type( maybeMutate( objectDecl->get_type(), *this ) );
    3017    objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
     
    3320}
    3421
    35 DeclarationWithType*
    36 Mutator::mutate(FunctionDecl *functionDecl)
    37 {
     22DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) {
    3823    functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    3924    mutateAll( functionDecl->get_oldDecls(), *this );
     
    4227}
    4328
    44 Declaration*
    45 Mutator::handleAggregateDecl(AggregateDecl *aggregateDecl)
    46 {
     29Declaration *Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
    4730    mutateAll( aggregateDecl->get_parameters(), *this );
    4831    mutateAll( aggregateDecl->get_members(), *this );
     
    5033}
    5134
    52 Declaration*
    53 Mutator::mutate(StructDecl *aggregateDecl)
    54 {
     35Declaration *Mutator::mutate( StructDecl *aggregateDecl ) {
    5536    handleAggregateDecl( aggregateDecl );
    5637    return aggregateDecl;
    5738}
    5839
    59 Declaration*
    60 Mutator::mutate(UnionDecl *aggregateDecl)
    61 {
     40Declaration *Mutator::mutate( UnionDecl *aggregateDecl ) {
    6241    handleAggregateDecl( aggregateDecl );
    6342    return aggregateDecl;
    6443}
    6544
    66 Declaration*
    67 Mutator::mutate(EnumDecl *aggregateDecl)
    68 {
     45Declaration *Mutator::mutate( EnumDecl *aggregateDecl ) {
    6946    handleAggregateDecl( aggregateDecl );
    7047    return aggregateDecl;
    7148}
    7249
    73 Declaration*
    74 Mutator::mutate(ContextDecl *aggregateDecl)
    75 {
     50Declaration *Mutator::mutate( ContextDecl *aggregateDecl ) {
    7651    handleAggregateDecl( aggregateDecl );
    7752    return aggregateDecl;
    7853}
    7954
    80 Declaration*
    81 Mutator::handleNamedTypeDecl(NamedTypeDecl *typeDecl)
    82 {
     55Declaration *Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
    8356    mutateAll( typeDecl->get_parameters(), *this );
    8457    mutateAll( typeDecl->get_assertions(), *this );
     
    8760}
    8861
    89 TypeDecl*
    90 Mutator::mutate(TypeDecl *typeDecl)
    91 {
     62TypeDecl *Mutator::mutate( TypeDecl *typeDecl ) {
    9263    handleNamedTypeDecl( typeDecl );
    9364    return typeDecl;
    9465}
    9566
    96 Declaration*
    97 Mutator::mutate(TypedefDecl *typeDecl)
    98 {
     67Declaration *Mutator::mutate( TypedefDecl *typeDecl ) {
    9968    handleNamedTypeDecl( typeDecl );
    10069    return typeDecl;
    10170}
    10271
    103 CompoundStmt*
    104 Mutator::mutate(CompoundStmt *compoundStmt)
    105 {
     72CompoundStmt *Mutator::mutate( CompoundStmt *compoundStmt ) {
    10673    mutateAll( compoundStmt->get_kids(), *this );
    10774    return compoundStmt;
    10875}
    10976
    110 Statement*
    111 Mutator::mutate(ExprStmt *exprStmt)
    112 {
     77Statement *Mutator::mutate( ExprStmt *exprStmt ) {
    11378    exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
    11479    return exprStmt;
    11580}
    11681
    117 Statement*
    118 Mutator::mutate(IfStmt *ifStmt)
    119 {
    120     ifStmt->set_condition(  maybeMutate( ifStmt->get_condition(), *this ) );
    121     ifStmt->set_thenPart(  maybeMutate( ifStmt->get_thenPart(), *this ) );
    122     ifStmt->set_elsePart(  maybeMutate( ifStmt->get_elsePart(), *this ) );
     82Statement *Mutator::mutate( IfStmt *ifStmt ) {
     83    ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
     84    ifStmt->set_thenPart( maybeMutate( ifStmt->get_thenPart(), *this ) );
     85    ifStmt->set_elsePart( maybeMutate( ifStmt->get_elsePart(), *this ) );
    12386    return ifStmt;
    12487}
    12588
    126 Statement*
    127 Mutator::mutate(WhileStmt *whileStmt)
    128 {
    129     whileStmt->set_condition(  maybeMutate( whileStmt->get_condition(), *this ) );
    130     whileStmt->set_body(    maybeMutate( whileStmt->get_body(), *this ) );
     89Statement *Mutator::mutate( WhileStmt *whileStmt ) {
     90    whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
     91    whileStmt->set_body( maybeMutate( whileStmt->get_body(), *this ) );
    13192    return whileStmt;
    13293}
    13394
    134 Statement*
    135 Mutator::mutate(ForStmt *forStmt)
    136 {
    137     forStmt->set_initialization(    maybeMutate( forStmt->get_initialization(), *this ) );
    138     forStmt->set_condition(  maybeMutate( forStmt->get_condition(), *this ) );
    139     forStmt->set_increment(  maybeMutate( forStmt->get_increment(), *this ) );
    140     forStmt->set_body(  maybeMutate( forStmt->get_body(), *this ) );
     95Statement *Mutator::mutate( ForStmt *forStmt ) {
     96    forStmt->set_initialization( maybeMutate( forStmt->get_initialization(), *this ) );
     97    forStmt->set_condition( maybeMutate( forStmt->get_condition(), *this ) );
     98    forStmt->set_increment( maybeMutate( forStmt->get_increment(), *this ) );
     99    forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) );
    141100    return forStmt;
    142101}
    143102
    144 Statement*
    145 Mutator::mutate(SwitchStmt *switchStmt)
    146 {
     103Statement *Mutator::mutate( SwitchStmt *switchStmt ) {
    147104    switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
    148105    mutateAll( switchStmt->get_branches(), *this );
     
    150107}
    151108
    152 Statement*
    153 Mutator::mutate(ChooseStmt *switchStmt)
    154 {
    155     switchStmt->set_condition(  maybeMutate( switchStmt->get_condition(), *this ) );
     109Statement *Mutator::mutate( ChooseStmt *switchStmt ) {
     110    switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
    156111    mutateAll( switchStmt->get_branches(), *this );
    157112    return switchStmt;
    158113}
    159114
    160 Statement*
    161 Mutator::mutate(FallthruStmt *fallthruStmt)
    162 {
     115Statement *Mutator::mutate( FallthruStmt *fallthruStmt ) {
    163116    return fallthruStmt;
    164117}
    165118
    166 Statement*
    167 Mutator::mutate(CaseStmt *caseStmt)
    168 {
    169     caseStmt->set_condition(    maybeMutate( caseStmt->get_condition(), *this ) );
     119Statement *Mutator::mutate( CaseStmt *caseStmt ) {
     120    caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
    170121    mutateAll (caseStmt->get_statements(), *this );
    171122
     
    173124}
    174125
    175 Statement*
    176 Mutator::mutate(BranchStmt *branchStmt)
    177 {
     126Statement *Mutator::mutate( BranchStmt *branchStmt ) {
    178127    return branchStmt;
    179128}
    180129
    181 Statement*
    182 Mutator::mutate(ReturnStmt *returnStmt)
    183 {
    184     returnStmt->set_expr(  maybeMutate( returnStmt->get_expr(), *this ) );
     130Statement *Mutator::mutate( ReturnStmt *returnStmt ) {
     131    returnStmt->set_expr( maybeMutate( returnStmt->get_expr(), *this ) );
    185132    return returnStmt;
    186133}
    187134
    188 Statement*
    189 Mutator::mutate(TryStmt *tryStmt)
    190 {
     135Statement *Mutator::mutate( TryStmt *tryStmt ) {
    191136    tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
    192137    mutateAll( tryStmt->get_catchers(), *this );
     
    194139}
    195140
    196 Statement*
    197 Mutator::mutate(CatchStmt *catchStmt)
    198 {
     141Statement *Mutator::mutate( CatchStmt *catchStmt ) {
    199142    catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
    200143    catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) );
     
    202145}
    203146
    204 Statement*
    205 Mutator::mutate(FinallyStmt *finalStmt)
    206 {
     147Statement *Mutator::mutate( FinallyStmt *finalStmt ) {
    207148    finalStmt->set_block( maybeMutate( finalStmt->get_block(), *this ) );
    208149    return finalStmt;
    209150}
    210151
    211 NullStmt*
    212 Mutator::mutate(NullStmt *nullStmt)
    213 {
     152NullStmt *Mutator::mutate( NullStmt *nullStmt ) {
    214153    return nullStmt;
    215154}
    216155
    217 Statement*
    218 Mutator::mutate(DeclStmt *declStmt)
    219 {
     156Statement *Mutator::mutate( DeclStmt *declStmt ) {
    220157    declStmt->set_decl( maybeMutate( declStmt->get_decl(), *this ) );
    221158    return declStmt;
    222159}
    223160
    224 Expression*
    225 Mutator::mutate(ApplicationExpr *applicationExpr)
    226 {
     161Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) {
    227162    mutateAll( applicationExpr->get_results(), *this );
    228     applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
     163    applicationExpr->set_function( maybeMutate( applicationExpr->get_function(), *this ) );
    229164    mutateAll( applicationExpr->get_args(), *this );
    230165    return applicationExpr;
    231166}
    232167
    233 Expression*
    234 Mutator::mutate(UntypedExpr *untypedExpr)
    235 {
     168Expression *Mutator::mutate( UntypedExpr *untypedExpr ) {
    236169    mutateAll( untypedExpr->get_results(), *this );
    237170    mutateAll( untypedExpr->get_args(), *this );
     
    239172}
    240173
    241 Expression*
    242 Mutator::mutate(NameExpr *nameExpr)
    243 {
     174Expression *Mutator::mutate( NameExpr *nameExpr ) {
    244175    mutateAll( nameExpr->get_results(), *this );
    245176    return nameExpr;
    246177}
    247178
    248 Expression*
    249 Mutator::mutate(AddressExpr *addressExpr)
    250 {
     179Expression *Mutator::mutate( AddressExpr *addressExpr ) {
    251180    mutateAll( addressExpr->get_results(), *this );
    252     addressExpr->set_arg(  maybeMutate( addressExpr->get_arg(), *this ) );
     181    addressExpr->set_arg( maybeMutate( addressExpr->get_arg(), *this ) );
    253182    return addressExpr;
    254183}
    255184
    256 Expression*
    257 Mutator::mutate(LabelAddressExpr *labelAddressExpr)
    258 {
     185Expression *Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
    259186    mutateAll( labelAddressExpr->get_results(), *this );
    260     labelAddressExpr->set_arg(  maybeMutate( labelAddressExpr->get_arg(), *this ) );
     187    labelAddressExpr->set_arg( maybeMutate( labelAddressExpr->get_arg(), *this ) );
    261188    return labelAddressExpr;
    262189}
    263190
    264 Expression*
    265 Mutator::mutate(CastExpr *castExpr)
    266 {
     191Expression *Mutator::mutate( CastExpr *castExpr ) {
    267192    mutateAll( castExpr->get_results(), *this );
    268     castExpr->set_arg(  maybeMutate( castExpr->get_arg(), *this ) );
     193    castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) );
    269194    return castExpr;
    270195}
    271196
    272 Expression*
    273 Mutator::mutate(UntypedMemberExpr *memberExpr)
    274 {
     197Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) {
    275198    mutateAll( memberExpr->get_results(), *this );
    276     memberExpr->set_aggregate(  maybeMutate( memberExpr->get_aggregate(), *this ) );
     199    memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
    277200    return memberExpr;
    278201}
    279202
    280 Expression*
    281 Mutator::mutate(MemberExpr *memberExpr)
    282 {
     203Expression *Mutator::mutate( MemberExpr *memberExpr ) {
    283204    mutateAll( memberExpr->get_results(), *this );
    284     memberExpr->set_aggregate(  maybeMutate( memberExpr->get_aggregate(), *this ) );
     205    memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
    285206    return memberExpr;
    286207}
    287208
    288 Expression*
    289 Mutator::mutate(VariableExpr *variableExpr)
    290 {
     209Expression *Mutator::mutate( VariableExpr *variableExpr ) {
    291210    mutateAll( variableExpr->get_results(), *this );
    292211    return variableExpr;
    293212}
    294213
    295 Expression*
    296 Mutator::mutate(ConstantExpr *constantExpr)
    297 {
     214Expression *Mutator::mutate( ConstantExpr *constantExpr ) {
    298215    mutateAll( constantExpr->get_results(), *this );
    299216//  maybeMutate( constantExpr->get_constant(), *this )
     
    301218}
    302219
    303 Expression*
    304 Mutator::mutate(SizeofExpr *sizeofExpr)
    305 {
     220Expression *Mutator::mutate( SizeofExpr *sizeofExpr ) {
    306221    mutateAll( sizeofExpr->get_results(), *this );
    307     if( sizeofExpr->get_isType() ) {
    308         sizeofExpr->set_type(    maybeMutate( sizeofExpr->get_type(), *this ) );
     222    if ( sizeofExpr->get_isType() ) {
     223        sizeofExpr->set_type( maybeMutate( sizeofExpr->get_type(), *this ) );
    309224    } else {
    310         sizeofExpr->set_expr(    maybeMutate( sizeofExpr->get_expr(), *this ) );
     225        sizeofExpr->set_expr( maybeMutate( sizeofExpr->get_expr(), *this ) );
    311226    }
    312227    return sizeofExpr;
    313228}
    314229
    315 Expression*
    316 Mutator::mutate(AttrExpr *attrExpr)
    317 {
     230Expression *Mutator::mutate( AttrExpr *attrExpr ) {
    318231    mutateAll( attrExpr->get_results(), *this );
    319     if( attrExpr->get_isType() ) {
    320         attrExpr->set_type(      maybeMutate( attrExpr->get_type(), *this ) );
     232    if ( attrExpr->get_isType() ) {
     233        attrExpr->set_type( maybeMutate( attrExpr->get_type(), *this ) );
    321234    } else {
    322         attrExpr->set_expr(      maybeMutate( attrExpr->get_expr(), *this ) );
     235        attrExpr->set_expr( maybeMutate( attrExpr->get_expr(), *this ) );
    323236    }
    324237    return attrExpr;
    325238}
    326239
    327 Expression*
    328 Mutator::mutate(LogicalExpr *logicalExpr)
    329 {
     240Expression *Mutator::mutate( LogicalExpr *logicalExpr ) {
    330241    mutateAll( logicalExpr->get_results(), *this );
    331     logicalExpr->set_arg1(  maybeMutate( logicalExpr->get_arg1(), *this ) );
    332     logicalExpr->set_arg2(  maybeMutate( logicalExpr->get_arg2(), *this ) );
     242    logicalExpr->set_arg1( maybeMutate( logicalExpr->get_arg1(), *this ) );
     243    logicalExpr->set_arg2( maybeMutate( logicalExpr->get_arg2(), *this ) );
    333244    return logicalExpr;
    334245}
    335246
    336 Expression*
    337 Mutator::mutate(ConditionalExpr *conditionalExpr)
    338 {
     247Expression *Mutator::mutate( ConditionalExpr *conditionalExpr ) {
    339248    mutateAll( conditionalExpr->get_results(), *this );
    340     conditionalExpr->set_arg1(  maybeMutate( conditionalExpr->get_arg1(), *this ) );
    341     conditionalExpr->set_arg2(  maybeMutate( conditionalExpr->get_arg2(), *this ) );
    342     conditionalExpr->set_arg3(  maybeMutate( conditionalExpr->get_arg3(), *this ) );
     249    conditionalExpr->set_arg1( maybeMutate( conditionalExpr->get_arg1(), *this ) );
     250    conditionalExpr->set_arg2( maybeMutate( conditionalExpr->get_arg2(), *this ) );
     251    conditionalExpr->set_arg3( maybeMutate( conditionalExpr->get_arg3(), *this ) );
    343252    return conditionalExpr;
    344253}
    345254
    346 Expression*
    347 Mutator::mutate(CommaExpr *commaExpr)
    348 {
     255Expression *Mutator::mutate( CommaExpr *commaExpr ) {
    349256    mutateAll( commaExpr->get_results(), *this );
    350     commaExpr->set_arg1(    maybeMutate( commaExpr->get_arg1(), *this ) );
    351     commaExpr->set_arg2(    maybeMutate( commaExpr->get_arg2(), *this ) );
     257    commaExpr->set_arg1( maybeMutate( commaExpr->get_arg1(), *this ) );
     258    commaExpr->set_arg2( maybeMutate( commaExpr->get_arg2(), *this ) );
    352259    return commaExpr;
    353260}
    354261
    355 Expression*
    356 Mutator::mutate(TupleExpr *tupleExpr)
    357 {
     262Expression *Mutator::mutate( TupleExpr *tupleExpr ) {
    358263    mutateAll( tupleExpr->get_results(), *this );
    359264    mutateAll( tupleExpr->get_exprs(), *this );
     
    361266}
    362267
    363 Expression*
    364 Mutator::mutate(SolvedTupleExpr *tupleExpr)
    365 {
     268Expression *Mutator::mutate( SolvedTupleExpr *tupleExpr ) {
    366269    mutateAll( tupleExpr->get_results(), *this );
    367270    mutateAll( tupleExpr->get_exprs(), *this );
     
    369272}
    370273
    371 Expression*
    372 Mutator::mutate(TypeExpr *typeExpr)
    373 {
     274Expression *Mutator::mutate( TypeExpr *typeExpr ) {
    374275    mutateAll( typeExpr->get_results(), *this );
    375276    typeExpr->set_type( maybeMutate( typeExpr->get_type(), *this ) );
     
    377278}
    378279
    379 Expression*
    380 Mutator::mutate(UntypedValofExpr *valofExpr)
    381 {
     280Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) {
    382281    mutateAll( valofExpr->get_results(), *this );
    383282    return valofExpr;
    384283}
    385284
    386 Type*
    387 Mutator::mutate(VoidType *voidType)
    388 {
     285Type *Mutator::mutate( VoidType *voidType ) {
    389286    mutateAll( voidType->get_forall(), *this );
    390287    return voidType;
    391288}
    392289
    393 Type*
    394 Mutator::mutate(BasicType *basicType)
    395 {
     290Type *Mutator::mutate( BasicType *basicType ) {
    396291    mutateAll( basicType->get_forall(), *this );
    397292    return basicType;
    398293}
    399294
    400 Type*
    401 Mutator::mutate(PointerType *pointerType)
    402 {
     295Type *Mutator::mutate( PointerType *pointerType ) {
    403296    mutateAll( pointerType->get_forall(), *this );
    404297    pointerType->set_base( maybeMutate( pointerType->get_base(), *this ) );
     
    406299}
    407300
    408 Type*
    409 Mutator::mutate(ArrayType *arrayType)
    410 {
     301Type *Mutator::mutate( ArrayType *arrayType ) {
    411302    mutateAll( arrayType->get_forall(), *this );
    412303    arrayType->set_dimension( maybeMutate( arrayType->get_dimension(), *this ) );
     
    415306}
    416307
    417 Type*
    418 Mutator::mutate(FunctionType *functionType)
    419 {
     308Type *Mutator::mutate( FunctionType *functionType ) {
    420309    mutateAll( functionType->get_forall(), *this );
    421310    mutateAll( functionType->get_returnVals(), *this );
     
    424313}
    425314
    426 Type*
    427 Mutator::handleReferenceToType(ReferenceToType *aggregateUseType)
    428 {
     315Type *Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
    429316    mutateAll( aggregateUseType->get_forall(), *this );
    430317    mutateAll( aggregateUseType->get_parameters(), *this );
     
    432319}
    433320
    434 Type*
    435 Mutator::mutate(StructInstType *aggregateUseType)
    436 {
    437     handleReferenceToType( aggregateUseType );
    438     return aggregateUseType;
    439 }
    440 
    441 Type*
    442 Mutator::mutate(UnionInstType *aggregateUseType)
    443 {
    444     handleReferenceToType( aggregateUseType );
    445     return aggregateUseType;
    446 }
    447 
    448 Type*
    449 Mutator::mutate(EnumInstType *aggregateUseType)
    450 {
    451     handleReferenceToType( aggregateUseType );
    452     return aggregateUseType;
    453 }
    454 
    455 Type*
    456 Mutator::mutate(ContextInstType *aggregateUseType)
    457 {
     321Type *Mutator::mutate( StructInstType *aggregateUseType ) {
     322    handleReferenceToType( aggregateUseType );
     323    return aggregateUseType;
     324}
     325
     326Type *Mutator::mutate( UnionInstType *aggregateUseType ) {
     327    handleReferenceToType( aggregateUseType );
     328    return aggregateUseType;
     329}
     330
     331Type *Mutator::mutate( EnumInstType *aggregateUseType ) {
     332    handleReferenceToType( aggregateUseType );
     333    return aggregateUseType;
     334}
     335
     336Type *Mutator::mutate( ContextInstType *aggregateUseType ) {
    458337    handleReferenceToType( aggregateUseType );
    459338    mutateAll( aggregateUseType->get_members(), *this );
     
    461340}
    462341
    463 Type*
    464 Mutator::mutate(TypeInstType *aggregateUseType)
    465 {
    466     handleReferenceToType( aggregateUseType );
    467     return aggregateUseType;
    468 }
    469 
    470 Type*
    471 Mutator::mutate(TupleType *tupleType)
    472 {
     342Type *Mutator::mutate( TypeInstType *aggregateUseType ) {
     343    handleReferenceToType( aggregateUseType );
     344    return aggregateUseType;
     345}
     346
     347Type *Mutator::mutate( TupleType *tupleType ) {
    473348    mutateAll( tupleType->get_forall(), *this );
    474349    mutateAll( tupleType->get_types(), *this );
     
    476351}
    477352
    478 Type*
    479 Mutator::mutate(TypeofType *typeofType)
    480 {
     353Type *Mutator::mutate( TypeofType *typeofType ) {
    481354    assert( typeofType->get_expr() );
    482355    typeofType->set_expr( typeofType->get_expr()->acceptMutator( *this ) );
     
    484357}
    485358
    486 Type*
    487 Mutator::mutate(AttrType *attrType)
    488 {
    489     if( attrType->get_isType() ) {
     359Type *Mutator::mutate( AttrType *attrType ) {
     360    if ( attrType->get_isType() ) {
    490361        assert( attrType->get_type() );
    491362        attrType->set_type( attrType->get_type()->acceptMutator( *this ) );
     
    497368}
    498369
    499 Initializer*
    500 Mutator::mutate(MemberInit *memberInit)
    501 {
     370Initializer *Mutator::mutate( MemberInit *memberInit ) {
    502371    memberInit->set_value( memberInit->get_value()->acceptMutator( *this ) );
    503372    return memberInit;
    504373}
    505374
    506 Initializer*
    507 Mutator::mutate(ElementInit *elementInit)
    508 {
     375Initializer *Mutator::mutate( ElementInit *elementInit ) {
    509376    elementInit->set_value( elementInit->get_value()->acceptMutator( *this ) );
    510377    return elementInit;
    511378}
    512379
    513 Initializer*
    514 Mutator::mutate(SingleInit *singleInit)
    515 {
     380Initializer *Mutator::mutate( SingleInit *singleInit ) {
    516381    singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
    517382    return singleInit;
    518383}
    519384
    520 Initializer*
    521 Mutator::mutate(ListInit *listInit)
    522 {
     385Initializer *Mutator::mutate( ListInit *listInit ) {
    523386    mutateAll( listInit->get_designators(), *this );
    524387    mutateAll( listInit->get_initializers(), *this );
     
    526389}
    527390
    528 Subrange *
    529 Mutator::mutate(Subrange *subrange)
    530 {
     391Subrange *Mutator::mutate( Subrange *subrange ) {
    531392    return subrange;
    532393}
    533394
    534 Constant *
    535 Mutator::mutate(Constant *constant)
    536 {
     395Constant *Mutator::mutate( Constant *constant ) {
    537396    return constant;
    538397}
    539 
Note: See TracChangeset for help on using the changeset viewer.