Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MLEMutator.h

    r27de955 r843054c2  
    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 : Tue May 19 15:32:39 2015
     13// Update Count     : 3
    1414//
    1515
     
    3838                Statement *mutate( BranchStmt *branchStmt ) throw ( SemanticError );
    3939
    40                 Statement *mutate( CaseStmt *caseStmt );
    4140                Statement *mutate( SwitchStmt *switchStmt );
    4241                Statement *mutate( ChooseStmt *switchStmt );
     
    4948                class Entry {
    5049                  public:
    51                         explicit Entry( Statement *_loop, Label _breakExit, Label _contExit = Label("") ) :
    52                                 loop( _loop ), breakExit( _breakExit ), contExit( _contExit ), breakUsed(false), contUsed(false) {}
     50                        explicit Entry( Statement *_loop = 0, Label _contExit = Label(""), Label _breakExit = Label("") ) :
     51                                loop( _loop ), contExit( _contExit ), breakExit( _breakExit ), contExitUsed( false ), breakExitUsed( false ) {}
    5352
    5453                        bool operator==( const Statement *stmt ) { return ( loop == stmt ); }
     
    5958                        Statement *get_loop() const { return loop; }
    6059
    61                         Label useContExit() { contUsed = true; return contExit; }
    62                         Label useBreakExit() { breakUsed = true; return breakExit; }
     60                        Label get_contExit() const { return contExit; }
     61                        void set_contExit( Label );
    6362
    64                         bool isContUsed() const { return contUsed; }
    65                         bool isBreakUsed() const { return breakUsed; }
     63                        Label get_breakExit() const { return breakExit; }
     64                        void set_breakExit( Label );
    6665
    6766                  private:
    6867                        Statement *loop;
    69                         Label breakExit, contExit;
    70                         bool breakUsed, contUsed;
     68                        Label contExit, breakExit;
     69                  public: // hack, provide proper [sg]etters
     70                        bool contExitUsed, breakExitUsed;
    7171                };
    7272
     
    7575                Label breakLabel;
    7676                LabelGenerator *generator;
    77 
    78                 template< typename LoopClass >
    79                 Statement *handleLoopStmt( LoopClass *loopStmt );
    80 
    81                 template< typename SwitchClass >
    82                 Statement *handleSwitchStmt( SwitchClass *switchStmt );
    83 
    84                 void fixBlock( std::list< Statement * > &kids );
    8577        };
    8678} // namespace ControlStruct
Note: See TracChangeset for help on using the changeset viewer.