Ignore:
Timestamp:
Jul 30, 2015, 3:56:18 PM (9 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:
093f1a0
Parents:
51b986f
Message:

asm statement, memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.h

    r51b986f r7f5566b  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jul 14 12:14:54 2015
    13 // Update Count     : 24
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 25 18:25:37 2015
     13// Update Count     : 44
    1414//
    1515
     
    7070};
    7171
     72class AsmStmt : public Statement {
     73  public:
     74        AsmStmt( std::list<Label> labels, bool voltile, ConstantExpr *instruction, std::list<Expression *> input, std::list<Expression *> output, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
     75        virtual ~AsmStmt();
     76
     77        bool get_voltile() { return voltile; }
     78        void set_voltile( bool newValue ) { voltile = newValue; }
     79        ConstantExpr *get_instruction() { return instruction; }
     80        void set_instruction( ConstantExpr *newValue ) { instruction = newValue; }
     81        std::list<Expression *> &get_output() { return output; }
     82        void set_output( const std::list<Expression *> &newValue ) { output = newValue; }
     83        std::list<Expression *> &get_input() { return input; }
     84        void set_input( const std::list<Expression *> &newValue ) { input = newValue; }
     85        std::list<ConstantExpr *> &get_clobber() { return clobber; }
     86        void set_clobber( const std::list<ConstantExpr *> &newValue ) { clobber = newValue; }
     87        std::list<Label> &get_gotolabels() { return gotolabels; }
     88        void set_gotolabels( const std::list<Label> &newValue ) { gotolabels = newValue; }
     89
     90        virtual AsmStmt *clone() const { return new AsmStmt( *this ); }
     91        virtual void accept( Visitor &v ) { v.visit( this ); }
     92        virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     93        virtual void print( std::ostream &os, int indent = 0 ) const;
     94  private:
     95        bool voltile;
     96        ConstantExpr *instruction;
     97        std::list<Expression *> output, input;
     98        std::list<ConstantExpr *> clobber;
     99        std::list<Label> gotolabels;
     100};
     101
    72102class IfStmt : public Statement {
    73103  public:
     
    100130        void set_condition( Expression *newValue ) { condition = newValue; }
    101131
    102         std::list<Statement *>& get_branches() { return branches; }
     132        std::list<Statement *> & get_branches() { return branches; }
    103133        void add_case( CaseStmt * );
    104134
Note: See TracChangeset for help on using the changeset viewer.