Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Mutator.cc

    r135b431 r6d49ea3  
    3232Mutator::~Mutator() {}
    3333
    34 DeclarationWithType * Mutator::mutate( ObjectDecl *objectDecl ) {
     34DeclarationWithType *Mutator::mutate( ObjectDecl *objectDecl ) {
    3535        objectDecl->set_type( maybeMutate( objectDecl->get_type(), *this ) );
    3636        objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
     
    3939}
    4040
    41 DeclarationWithType * Mutator::mutate( FunctionDecl *functionDecl ) {
     41DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) {
    4242        functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
    4343        functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
     
    4545}
    4646
    47 Declaration * Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
     47Declaration *Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
    4848        mutateAll( aggregateDecl->get_parameters(), *this );
    4949        mutateAll( aggregateDecl->get_members(), *this );
     
    5151}
    5252
    53 Declaration * Mutator::mutate( StructDecl *aggregateDecl ) {
     53Declaration *Mutator::mutate( StructDecl *aggregateDecl ) {
    5454        handleAggregateDecl( aggregateDecl );
    5555        return aggregateDecl;
    5656}
    5757
    58 Declaration * Mutator::mutate( UnionDecl *aggregateDecl ) {
     58Declaration *Mutator::mutate( UnionDecl *aggregateDecl ) {
    5959        handleAggregateDecl( aggregateDecl );
    6060        return aggregateDecl;
    6161}
    6262
    63 Declaration * Mutator::mutate( EnumDecl *aggregateDecl ) {
     63Declaration *Mutator::mutate( EnumDecl *aggregateDecl ) {
    6464        handleAggregateDecl( aggregateDecl );
    6565        return aggregateDecl;
    6666}
    6767
    68 Declaration * Mutator::mutate( TraitDecl *aggregateDecl ) {
     68Declaration *Mutator::mutate( TraitDecl *aggregateDecl ) {
    6969        handleAggregateDecl( aggregateDecl );
    7070        return aggregateDecl;
    7171}
    7272
    73 Declaration * Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
     73Declaration *Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
    7474        mutateAll( typeDecl->get_parameters(), *this );
    7575        mutateAll( typeDecl->get_assertions(), *this );
     
    7878}
    7979
    80 TypeDecl * Mutator::mutate( TypeDecl *typeDecl ) {
     80TypeDecl *Mutator::mutate( TypeDecl *typeDecl ) {
    8181        handleNamedTypeDecl( typeDecl );
    8282        typeDecl->set_init( maybeMutate( typeDecl->get_init(), *this ) );
     
    8484}
    8585
    86 Declaration * Mutator::mutate( TypedefDecl *typeDecl ) {
     86Declaration *Mutator::mutate( TypedefDecl *typeDecl ) {
    8787        handleNamedTypeDecl( typeDecl );
    8888        return typeDecl;
    8989}
    9090
    91 AsmDecl * Mutator::mutate( AsmDecl *asmDecl ) {
     91AsmDecl *Mutator::mutate( AsmDecl *asmDecl ) {
    9292        asmDecl->set_stmt( maybeMutate( asmDecl->get_stmt(), *this ) );
    9393        return asmDecl;
     
    9595
    9696
    97 CompoundStmt * Mutator::mutate( CompoundStmt *compoundStmt ) {
     97CompoundStmt *Mutator::mutate( CompoundStmt *compoundStmt ) {
    9898        mutateAll( compoundStmt->get_kids(), *this );
    9999        return compoundStmt;
    100100}
    101101
    102 Statement * Mutator::mutate( ExprStmt *exprStmt ) {
     102Statement *Mutator::mutate( ExprStmt *exprStmt ) {
    103103        exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
    104104        return exprStmt;
    105105}
    106106
    107 Statement * Mutator::mutate( AsmStmt *asmStmt ) {
     107Statement *Mutator::mutate( AsmStmt *asmStmt ) {
    108108        asmStmt->set_instruction( maybeMutate( asmStmt->get_instruction(), *this ) );
    109109        mutateAll( asmStmt->get_output(), *this );
     
    113113}
    114114
    115 Statement * Mutator::mutate( IfStmt *ifStmt ) {
     115Statement *Mutator::mutate( IfStmt *ifStmt ) {
    116116        mutateAll( ifStmt->get_initialization(), *this );
    117117        ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
     
    121121}
    122122
    123 Statement * Mutator::mutate( WhileStmt *whileStmt ) {
     123Statement *Mutator::mutate( WhileStmt *whileStmt ) {
    124124        whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
    125125        whileStmt->set_body( maybeMutate( whileStmt->get_body(), *this ) );
     
    127127}
    128128
    129 Statement * Mutator::mutate( ForStmt *forStmt ) {
     129Statement *Mutator::mutate( ForStmt *forStmt ) {
    130130        mutateAll( forStmt->get_initialization(), *this );
    131131        forStmt->set_condition( maybeMutate( forStmt->get_condition(), *this ) );
     
    135135}
    136136
    137 Statement * Mutator::mutate( SwitchStmt *switchStmt ) {
     137Statement *Mutator::mutate( SwitchStmt *switchStmt ) {
    138138        switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
    139139        mutateAll( switchStmt->get_statements(), *this );
     
    141141}
    142142
    143 Statement * Mutator::mutate( CaseStmt *caseStmt ) {
     143Statement *Mutator::mutate( CaseStmt *caseStmt ) {
    144144        caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
    145145        mutateAll (caseStmt->get_statements(), *this );
     
    148148}
    149149
    150 Statement * Mutator::mutate( BranchStmt *branchStmt ) {
     150Statement *Mutator::mutate( BranchStmt *branchStmt ) {
    151151        return branchStmt;
    152152}
    153153
    154 Statement * Mutator::mutate( ReturnStmt *returnStmt ) {
     154Statement *Mutator::mutate( ReturnStmt *returnStmt ) {
    155155        returnStmt->set_expr( maybeMutate( returnStmt->get_expr(), *this ) );
    156156        return returnStmt;
    157157}
    158158
    159 Statement * Mutator::mutate( ThrowStmt *throwStmt ) {
     159Statement *Mutator::mutate( ThrowStmt *throwStmt ) {
    160160        throwStmt->set_expr( maybeMutate( throwStmt->get_expr(), *this ) );
    161161        throwStmt->set_target( maybeMutate( throwStmt->get_target(), *this ) );
     
    163163}
    164164
    165 Statement * Mutator::mutate( TryStmt *tryStmt ) {
     165Statement *Mutator::mutate( TryStmt *tryStmt ) {
    166166        tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
    167167        mutateAll( tryStmt->get_catchers(), *this );
     
    170170}
    171171
    172 Statement * Mutator::mutate( CatchStmt *catchStmt ) {
     172Statement *Mutator::mutate( CatchStmt *catchStmt ) {
    173173        catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
    174174        catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
     
    177177}
    178178
    179 Statement * Mutator::mutate( FinallyStmt *finalStmt ) {
     179Statement *Mutator::mutate( FinallyStmt *finalStmt ) {
    180180        finalStmt->set_block( maybeMutate( finalStmt->get_block(), *this ) );
    181181        return finalStmt;
    182182}
    183183
    184 Statement * Mutator::mutate( WaitForStmt *waitforStmt ) {
    185         for( auto & clause : waitforStmt->clauses ) {
    186                 clause.target.function = maybeMutate( clause.target.function, *this );
    187                 mutateAll( clause.target.arguments, *this );
    188 
    189                 clause.statement = maybeMutate( clause.statement, *this );
    190                 clause.condition = maybeMutate( clause.condition, *this );
    191         }
    192 
    193         waitforStmt->timeout.time      = maybeMutate( waitforStmt->timeout.time, *this );
    194         waitforStmt->timeout.statement = maybeMutate( waitforStmt->timeout.statement, *this );
    195         waitforStmt->timeout.condition = maybeMutate( waitforStmt->timeout.condition, *this );
    196         waitforStmt->orelse.statement  = maybeMutate( waitforStmt->orelse.statement, *this );
    197         waitforStmt->orelse.condition  = maybeMutate( waitforStmt->orelse.condition, *this );
    198 
    199         return waitforStmt;
    200 }
    201 
    202 NullStmt * Mutator::mutate( NullStmt *nullStmt ) {
     184NullStmt *Mutator::mutate( NullStmt *nullStmt ) {
    203185        return nullStmt;
    204186}
    205187
    206 Statement * Mutator::mutate( DeclStmt *declStmt ) {
     188Statement *Mutator::mutate( DeclStmt *declStmt ) {
    207189        declStmt->set_decl( maybeMutate( declStmt->get_decl(), *this ) );
    208190        return declStmt;
    209191}
    210192
    211 Statement * Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
     193Statement *Mutator::mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) {
    212194        impCtorDtorStmt->set_callStmt( maybeMutate( impCtorDtorStmt->get_callStmt(), *this ) );
    213195        return impCtorDtorStmt;
     
    215197
    216198
    217 Expression * Mutator::mutate( ApplicationExpr *applicationExpr ) {
     199Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) {
    218200        applicationExpr->set_env( maybeMutate( applicationExpr->get_env(), *this ) );
    219201        applicationExpr->set_result( maybeMutate( applicationExpr->get_result(), *this ) );
     
    223205}
    224206
    225 Expression * Mutator::mutate( UntypedExpr *untypedExpr ) {
     207Expression *Mutator::mutate( UntypedExpr *untypedExpr ) {
    226208        untypedExpr->set_env( maybeMutate( untypedExpr->get_env(), *this ) );
    227209        untypedExpr->set_result( maybeMutate( untypedExpr->get_result(), *this ) );
     
    230212}
    231213
    232 Expression * Mutator::mutate( NameExpr *nameExpr ) {
     214Expression *Mutator::mutate( NameExpr *nameExpr ) {
    233215        nameExpr->set_env( maybeMutate( nameExpr->get_env(), *this ) );
    234216        nameExpr->set_result( maybeMutate( nameExpr->get_result(), *this ) );
     
    236218}
    237219
    238 Expression * Mutator::mutate( AddressExpr *addressExpr ) {
     220Expression *Mutator::mutate( AddressExpr *addressExpr ) {
    239221        addressExpr->set_env( maybeMutate( addressExpr->get_env(), *this ) );
    240222        addressExpr->set_result( maybeMutate( addressExpr->get_result(), *this ) );
     
    243225}
    244226
    245 Expression * Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
     227Expression *Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
    246228        labelAddressExpr->set_env( maybeMutate( labelAddressExpr->get_env(), *this ) );
    247229        labelAddressExpr->set_result( maybeMutate( labelAddressExpr->get_result(), *this ) );
     
    250232}
    251233
    252 Expression * Mutator::mutate( CastExpr *castExpr ) {
     234Expression *Mutator::mutate( CastExpr *castExpr ) {
    253235        castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
    254236        castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
     
    257239}
    258240
    259 Expression * Mutator::mutate( VirtualCastExpr *castExpr ) {
     241Expression *Mutator::mutate( VirtualCastExpr *castExpr ) {
    260242        castExpr->set_env( maybeMutate( castExpr->get_env(), *this ) );
    261243        castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) );
     
    264246}
    265247
    266 Expression * Mutator::mutate( UntypedMemberExpr *memberExpr ) {
     248Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) {
    267249        memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
    268250        memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
     
    272254}
    273255
    274 Expression * Mutator::mutate( MemberExpr *memberExpr ) {
     256Expression *Mutator::mutate( MemberExpr *memberExpr ) {
    275257        memberExpr->set_env( maybeMutate( memberExpr->get_env(), *this ) );
    276258        memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) );
     
    279261}
    280262
    281 Expression * Mutator::mutate( VariableExpr *variableExpr ) {
     263Expression *Mutator::mutate( VariableExpr *variableExpr ) {
    282264        variableExpr->set_env( maybeMutate( variableExpr->get_env(), *this ) );
    283265        variableExpr->set_result( maybeMutate( variableExpr->get_result(), *this ) );
     
    285267}
    286268
    287 Expression * Mutator::mutate( ConstantExpr *constantExpr ) {
     269Expression *Mutator::mutate( ConstantExpr *constantExpr ) {
    288270        constantExpr->set_env( maybeMutate( constantExpr->get_env(), *this ) );
    289271        constantExpr->set_result( maybeMutate( constantExpr->get_result(), *this ) );
     
    292274}
    293275
    294 Expression * Mutator::mutate( SizeofExpr *sizeofExpr ) {
     276Expression *Mutator::mutate( SizeofExpr *sizeofExpr ) {
    295277        sizeofExpr->set_env( maybeMutate( sizeofExpr->get_env(), *this ) );
    296278        sizeofExpr->set_result( maybeMutate( sizeofExpr->get_result(), *this ) );
     
    303285}
    304286
    305 Expression * Mutator::mutate( AlignofExpr *alignofExpr ) {
     287Expression *Mutator::mutate( AlignofExpr *alignofExpr ) {
    306288        alignofExpr->set_env( maybeMutate( alignofExpr->get_env(), *this ) );
    307289        alignofExpr->set_result( maybeMutate( alignofExpr->get_result(), *this ) );
     
    314296}
    315297
    316 Expression * Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) {
     298Expression *Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) {
    317299        offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
    318300        offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
     
    321303}
    322304
    323 Expression * Mutator::mutate( OffsetofExpr *offsetofExpr ) {
     305Expression *Mutator::mutate( OffsetofExpr *offsetofExpr ) {
    324306        offsetofExpr->set_env( maybeMutate( offsetofExpr->get_env(), *this ) );
    325307        offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) );
     
    329311}
    330312
    331 Expression * Mutator::mutate( OffsetPackExpr *offsetPackExpr ) {
     313Expression *Mutator::mutate( OffsetPackExpr *offsetPackExpr ) {
    332314        offsetPackExpr->set_env( maybeMutate( offsetPackExpr->get_env(), *this ) );
    333315        offsetPackExpr->set_result( maybeMutate( offsetPackExpr->get_result(), *this ) );
     
    336318}
    337319
    338 Expression * Mutator::mutate( AttrExpr *attrExpr ) {
     320Expression *Mutator::mutate( AttrExpr *attrExpr ) {
    339321        attrExpr->set_env( maybeMutate( attrExpr->get_env(), *this ) );
    340322        attrExpr->set_result( maybeMutate( attrExpr->get_result(), *this ) );
     
    347329}
    348330
    349 Expression * Mutator::mutate( LogicalExpr *logicalExpr ) {
     331Expression *Mutator::mutate( LogicalExpr *logicalExpr ) {
    350332        logicalExpr->set_env( maybeMutate( logicalExpr->get_env(), *this ) );
    351333        logicalExpr->set_result( maybeMutate( logicalExpr->get_result(), *this ) );
     
    355337}
    356338
    357 Expression * Mutator::mutate( ConditionalExpr *conditionalExpr ) {
     339Expression *Mutator::mutate( ConditionalExpr *conditionalExpr ) {
    358340        conditionalExpr->set_env( maybeMutate( conditionalExpr->get_env(), *this ) );
    359341        conditionalExpr->set_result( maybeMutate( conditionalExpr->get_result(), *this ) );
     
    364346}
    365347
    366 Expression * Mutator::mutate( CommaExpr *commaExpr ) {
     348Expression *Mutator::mutate( CommaExpr *commaExpr ) {
    367349        commaExpr->set_env( maybeMutate( commaExpr->get_env(), *this ) );
    368350        commaExpr->set_result( maybeMutate( commaExpr->get_result(), *this ) );
     
    372354}
    373355
    374 Expression * Mutator::mutate( TypeExpr *typeExpr ) {
     356Expression *Mutator::mutate( TypeExpr *typeExpr ) {
    375357        typeExpr->set_env( maybeMutate( typeExpr->get_env(), *this ) );
    376358        typeExpr->set_result( maybeMutate( typeExpr->get_result(), *this ) );
     
    379361}
    380362
    381 Expression * Mutator::mutate( AsmExpr *asmExpr ) {
     363Expression *Mutator::mutate( AsmExpr *asmExpr ) {
    382364        asmExpr->set_env( maybeMutate( asmExpr->get_env(), *this ) );
    383365        asmExpr->set_inout( maybeMutate( asmExpr->get_inout(), *this ) );
     
    404386}
    405387
    406 Expression * Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
     388Expression *Mutator::mutate( CompoundLiteralExpr *compLitExpr ) {
    407389        compLitExpr->set_env( maybeMutate( compLitExpr->get_env(), *this ) );
    408390        compLitExpr->set_result( maybeMutate( compLitExpr->get_result(), *this ) );
     
    411393}
    412394
    413 Expression * Mutator::mutate( RangeExpr *rangeExpr ) {
     395Expression *Mutator::mutate( RangeExpr *rangeExpr ) {
    414396        rangeExpr->set_env( maybeMutate( rangeExpr->get_env(), *this ) );
    415397        rangeExpr->set_low( maybeMutate( rangeExpr->get_low(), *this ) );
     
    418400}
    419401
    420 Expression * Mutator::mutate( UntypedTupleExpr *tupleExpr ) {
     402Expression *Mutator::mutate( UntypedTupleExpr *tupleExpr ) {
    421403        tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
    422404        tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
     
    425407}
    426408
    427 Expression * Mutator::mutate( TupleExpr *tupleExpr ) {
     409Expression *Mutator::mutate( TupleExpr *tupleExpr ) {
    428410        tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
    429411        tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
     
    432414}
    433415
    434 Expression * Mutator::mutate( TupleIndexExpr *tupleExpr ) {
     416Expression *Mutator::mutate( TupleIndexExpr *tupleExpr ) {
    435417        tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) );
    436418        tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) );
     
    439421}
    440422
    441 Expression * Mutator::mutate( TupleAssignExpr *assignExpr ) {
     423Expression *Mutator::mutate( TupleAssignExpr *assignExpr ) {
    442424        assignExpr->set_env( maybeMutate( assignExpr->get_env(), *this ) );
    443425        assignExpr->set_result( maybeMutate( assignExpr->get_result(), *this ) );
     
    446428}
    447429
    448 Expression * Mutator::mutate( StmtExpr *stmtExpr ) {
     430Expression *Mutator::mutate( StmtExpr *stmtExpr ) {
    449431        stmtExpr->set_env( maybeMutate( stmtExpr->get_env(), *this ) );
    450432        stmtExpr->set_result( maybeMutate( stmtExpr->get_result(), *this ) );
     
    455437}
    456438
    457 Expression * Mutator::mutate( UniqueExpr *uniqueExpr ) {
     439Expression *Mutator::mutate( UniqueExpr *uniqueExpr ) {
    458440        uniqueExpr->set_env( maybeMutate( uniqueExpr->get_env(), *this ) );
    459441        uniqueExpr->set_result( maybeMutate( uniqueExpr->get_result(), *this ) );
     
    462444}
    463445
    464 Expression * Mutator::mutate( UntypedInitExpr * initExpr ) {
     446Expression *Mutator::mutate( UntypedInitExpr * initExpr ) {
    465447        initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
    466448        initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
     
    470452}
    471453
    472 Expression * Mutator::mutate( InitExpr * initExpr ) {
     454Expression *Mutator::mutate( InitExpr * initExpr ) {
    473455        initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) );
    474456        initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) );
     
    479461
    480462
    481 Type * Mutator::mutate( VoidType *voidType ) {
     463Type *Mutator::mutate( VoidType *voidType ) {
    482464        mutateAll( voidType->get_forall(), *this );
    483465        return voidType;
    484466}
    485467
    486 Type * Mutator::mutate( BasicType *basicType ) {
     468Type *Mutator::mutate( BasicType *basicType ) {
    487469        mutateAll( basicType->get_forall(), *this );
    488470        return basicType;
    489471}
    490472
    491 Type * Mutator::mutate( PointerType *pointerType ) {
     473Type *Mutator::mutate( PointerType *pointerType ) {
    492474        mutateAll( pointerType->get_forall(), *this );
    493475        pointerType->set_base( maybeMutate( pointerType->get_base(), *this ) );
     
    495477}
    496478
    497 Type * Mutator::mutate( ArrayType *arrayType ) {
     479Type *Mutator::mutate( ArrayType *arrayType ) {
    498480        mutateAll( arrayType->get_forall(), *this );
    499481        arrayType->set_dimension( maybeMutate( arrayType->get_dimension(), *this ) );
     
    502484}
    503485
    504 Type * Mutator::mutate( FunctionType *functionType ) {
     486Type *Mutator::mutate( FunctionType *functionType ) {
    505487        mutateAll( functionType->get_forall(), *this );
    506488        mutateAll( functionType->get_returnVals(), *this );
     
    509491}
    510492
    511 Type * Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
     493Type *Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
    512494        mutateAll( aggregateUseType->get_forall(), *this );
    513495        mutateAll( aggregateUseType->get_parameters(), *this );
     
    515497}
    516498
    517 Type * Mutator::mutate( StructInstType *aggregateUseType ) {
     499Type *Mutator::mutate( StructInstType *aggregateUseType ) {
    518500        handleReferenceToType( aggregateUseType );
    519501        return aggregateUseType;
    520502}
    521503
    522 Type * Mutator::mutate( UnionInstType *aggregateUseType ) {
     504Type *Mutator::mutate( UnionInstType *aggregateUseType ) {
    523505        handleReferenceToType( aggregateUseType );
    524506        return aggregateUseType;
    525507}
    526508
    527 Type * Mutator::mutate( EnumInstType *aggregateUseType ) {
     509Type *Mutator::mutate( EnumInstType *aggregateUseType ) {
    528510        handleReferenceToType( aggregateUseType );
    529511        return aggregateUseType;
    530512}
    531513
    532 Type * Mutator::mutate( TraitInstType *aggregateUseType ) {
     514Type *Mutator::mutate( TraitInstType *aggregateUseType ) {
    533515        handleReferenceToType( aggregateUseType );
    534516        mutateAll( aggregateUseType->get_members(), *this );
     
    536518}
    537519
    538 Type * Mutator::mutate( TypeInstType *aggregateUseType ) {
     520Type *Mutator::mutate( TypeInstType *aggregateUseType ) {
    539521        handleReferenceToType( aggregateUseType );
    540522        return aggregateUseType;
    541523}
    542524
    543 Type * Mutator::mutate( TupleType *tupleType ) {
     525Type *Mutator::mutate( TupleType *tupleType ) {
    544526        mutateAll( tupleType->get_forall(), *this );
    545527        mutateAll( tupleType->get_types(), *this );
     
    548530}
    549531
    550 Type * Mutator::mutate( TypeofType *typeofType ) {
     532Type *Mutator::mutate( TypeofType *typeofType ) {
    551533        assert( typeofType->get_expr() );
    552534        typeofType->set_expr( typeofType->get_expr()->acceptMutator( *this ) );
     
    554536}
    555537
    556 Type * Mutator::mutate( AttrType *attrType ) {
     538Type *Mutator::mutate( AttrType *attrType ) {
    557539        if ( attrType->get_isType() ) {
    558540                assert( attrType->get_type() );
     
    565547}
    566548
    567 Type * Mutator::mutate( VarArgsType *varArgsType ) {
     549Type *Mutator::mutate( VarArgsType *varArgsType ) {
    568550        mutateAll( varArgsType->get_forall(), *this );
    569551        return varArgsType;
    570552}
    571553
    572 Type * Mutator::mutate( ZeroType *zeroType ) {
     554Type *Mutator::mutate( ZeroType *zeroType ) {
    573555        mutateAll( zeroType->get_forall(), *this );
    574556        return zeroType;
    575557}
    576558
    577 Type * Mutator::mutate( OneType *oneType ) {
     559Type *Mutator::mutate( OneType *oneType ) {
    578560        mutateAll( oneType->get_forall(), *this );
    579561        return oneType;
     
    581563
    582564
    583 Designation * Mutator::mutate( Designation * designation ) {
     565Designation *Mutator::mutate( Designation * designation ) {
    584566        mutateAll( designation->get_designators(), *this );
    585567        return designation;
    586568}
    587569
    588 Initializer * Mutator::mutate( SingleInit *singleInit ) {
     570Initializer *Mutator::mutate( SingleInit *singleInit ) {
    589571        singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
    590572        return singleInit;
    591573}
    592574
    593 Initializer * Mutator::mutate( ListInit *listInit ) {
     575Initializer *Mutator::mutate( ListInit *listInit ) {
    594576        mutateAll( listInit->get_designations(), *this );
    595577        mutateAll( listInit->get_initializers(), *this );
     
    597579}
    598580
    599 Initializer * Mutator::mutate( ConstructorInit *ctorInit ) {
     581Initializer *Mutator::mutate( ConstructorInit *ctorInit ) {
    600582        ctorInit->set_ctor( maybeMutate( ctorInit->get_ctor(), *this ) );
    601583        ctorInit->set_dtor( maybeMutate( ctorInit->get_dtor(), *this ) );
     
    605587
    606588
    607 Subrange * Mutator::mutate( Subrange *subrange ) {
     589Subrange *Mutator::mutate( Subrange *subrange ) {
    608590        return subrange;
    609591}
    610592
    611593
    612 Constant * Mutator::mutate( Constant *constant ) {
     594Constant *Mutator::mutate( Constant *constant ) {
    613595        return constant;
    614596}
Note: See TracChangeset for help on using the changeset viewer.