Changeset 33218c6 for src/SynTree
- Timestamp:
- Jul 26, 2017, 12:19:41 PM (9 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, stuck-waitfor-destruct, with_gc
- Children:
- b947fb2
- Parents:
- e0a653d (diff), ea91c42 (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. - Location:
- src/SynTree
- Files:
-
- 16 edited
-
AddStmtVisitor.h (modified) (2 diffs)
-
Attribute.h (modified) (2 diffs)
-
BaseSyntaxNode.h (modified) (2 diffs)
-
Constant.cc (modified) (2 diffs)
-
Constant.h (modified) (3 diffs)
-
Declaration.h (modified) (5 diffs)
-
Expression.h (modified) (2 diffs)
-
Initializer.h (modified) (2 diffs)
-
Label.h (modified) (2 diffs)
-
Mutator.h (modified) (3 diffs)
-
Statement.h (modified) (2 diffs)
-
SynTree.h (modified) (2 diffs)
-
Type.h (modified) (3 diffs)
-
TypeSubstitution.h (modified) (2 diffs)
-
VarExprReplacer.h (modified) (2 diffs)
-
Visitor.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AddStmtVisitor.h
re0a653d r33218c6 10 10 // Created On : Wed Jun 22 12:05:48 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:50:32 201613 // Update Count : 812 // Last Modified On : Sat Jul 22 09:51:08 2017 13 // Update Count : 9 14 14 // 15 15 16 #ifndef ADD_STATEMENT_VISITOR_H 17 #define ADD_STATEMENT_VISITOR_H 16 #pragma once 18 17 19 18 #include <list> … … 42 41 }; 43 42 44 #endif // ADD_STATEMENT_VISITOR_H 43 // Local Variables: // 44 // tab-width: 4 // 45 // mode: c++ // 46 // compile-command: "make install" // 47 // End: // -
src/SynTree/Attribute.h
re0a653d r33218c6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jan 18 16:27:11201713 // Update Count : 3 812 // Last Modified On : Sat Jul 22 09:54:14 2017 13 // Update Count : 39 14 14 // 15 15 16 #ifndef GCC_ATTRIBUTE_H 17 #define GCC_ATTRIBUTE_H 16 #pragma once 18 17 19 18 #include "SynTree.h" … … 42 41 const std::list< Attribute * > noAttributes; 43 42 44 #endif45 46 43 // Local Variables: // 47 44 // tab-width: 4 // -
src/SynTree/BaseSyntaxNode.h
re0a653d r33218c6 14 14 // 15 15 16 #ifndef BASE_SYNTAX_NODE_H 17 #define BASE_SYNTAX_NODE_H 16 #pragma once 18 17 19 18 #include "Common/utility.h" … … 29 28 }; 30 29 31 #endif // BASE_SYNTAX_NODE_H32 33 30 // Local Variables: // 34 31 // tab-width: 4 // -
src/SynTree/Constant.cc
re0a653d r33218c6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Jun 22 10:11:00 201713 // Update Count : 2 812 // Last Modified On : Fri Jul 14 14:50:00 2017 13 // Update Count : 29 14 14 // 15 15 … … 46 46 } 47 47 48 Constant Constant::null( Type * ptrtype ) { 49 if ( nullptr == ptrtype ) { 50 ptrtype = new PointerType( 51 Type::Qualifiers(), 52 new VoidType( Type::Qualifiers() ) 53 ); 54 } 55 56 return Constant( ptrtype, "0", (unsigned long long int)0 ); 57 } 58 48 59 unsigned long long Constant::get_ival() const { 49 60 assertf( safe_dynamic_cast<BasicType*>(type)->isInteger(), "Attempt to retrieve ival from non-integer constant." ); -
src/SynTree/Constant.h
re0a653d r33218c6 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 : Thr Jun 22 10:13:00201713 // Update Count : 1 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:54:46 2017 13 // Update Count : 17 14 14 // 15 15 16 #ifndef CONSTANT_H 17 #define CONSTANT_H 16 #pragma once 18 17 19 18 #include "SynTree.h" … … 44 43 static Constant from_double( double d ); 45 44 45 /// generates a null pointer value for the given type. void * if omitted. 46 static Constant null( Type * ptrtype = nullptr ); 47 46 48 virtual void accept( Visitor & v ) { v.visit( this ); } 47 49 virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); } … … 58 60 }; 59 61 60 #endif // CONSTANT_H61 62 62 // Local Variables: // 63 63 // tab-width: 4 // -
src/SynTree/Declaration.h
re0a653d r33218c6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jun 27 15:31:00 2017 13 // Update Count : 122 14 // 15 16 #ifndef DECLARATION_H 17 #define DECLARATION_H 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:52:59 2017 13 // Update Count : 124 14 // 15 16 #pragma once 18 17 19 18 #include <string> … … 266 265 typedef AggregateDecl Parent; 267 266 public: 268 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ) {} 267 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ), tagged( false ), parent_name( "" ) {} 268 StructDecl( const std::string &name, const std::string *parent, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( DeclarationNode::Struct ), tagged( true ), parent_name( parent ? *parent : "" ) {} 269 269 StructDecl( const StructDecl &other ) : Parent( other ) {} 270 270 … … 273 273 bool is_thread() { return kind == DeclarationNode::Thread; } 274 274 275 // Tagged/Tree Structure Excetion 276 bool get_tagged() { return tagged; } 277 void set_tagged( bool newValue ) { tagged = newValue; } 278 bool has_parent() { return parent_name != ""; } 279 std::string get_parentName() { return parent_name; } 280 275 281 virtual StructDecl *clone() const { return new StructDecl( *this ); } 276 282 virtual void accept( Visitor &v ) { v.visit( this ); } … … 279 285 DeclarationNode::Aggregate kind; 280 286 virtual std::string typeString() const; 287 288 bool tagged; 289 std::string parent_name; 281 290 }; 282 291 … … 342 351 std::ostream & operator<<( std::ostream & out, const Declaration * decl ); 343 352 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ); 344 345 #endif // DECLARATION_H346 353 347 354 // Local Variables: // -
src/SynTree/Expression.h
re0a653d r33218c6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 30 16:44:00201713 // Update Count : 4 112 // Last Modified On : Sat Jul 22 09:53:16 2017 13 // Update Count : 42 14 14 // 15 15 16 #ifndef EXPRESSION_H 17 #define EXPRESSION_H 16 #pragma once 18 17 19 18 #include <map> … … 798 797 std::ostream & operator<<( std::ostream & out, const Expression * expr ); 799 798 800 #endif // EXPRESSION_H801 802 799 // Local Variables: // 803 800 // tab-width: 4 // -
src/SynTree/Initializer.h
re0a653d r33218c6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 23 16:12:42 201713 // Update Count : 2 012 // Last Modified On : Sat Jul 22 09:52:02 2017 13 // Update Count : 21 14 14 // 15 15 16 #ifndef INITIALIZER_H 17 #define INITIALIZER_H 16 #pragma once 18 17 19 18 #include <cassert> … … 141 140 std::ostream & operator<<( std::ostream & out, const Designation * des ); 142 141 143 #endif // INITIALIZER_H144 145 142 // Local Variables: // 146 143 // tab-width: 4 // -
src/SynTree/Label.h
re0a653d r33218c6 10 10 // Created On : Wed Jun 8 12:53:12 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S un Aug 7 14:44:29 201613 // Update Count : 212 // Last Modified On : Sat Jul 22 09:52:44 2017 13 // Update Count : 3 14 14 // 15 15 16 #ifndef LABEL_H 17 #define LABEL_H 16 #pragma once 18 17 19 18 #include <string> … … 51 50 static const std::list< Label > noLabels; 52 51 53 #endif // LABEL_H54 55 52 // Local Variables: // 56 53 // tab-width: 4 // -
src/SynTree/Mutator.h
re0a653d r33218c6 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 : Thu Jun 8 15:45:00 201713 // Update Count : 1 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:51:30 2017 13 // Update Count : 15 14 14 // 15 15 #include <cassert> … … 18 18 #include "Common/SemanticError.h" 19 19 20 #ifndef MUTATOR_H 21 #define MUTATOR_H 20 #pragma once 22 21 23 22 class Mutator { … … 150 149 } 151 150 152 #endif // MUTATOR_H153 154 151 // Local Variables: // 155 152 // tab-width: 4 // -
src/SynTree/Statement.h
re0a653d r33218c6 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 Jun 12 13:35:00201713 // Update Count : 6 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:54:32 2017 13 // Update Count : 68 14 14 // 15 15 16 #ifndef STATEMENT_H 17 #define STATEMENT_H 16 #pragma once 18 17 19 18 #include "BaseSyntaxNode.h" … … 428 427 std::ostream & operator<<( std::ostream & out, const Statement * statement ); 429 428 430 #endif // STATEMENT_H431 432 429 // Local Variables: // 433 430 // tab-width: 4 // -
src/SynTree/SynTree.h
re0a653d r33218c6 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 : Thu Jun 8 17:00:00201713 // Update Count : 911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:51:46 2017 13 // Update Count : 10 14 14 // 15 15 16 #ifndef SYNTREE_H 17 #define SYNTREE_H 16 #pragma once 18 17 19 18 #include <string> … … 135 134 class Attribute; 136 135 137 #endif // SYNTREE_H138 139 136 // Local Variables: // 140 137 // tab-width: 4 // -
src/SynTree/Type.h
re0a653d r33218c6 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 23 16:16:36201713 // Update Count : 1 4912 // Last Modified On : Sat Jul 22 09:53:29 2017 13 // Update Count : 151 14 14 // 15 15 16 #ifndef TYPE_H 17 #define TYPE_H 16 #pragma once 18 17 19 18 #include "BaseSyntaxNode.h" … … 172 171 }; 173 172 174 extern Type::Qualifiers emptyQualifiers; // no qualifiers on constants173 extern Type::Qualifiers noQualifiers; // no qualifiers on constants 175 174 176 175 class VoidType : public Type { … … 602 601 std::ostream & operator<<( std::ostream & out, const Type * type ); 603 602 604 #endif // TYPE_H605 606 603 // Local Variables: // 607 604 // tab-width: 4 // -
src/SynTree/TypeSubstitution.h
re0a653d r33218c6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri Apr 29 15:00:20 201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:52:24 2017 13 // Update Count : 3 14 14 // 15 15 16 #ifndef TYPESUBSTITUTION_H 17 #define TYPESUBSTITUTION_H 16 #pragma once 18 17 19 18 #include <map> … … 180 179 std::ostream & operator<<( std::ostream & out, const TypeSubstitution & sub ); 181 180 182 #endif // TYPESUBSTITUTION_H183 184 181 // Local Variables: // 185 182 // tab-width: 4 // -
src/SynTree/VarExprReplacer.h
re0a653d r33218c6 9 9 // Author : Rob Schluntz 10 10 // Created On : Wed Jan 13 16:29:30 2016 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri May 13 11:27:52 201613 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:53:41 2017 13 // Update Count : 6 14 14 // 15 15 16 #ifndef VAR_EXPR_REPLACER_H 17 #define VAR_EXPR_REPLACER_H 16 #pragma once 18 17 19 18 #include <map> … … 35 34 }; 36 35 37 #endif // VAR_EXPR_REPLACER_H38 39 36 // Local Variables: // 40 37 // tab-width: 4 // -
src/SynTree/Visitor.h
re0a653d r33218c6 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 : Thr Jun 08 15:45:00201713 // Update Count : 1 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 22 09:54:04 2017 13 // Update Count : 12 14 14 // 15 15 16 #ifndef VISITOR_H 17 #define VISITOR_H 16 #pragma once 18 17 19 18 #include "SynTree.h" … … 174 173 } 175 174 176 #endif // VISITOR_H177 178 175 // Local Variables: // 179 176 // tab-width: 4 //
Note:
See TracChangeset
for help on using the changeset viewer.