Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r630a82a r4ffdd63  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr  8 17:18:06 2016
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed Apr 27 17:06:49 2016
    1313// Update Count     : 21
    1414//
     
    2222#include "Mutator.h"
    2323#include "Constant.h"
     24#include "Common/UniqueName.h"
    2425
    2526/// Expression is the root type for all expressions
     
    362363};
    363364
     365/// Expression representing a pack of field-offsets for a generic type
     366class OffsetPackExpr : public Expression {
     367public:
     368        OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 );
     369        OffsetPackExpr( const OffsetPackExpr &other );
     370        virtual ~OffsetPackExpr();
     371
     372        StructInstType *get_type() const { return type; }
     373        void set_type( StructInstType *newValue ) { type = newValue; }
     374
     375        virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); }
     376        virtual void accept( Visitor &v ) { v.visit( this ); }
     377        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     378
     379        virtual void print( std::ostream &os, int indent = 0 ) const;
     380
     381private:
     382        StructInstType *type;
     383};
     384
    364385/// AttrExpr represents an @attribute expression (like sizeof, but user-defined)
    365386class AttrExpr : public Expression {
     
    539560};
    540561
     562/// ImplicitCopyCtorExpr represents the application of a function to a set of parameters,
     563/// along with a set of copy constructor calls, one for each argument.
     564class ImplicitCopyCtorExpr : public Expression {
     565public:
     566        ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
     567        ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
     568        virtual ~ImplicitCopyCtorExpr();
     569
     570        ApplicationExpr *get_callExpr() const { return callExpr; }
     571        void set_callExpr( ApplicationExpr *newValue ) { callExpr = newValue; }
     572
     573        std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
     574        void set_tempDecls( std::list< ObjectDecl * > newValue ) { tempDecls = newValue; }
     575
     576        std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
     577        void set_returnDecls( std::list< ObjectDecl * > newValue ) { returnDecls = newValue; }
     578
     579        std::list< Expression * > & get_dtors() { return dtors; }
     580        void set_dtors( std::list< Expression * > newValue ) { dtors = newValue; }
     581
     582        virtual ImplicitCopyCtorExpr *clone() const { return new ImplicitCopyCtorExpr( *this ); }
     583        virtual void accept( Visitor &v ) { v.visit( this ); }
     584        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     585        virtual void print( std::ostream &os, int indent = 0 ) const;
     586  private:
     587        ApplicationExpr * callExpr;
     588        std::list< ObjectDecl * > tempDecls;
     589        std::list< ObjectDecl * > returnDecls;
     590        std::list< Expression * > dtors;
     591};
     592
    541593/// ValofExpr represents a GCC 'lambda expression'
    542594class UntypedValofExpr : public Expression {
Note: See TracChangeset for help on using the changeset viewer.