Ignore:
Timestamp:
Apr 15, 2016, 12:03:11 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, with_gc
Children:
29ad0ac
Parents:
c5833e8 (diff), 37f0da8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into gc_noraii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rc5833e8 r0f9e4403  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Expression.h -- 
     7// Expression.h --
    88//
    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 : Wed Dec 09 14:10:21 2015
    13 // Update Count     : 19
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Apr  8 17:18:06 2016
     13// Update Count     : 21
    1414//
    1515
     
    155155};
    156156
     157// xxx - this doesn't appear to actually be hooked in anywhere. We should use this instead of the "&&"" UntypedExpr hack
    157158class LabelAddressExpr : public Expression {
    158159  public:
    159160        LabelAddressExpr( Expression *arg );
    160         LabelAddressExpr( const AddressExpr &other );
     161        LabelAddressExpr( const LabelAddressExpr &other );
    161162        virtual ~LabelAddressExpr();
    162163
     
    251252};
    252253
    253 /// ConstantExpr represents an expression that simply refers to the value of a constant 
     254/// ConstantExpr represents an expression that simply refers to the value of a constant
    254255class ConstantExpr : public Expression {
    255256  public:
     
    359360        Type *type;
    360361        DeclarationWithType *member;
     362};
     363
     364/// Expression representing a pack of field-offsets for a generic type
     365class OffsetPackExpr : public Expression {
     366public:
     367        OffsetPackExpr( StructInstType *type_, Expression *aname_ = 0 );
     368        OffsetPackExpr( const OffsetPackExpr &other );
     369        virtual ~OffsetPackExpr();
     370
     371        StructInstType *get_type() const { return type; }
     372        void set_type( StructInstType *newValue ) { type = newValue; }
     373
     374        virtual OffsetPackExpr *clone() const { return new OffsetPackExpr( *this ); }
     375        virtual void accept( Visitor &v ) { v.visit( this ); }
     376        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     377
     378        virtual void print( std::ostream &os, int indent = 0 ) const;
     379
     380private:
     381        StructInstType *type;
    361382};
    362383
     
    515536  public:
    516537        AsmExpr( Expression *inout, ConstantExpr *constraint, Expression *operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
     538        AsmExpr( const AsmExpr & other );
    517539        virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };
    518540
     
    541563  public:
    542564        UntypedValofExpr( Statement *_body, Expression *_aname = 0 ) : Expression( _aname ), body ( _body ) {}
    543         virtual ~UntypedValofExpr() {}
     565        UntypedValofExpr( const UntypedValofExpr & other );
     566        virtual ~UntypedValofExpr();
    544567
    545568        Expression *get_value();
     
    552575  private:
    553576        Statement *body;
     577};
     578
     579/// CompoundLiteralExpr represents a C99 'compound literal'
     580class CompoundLiteralExpr : public Expression {
     581  public:
     582        CompoundLiteralExpr( Type * type, Initializer * initializer );
     583        CompoundLiteralExpr( const CompoundLiteralExpr &other );
     584        ~CompoundLiteralExpr();
     585
     586        Type * get_type() const { return type; }
     587        void set_type( Type * t ) { type = t; }
     588
     589        Initializer * get_initializer() const { return initializer; }
     590        void set_initializer( Initializer * i ) { initializer = i; }
     591
     592        virtual CompoundLiteralExpr *clone() const { return new CompoundLiteralExpr( *this ); }
     593        virtual void accept( Visitor &v ) { v.visit( this ); }
     594        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     595        virtual void print( std::ostream &os, int indent = 0 ) const;
     596  private:
     597        Type * type;
     598        Initializer * initializer;
    554599};
    555600
Note: See TracChangeset for help on using the changeset viewer.