Ignore:
Timestamp:
Jul 6, 2016, 6:06:27 PM (8 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, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
3f869f0
Parents:
e04c5ff
Message:

add labelled break to if statement, update comment formatting, add random number test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MLEMutator.h

    re04c5ff radcc065  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jun 03 15:06:36 2015
    13 // Update Count     : 25
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Jul  6 16:49:52 2016
     13// Update Count     : 31
    1414//
    1515
     
    3030        class MLEMutator : public Mutator {
    3131                class Entry;
     32                typedef Mutator Parent;
    3233          public:
    3334                MLEMutator( std::map<Label, Statement *> *t, LabelGenerator *gen = 0 ) : targetTable( t ), breakLabel(std::string("")), generator( gen ) {}
     
    3536
    3637                CompoundStmt *mutate( CompoundStmt *cmpndStmt );
    37                 Statement *mutate( WhileStmt *whileStmt );
    38                 Statement *mutate( ForStmt *forStmt );
    39                 Statement *mutate( BranchStmt *branchStmt ) throw ( SemanticError );
     38                virtual Statement *mutate( WhileStmt *whileStmt ) override;
     39                virtual Statement *mutate( ForStmt *forStmt ) override;
     40                virtual Statement *mutate( BranchStmt *branchStmt ) throw ( SemanticError ) override;
    4041
    41                 Statement *mutate( CaseStmt *caseStmt );
    42                 Statement *mutate( SwitchStmt *switchStmt );
    43                 Statement *mutate( ChooseStmt *switchStmt );
     42                virtual Statement *mutate( CaseStmt *caseStmt ) override;
     43                virtual Statement *mutate( IfStmt *ifStmt ) override;
     44                virtual Statement *mutate( SwitchStmt *switchStmt ) override;
     45                virtual Statement *mutate( ChooseStmt *switchStmt ) override;
    4446
    4547                Statement *mutateLoop( Statement *bodyLoop, Entry &e );
     
    6567                        bool isContUsed() const { return contUsed; }
    6668                        bool isBreakUsed() const { return breakUsed; }
    67 
    6869                  private:
    6970                        Statement *loop;
     
    7980                template< typename LoopClass >
    8081                Statement *handleLoopStmt( LoopClass *loopStmt );
     82
     83                template< typename IfClass >
     84                Statement *handleIfStmt( IfClass *switchStmt );
    8185
    8286                template< typename SwitchClass >
Note: See TracChangeset for help on using the changeset viewer.