Changeset e612146c for src/SynTree
- Timestamp:
- Sep 3, 2017, 11:30:57 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 3f8dd01
- Parents:
- f43df73
- Location:
- src/SynTree
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rf43df73 re612146c 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Mon Aug 14 10:15:00201713 // Update Count : 1 2811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Sep 3 19:24:06 2017 13 // Update Count : 131 14 14 // 15 15 … … 82 82 int scopeLevel = 0; 83 83 84 ConstantExpr*asmName;84 Expression *asmName; 85 85 std::list< Attribute * > attributes; 86 86 … … 97 97 DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; } 98 98 99 ConstantExpr*get_asmName() const { return asmName; }100 DeclarationWithType * set_asmName( ConstantExpr*newValue ) { asmName = newValue; return this; }99 Expression *get_asmName() const { return asmName; } 100 DeclarationWithType * set_asmName( Expression *newValue ) { asmName = newValue; return this; } 101 101 102 102 std::list< Attribute * >& get_attributes() { return attributes; } -
src/SynTree/Expression.h
rf43df73 re612146c 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Aug 8 11:54:00201713 // Update Count : 4 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Sep 3 19:23:46 2017 13 // Update Count : 48 14 14 // 15 15 16 #pragma once 16 17 … … 539 540 public: 540 541 Expression * inout; 541 ConstantExpr* constraint;542 Expression * constraint; 542 543 Expression * operand; 543 544 544 AsmExpr( Expression * inout, ConstantExpr* constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}545 AsmExpr( Expression * inout, Expression * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {} 545 546 AsmExpr( const AsmExpr & other ); 546 547 virtual ~AsmExpr() { delete inout; delete constraint; delete operand; }; … … 549 550 void set_inout( Expression * newValue ) { inout = newValue; } 550 551 551 ConstantExpr* get_constraint() const { return constraint; }552 void set_constraint( ConstantExpr* newValue ) { constraint = newValue; }552 Expression * get_constraint() const { return constraint; } 553 void set_constraint( Expression * newValue ) { constraint = newValue; } 553 554 554 555 Expression * get_operand() const { return operand; } -
src/SynTree/Statement.cc
rf43df73 re612146c 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 17 16:17:20201713 // Update Count : 6 712 // Last Modified On : Sun Sep 3 20:46:44 2017 13 // Update Count : 68 14 14 // 15 15 … … 52 52 53 53 54 AsmStmt::AsmStmt( std::list<Label> labels, bool voltile, ConstantExpr*instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ) : Statement( labels ), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ), gotolabels( gotolabels ) {}54 AsmStmt::AsmStmt( std::list<Label> labels, bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ) : Statement( labels ), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ), gotolabels( gotolabels ) {} 55 55 56 56 AsmStmt::AsmStmt( const AsmStmt & other ) : Statement( other ), voltile( other.voltile ), instruction( maybeClone( other.instruction ) ), gotolabels( other.gotolabels ) { -
src/SynTree/Statement.h
rf43df73 re612146c 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 17 15:37:53201713 // Update Count : 7 212 // Last Modified On : Sun Sep 3 20:46:46 2017 13 // Update Count : 77 14 14 // 15 15 … … 98 98 public: 99 99 bool voltile; 100 ConstantExpr*instruction;100 Expression *instruction; 101 101 std::list<Expression *> output, input; 102 102 std::list<ConstantExpr *> clobber; 103 103 std::list<Label> gotolabels; 104 104 105 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 );105 AsmStmt( std::list<Label> labels, bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ); 106 106 AsmStmt( const AsmStmt &other ); 107 107 virtual ~AsmStmt(); … … 109 109 bool get_voltile() { return voltile; } 110 110 void set_voltile( bool newValue ) { voltile = newValue; } 111 ConstantExpr *get_instruction() { return instruction; }112 void set_instruction( ConstantExpr *newValue ) { instruction = newValue; }113 std::list<Expression *> & get_output() { return output; }114 void set_output( const std::list<Expression *> & newValue ) { output = newValue; }115 std::list<Expression *> & get_input() { return input; }111 Expression * get_instruction() { return instruction; } 112 void set_instruction( Expression * newValue ) { instruction = newValue; } 113 std::list<Expression *> & get_output() { return output; } 114 void set_output( const std::list<Expression *> & newValue ) { output = newValue; } 115 std::list<Expression *> & get_input() { return input; } 116 116 void set_input( const std::list<Expression *> &newValue ) { input = newValue; } 117 std::list<ConstantExpr *> & get_clobber() { return clobber; }117 std::list<ConstantExpr *> & get_clobber() { return clobber; } 118 118 void set_clobber( const std::list<ConstantExpr *> &newValue ) { clobber = newValue; } 119 std::list<Label> & get_gotolabels() { return gotolabels; }119 std::list<Label> & get_gotolabels() { return gotolabels; } 120 120 void set_gotolabels( const std::list<Label> &newValue ) { gotolabels = newValue; } 121 121 122 virtual AsmStmt * clone() const { return new AsmStmt( *this ); }123 virtual void accept( Visitor & v ) { v.visit( this ); }124 virtual Statement * acceptMutator( Mutator &m ) { return m.mutate( this ); }125 virtual void print( std::ostream & os, int indent = 0 ) const;122 virtual AsmStmt * clone() const { return new AsmStmt( *this ); } 123 virtual void accept( Visitor & v ) { v.visit( this ); } 124 virtual Statement * acceptMutator( Mutator & m ) { return m.mutate( this ); } 125 virtual void print( std::ostream & os, int indent = 0 ) const; 126 126 }; 127 127
Note: See TracChangeset
for help on using the changeset viewer.