Changes in src/SynTree/Mutator.cc [b6fe7e6:906e24d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Mutator.cc
rb6fe7e6 r906e24d 178 178 179 179 Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) { 180 mutateAll( applicationExpr->get_results(), *this);180 applicationExpr->set_result( maybeMutate( applicationExpr->get_result(), *this ) ); 181 181 applicationExpr->set_function( maybeMutate( applicationExpr->get_function(), *this ) ); 182 182 mutateAll( applicationExpr->get_args(), *this ); … … 185 185 186 186 Expression *Mutator::mutate( UntypedExpr *untypedExpr ) { 187 mutateAll( untypedExpr->get_results(), *this);187 untypedExpr->set_result( maybeMutate( untypedExpr->get_result(), *this ) ); 188 188 mutateAll( untypedExpr->get_args(), *this ); 189 189 return untypedExpr; … … 191 191 192 192 Expression *Mutator::mutate( NameExpr *nameExpr ) { 193 mutateAll( nameExpr->get_results(), *this);193 nameExpr->set_result( maybeMutate( nameExpr->get_result(), *this ) ); 194 194 return nameExpr; 195 195 } 196 196 197 197 Expression *Mutator::mutate( AddressExpr *addressExpr ) { 198 mutateAll( addressExpr->get_results(), *this);198 addressExpr->set_result( maybeMutate( addressExpr->get_result(), *this ) ); 199 199 addressExpr->set_arg( maybeMutate( addressExpr->get_arg(), *this ) ); 200 200 return addressExpr; … … 202 202 203 203 Expression *Mutator::mutate( LabelAddressExpr *labelAddressExpr ) { 204 mutateAll( labelAddressExpr->get_results(), *this);204 labelAddressExpr->set_result( maybeMutate( labelAddressExpr->get_result(), *this ) ); 205 205 labelAddressExpr->set_arg( maybeMutate( labelAddressExpr->get_arg(), *this ) ); 206 206 return labelAddressExpr; … … 208 208 209 209 Expression *Mutator::mutate( CastExpr *castExpr ) { 210 mutateAll( castExpr->get_results(), *this);210 castExpr->set_result( maybeMutate( castExpr->get_result(), *this ) ); 211 211 castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) ); 212 212 return castExpr; … … 214 214 215 215 Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) { 216 m utateAll( memberExpr->get_results(), *this);216 memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) ); 217 217 memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) ); 218 218 return memberExpr; … … 220 220 221 221 Expression *Mutator::mutate( MemberExpr *memberExpr ) { 222 m utateAll( memberExpr->get_results(), *this);222 memberExpr->set_result( maybeMutate( memberExpr->get_result(), *this ) ); 223 223 memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) ); 224 224 return memberExpr; … … 226 226 227 227 Expression *Mutator::mutate( VariableExpr *variableExpr ) { 228 mutateAll( variableExpr->get_results(), *this);228 variableExpr->set_result( maybeMutate( variableExpr->get_result(), *this ) ); 229 229 return variableExpr; 230 230 } 231 231 232 232 Expression *Mutator::mutate( ConstantExpr *constantExpr ) { 233 mutateAll( constantExpr->get_results(), *this);233 constantExpr->set_result( maybeMutate( constantExpr->get_result(), *this ) ); 234 234 // maybeMutate( constantExpr->get_constant(), *this ) 235 235 return constantExpr; … … 237 237 238 238 Expression *Mutator::mutate( SizeofExpr *sizeofExpr ) { 239 mutateAll( sizeofExpr->get_results(), *this);239 sizeofExpr->set_result( maybeMutate( sizeofExpr->get_result(), *this ) ); 240 240 if ( sizeofExpr->get_isType() ) { 241 241 sizeofExpr->set_type( maybeMutate( sizeofExpr->get_type(), *this ) ); … … 247 247 248 248 Expression *Mutator::mutate( AlignofExpr *alignofExpr ) { 249 mutateAll( alignofExpr->get_results(), *this);249 alignofExpr->set_result( maybeMutate( alignofExpr->get_result(), *this ) ); 250 250 if ( alignofExpr->get_isType() ) { 251 251 alignofExpr->set_type( maybeMutate( alignofExpr->get_type(), *this ) ); … … 257 257 258 258 Expression *Mutator::mutate( UntypedOffsetofExpr *offsetofExpr ) { 259 mutateAll( offsetofExpr->get_results(), *this);259 offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) ); 260 260 offsetofExpr->set_type( maybeMutate( offsetofExpr->get_type(), *this ) ); 261 261 return offsetofExpr; … … 263 263 264 264 Expression *Mutator::mutate( OffsetofExpr *offsetofExpr ) { 265 mutateAll( offsetofExpr->get_results(), *this);265 offsetofExpr->set_result( maybeMutate( offsetofExpr->get_result(), *this ) ); 266 266 offsetofExpr->set_type( maybeMutate( offsetofExpr->get_type(), *this ) ); 267 267 offsetofExpr->set_member( maybeMutate( offsetofExpr->get_member(), *this ) ); … … 270 270 271 271 Expression *Mutator::mutate( OffsetPackExpr *offsetPackExpr ) { 272 mutateAll( offsetPackExpr->get_results(), *this);272 offsetPackExpr->set_result( maybeMutate( offsetPackExpr->get_result(), *this ) ); 273 273 offsetPackExpr->set_type( maybeMutate( offsetPackExpr->get_type(), *this ) ); 274 274 return offsetPackExpr; … … 276 276 277 277 Expression *Mutator::mutate( AttrExpr *attrExpr ) { 278 mutateAll( attrExpr->get_results(), *this);278 attrExpr->set_result( maybeMutate( attrExpr->get_result(), *this ) ); 279 279 if ( attrExpr->get_isType() ) { 280 280 attrExpr->set_type( maybeMutate( attrExpr->get_type(), *this ) ); … … 286 286 287 287 Expression *Mutator::mutate( LogicalExpr *logicalExpr ) { 288 mutateAll( logicalExpr->get_results(), *this);288 logicalExpr->set_result( maybeMutate( logicalExpr->get_result(), *this ) ); 289 289 logicalExpr->set_arg1( maybeMutate( logicalExpr->get_arg1(), *this ) ); 290 290 logicalExpr->set_arg2( maybeMutate( logicalExpr->get_arg2(), *this ) ); … … 293 293 294 294 Expression *Mutator::mutate( ConditionalExpr *conditionalExpr ) { 295 mutateAll( conditionalExpr->get_results(), *this);295 conditionalExpr->set_result( maybeMutate( conditionalExpr->get_result(), *this ) ); 296 296 conditionalExpr->set_arg1( maybeMutate( conditionalExpr->get_arg1(), *this ) ); 297 297 conditionalExpr->set_arg2( maybeMutate( conditionalExpr->get_arg2(), *this ) ); … … 301 301 302 302 Expression *Mutator::mutate( CommaExpr *commaExpr ) { 303 mutateAll( commaExpr->get_results(), *this);303 commaExpr->set_result( maybeMutate( commaExpr->get_result(), *this ) ); 304 304 commaExpr->set_arg1( maybeMutate( commaExpr->get_arg1(), *this ) ); 305 305 commaExpr->set_arg2( maybeMutate( commaExpr->get_arg2(), *this ) ); … … 308 308 309 309 Expression *Mutator::mutate( TupleExpr *tupleExpr ) { 310 mutateAll( tupleExpr->get_results(), *this);310 tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) ); 311 311 mutateAll( tupleExpr->get_exprs(), *this ); 312 312 return tupleExpr; … … 314 314 315 315 Expression *Mutator::mutate( SolvedTupleExpr *tupleExpr ) { 316 mutateAll( tupleExpr->get_results(), *this);316 tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) ); 317 317 mutateAll( tupleExpr->get_exprs(), *this ); 318 318 return tupleExpr; … … 320 320 321 321 Expression *Mutator::mutate( TypeExpr *typeExpr ) { 322 mutateAll( typeExpr->get_results(), *this);322 typeExpr->set_result( maybeMutate( typeExpr->get_result(), *this ) ); 323 323 typeExpr->set_type( maybeMutate( typeExpr->get_type(), *this ) ); 324 324 return typeExpr; … … 340 340 341 341 Expression* Mutator::mutate( ConstructorExpr *ctorExpr ) { 342 mutateAll( ctorExpr->get_results(), *this);342 ctorExpr->set_result( maybeMutate( ctorExpr->get_result(), *this ) ); 343 343 ctorExpr->set_callExpr( maybeMutate( ctorExpr->get_callExpr(), *this ) ); 344 344 return ctorExpr; … … 346 346 347 347 Expression *Mutator::mutate( CompoundLiteralExpr *compLitExpr ) { 348 mutateAll( compLitExpr->get_results(), *this);348 compLitExpr->set_result( maybeMutate( compLitExpr->get_result(), *this ) ); 349 349 compLitExpr->set_type( maybeMutate( compLitExpr->get_type(), *this ) ); 350 350 compLitExpr->set_initializer( maybeMutate( compLitExpr->get_initializer(), *this ) ); … … 353 353 354 354 Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) { 355 mutateAll( valofExpr->get_results(), *this);355 valofExpr->set_result( maybeMutate( valofExpr->get_result(), *this ) ); 356 356 return valofExpr; 357 357 }
Note:
See TracChangeset
for help on using the changeset viewer.