Changeset 33218c6 for src/SynTree


Ignore:
Timestamp:
Jul 26, 2017, 12:19:41 PM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SynTree
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AddStmtVisitor.h

    re0a653d r33218c6  
    1010// Created On       : Wed Jun 22 12:05:48 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 12 17:50:32 2016
    13 // Update Count     : 8
     12// Last Modified On : Sat Jul 22 09:51:08 2017
     13// Update Count     : 9
    1414//
    1515
    16 #ifndef ADD_STATEMENT_VISITOR_H
    17 #define ADD_STATEMENT_VISITOR_H
     16#pragma once
    1817
    1918#include <list>
     
    4241};
    4342
    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  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 18 16:27:11 2017
    13 // Update Count     : 38
     12// Last Modified On : Sat Jul 22 09:54:14 2017
     13// Update Count     : 39
    1414//
    1515
    16 #ifndef GCC_ATTRIBUTE_H
    17 #define GCC_ATTRIBUTE_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    4241const std::list< Attribute * > noAttributes;
    4342
    44 #endif
    45 
    4643// Local Variables: //
    4744// tab-width: 4 //
  • src/SynTree/BaseSyntaxNode.h

    re0a653d r33218c6  
    1414//
    1515
    16 #ifndef BASE_SYNTAX_NODE_H
    17 #define BASE_SYNTAX_NODE_H
     16#pragma once
    1817
    1918#include "Common/utility.h"
     
    2928};
    3029
    31 #endif // BASE_SYNTAX_NODE_H
    32 
    3330// Local Variables: //
    3431// tab-width: 4 //
  • src/SynTree/Constant.cc

    re0a653d r33218c6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 22 10:11:00 2017
    13 // Update Count     : 28
     12// Last Modified On : Fri Jul 14 14:50:00 2017
     13// Update Count     : 29
    1414//
    1515
     
    4646}
    4747
     48Constant 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
    4859unsigned long long Constant::get_ival() const {
    4960        assertf( safe_dynamic_cast<BasicType*>(type)->isInteger(), "Attempt to retrieve ival from non-integer constant." );
  • src/SynTree/Constant.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 22 10:13:00 2017
    13 // Update Count     : 15
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:54:46 2017
     13// Update Count     : 17
    1414//
    1515
    16 #ifndef CONSTANT_H
    17 #define CONSTANT_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    4443        static Constant from_double( double d );
    4544
     45        /// generates a null pointer value for the given type. void * if omitted.
     46        static Constant null( Type * ptrtype = nullptr );
     47
    4648        virtual void accept( Visitor & v ) { v.visit( this ); }
    4749        virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); }
     
    5860};
    5961
    60 #endif // CONSTANT_H
    61 
    6262// Local Variables: //
    6363// tab-width: 4 //
  • src/SynTree/Declaration.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// 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
    1817
    1918#include <string>
     
    266265        typedef AggregateDecl Parent;
    267266  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 : "" ) {}
    269269        StructDecl( const StructDecl &other ) : Parent( other ) {}
    270270
     
    273273        bool is_thread() { return kind == DeclarationNode::Thread; }
    274274
     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
    275281        virtual StructDecl *clone() const { return new StructDecl( *this ); }
    276282        virtual void accept( Visitor &v ) { v.visit( this ); }
     
    279285        DeclarationNode::Aggregate kind;
    280286        virtual std::string typeString() const;
     287
     288        bool tagged;
     289        std::string parent_name;
    281290};
    282291
     
    342351std::ostream & operator<<( std::ostream & out, const Declaration * decl );
    343352std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data );
    344 
    345 #endif // DECLARATION_H
    346353
    347354// Local Variables: //
  • src/SynTree/Expression.h

    re0a653d r33218c6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 30 16:44:00 2017
    13 // Update Count     : 41
     12// Last Modified On : Sat Jul 22 09:53:16 2017
     13// Update Count     : 42
    1414//
    1515
    16 #ifndef EXPRESSION_H
    17 #define EXPRESSION_H
     16#pragma once
    1817
    1918#include <map>
     
    798797std::ostream & operator<<( std::ostream & out, const Expression * expr );
    799798
    800 #endif // EXPRESSION_H
    801 
    802799// Local Variables: //
    803800// tab-width: 4 //
  • src/SynTree/Initializer.h

    re0a653d r33218c6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 23 16:12:42 2017
    13 // Update Count     : 20
     12// Last Modified On : Sat Jul 22 09:52:02 2017
     13// Update Count     : 21
    1414//
    1515
    16 #ifndef INITIALIZER_H
    17 #define INITIALIZER_H
     16#pragma once
    1817
    1918#include <cassert>
     
    141140std::ostream & operator<<( std::ostream & out, const Designation * des );
    142141
    143 #endif // INITIALIZER_H
    144 
    145142// Local Variables: //
    146143// tab-width: 4 //
  • src/SynTree/Label.h

    re0a653d r33218c6  
    1010// Created On       : Wed Jun 8 12:53:12 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug  7 14:44:29 2016
    13 // Update Count     : 2
     12// Last Modified On : Sat Jul 22 09:52:44 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef LABEL_H
    17 #define LABEL_H
     16#pragma once
    1817
    1918#include <string>
     
    5150static const std::list< Label > noLabels;
    5251
    53 #endif // LABEL_H
    54 
    5552// Local Variables: //
    5653// tab-width: 4 //
  • src/SynTree/Mutator.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 15:45:00 2017
    13 // Update Count     : 14
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:51:30 2017
     13// Update Count     : 15
    1414//
    1515#include <cassert>
     
    1818#include "Common/SemanticError.h"
    1919
    20 #ifndef MUTATOR_H
    21 #define MUTATOR_H
     20#pragma once
    2221
    2322class Mutator {
     
    150149}
    151150
    152 #endif // MUTATOR_H
    153 
    154151// Local Variables: //
    155152// tab-width: 4 //
  • src/SynTree/Statement.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 12 13:35:00 2017
    13 // Update Count     : 67
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:54:32 2017
     13// Update Count     : 68
    1414//
    1515
    16 #ifndef STATEMENT_H
    17 #define STATEMENT_H
     16#pragma once
    1817
    1918#include "BaseSyntaxNode.h"
     
    428427std::ostream & operator<<( std::ostream & out, const Statement * statement );
    429428
    430 #endif // STATEMENT_H
    431 
    432429// Local Variables: //
    433430// tab-width: 4 //
  • src/SynTree/SynTree.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Jun  8 17:00:00 2017
    13 // Update Count     : 9
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:51:46 2017
     13// Update Count     : 10
    1414//
    1515
    16 #ifndef SYNTREE_H
    17 #define SYNTREE_H
     16#pragma once
    1817
    1918#include <string>
     
    135134class Attribute;
    136135
    137 #endif // SYNTREE_H
    138 
    139136// Local Variables: //
    140137// tab-width: 4 //
  • src/SynTree/Type.h

    re0a653d r33218c6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 23 16:16:36 2017
    13 // Update Count     : 149
     12// Last Modified On : Sat Jul 22 09:53:29 2017
     13// Update Count     : 151
    1414//
    1515
    16 #ifndef TYPE_H
    17 #define TYPE_H
     16#pragma once
    1817
    1918#include "BaseSyntaxNode.h"
     
    172171};
    173172
    174 extern Type::Qualifiers emptyQualifiers;                                // no qualifiers on constants
     173extern Type::Qualifiers noQualifiers;                           // no qualifiers on constants
    175174
    176175class VoidType : public Type {
     
    602601std::ostream & operator<<( std::ostream & out, const Type * type );
    603602
    604 #endif // TYPE_H
    605 
    606603// Local Variables: //
    607604// tab-width: 4 //
  • src/SynTree/TypeSubstitution.h

    re0a653d r33218c6  
    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 : Fri Apr 29 15:00:20 2016
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:52:24 2017
     13// Update Count     : 3
    1414//
    1515
    16 #ifndef TYPESUBSTITUTION_H
    17 #define TYPESUBSTITUTION_H
     16#pragma once
    1817
    1918#include <map>
     
    180179std::ostream & operator<<( std::ostream & out, const TypeSubstitution & sub );
    181180
    182 #endif // TYPESUBSTITUTION_H
    183 
    184181// Local Variables: //
    185182// tab-width: 4 //
  • src/SynTree/VarExprReplacer.h

    re0a653d r33218c6  
    99// Author           : Rob Schluntz
    1010// Created On       : Wed Jan 13 16:29:30 2016
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Fri May 13 11:27:52 2016
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:53:41 2017
     13// Update Count     : 6
    1414//
    1515
    16 #ifndef VAR_EXPR_REPLACER_H
    17 #define VAR_EXPR_REPLACER_H
     16#pragma once
    1817
    1918#include <map>
     
    3534};
    3635
    37 #endif // VAR_EXPR_REPLACER_H
    38 
    3936// Local Variables: //
    4037// tab-width: 4 //
  • src/SynTree/Visitor.h

    re0a653d r33218c6  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Jun 08 15:45:00 2017
    13 // Update Count     : 11
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat Jul 22 09:54:04 2017
     13// Update Count     : 12
    1414//
    1515
    16 #ifndef VISITOR_H
    17 #define VISITOR_H
     16#pragma once
    1817
    1918#include "SynTree.h"
     
    174173}
    175174
    176 #endif // VISITOR_H
    177 
    178175// Local Variables: //
    179176// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.