Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    r5f2f2d7 r7f5566b  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jun  7 22:03:44 2015
    13 // Update Count     : 4
     12// Last Modified On : Fri Jul 24 13:49:28 2015
     13// Update Count     : 18
    1414//
    1515
     
    3030
    3131        std::list<Type *>& get_results() { return results; }
    32         void add_result(Type *t);
     32        void add_result( Type *t );
    3333
    3434        TypeSubstitution *get_env() const { return env; }
     
    446446};
    447447
     448// AsmExpr represents a GCC 'asm constraint operand' used in an asm statement: [output] "=f" (result)
     449class AsmExpr : public Expression {
     450  public:
     451        AsmExpr( Expression *inout, ConstantExpr *constraint, Expression *operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
     452        virtual ~AsmExpr() { delete inout; delete constraint; delete operand; };
     453
     454        Expression *get_inout() const { return inout; }
     455        void set_inout( Expression *newValue ) { inout = newValue; }
     456
     457        ConstantExpr *get_constraint() const { return constraint; }
     458        void set_constraint( ConstantExpr *newValue ) { constraint = newValue; }
     459
     460        Expression *get_operand() const { return operand; }
     461        void set_operand( Expression *newValue ) { operand = newValue; }
     462
     463        virtual AsmExpr *clone() const { return new AsmExpr( *this ); }
     464        virtual void accept( Visitor &v ) { v.visit( this ); }
     465        virtual Expression *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     466        virtual void print( std::ostream &os, int indent = 0 ) const;
     467  private:
     468        // https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Machine-Constraints.html#Machine-Constraints
     469        Expression *inout;
     470        ConstantExpr *constraint;
     471        Expression *operand;
     472};
     473
    448474// ValofExpr represents a GCC 'lambda expression'
    449475class UntypedValofExpr : public Expression {
Note: See TracChangeset for help on using the changeset viewer.