Changeset 933f32f for src/SynTree


Ignore:
Timestamp:
May 24, 2019, 10:19:41 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d908563
Parents:
6a9d4b4 (diff), 292642a (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 cleanup-dtors

Location:
src/SynTree
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AddressExpr.cc

    r6a9d4b4 r933f32f  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 23:54:44 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Apr 26 12:35:13 2016
    13 // Update Count     : 6
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Feb 28 13:13:38 2019
     13// Update Count     : 10
    1414//
    1515
     
    4747                } else {
    4848                        // taking address of non-lvalue -- must be a reference, loses one layer of reference
    49                         ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( arg->result );
    50                         set_result( addrType( refType->base ) );
     49                        if ( ReferenceType * refType = dynamic_cast< ReferenceType * >( arg->result ) ) {
     50                                set_result( addrType( refType->base ) );
     51                        } else {
     52                                SemanticError( arg->result, "Attempt to take address of non-lvalue expression: " );
     53                        } // if
    5154                }
    5255                // result of & is never an lvalue
  • src/SynTree/Attribute.cc

    r6a9d4b4 r933f32f  
    2121#include "Expression.h"      // for Expression
    2222
    23 Attribute::Attribute( const Attribute &other ) : name( other.name ) {
     23Attribute::Attribute( const Attribute &other ) : BaseSyntaxNode( other ), name( other.name ) {
    2424        cloneAll( other.parameters, parameters );
    2525}
  • src/SynTree/BaseSyntaxNode.h

    r6a9d4b4 r933f32f  
    1818#include "Common/CodeLocation.h"
    1919#include "Common/Indenter.h"
     20#include "Common/Stats.h"
     21
    2022class Visitor;
    2123class Mutator;
     
    2325class BaseSyntaxNode {
    2426  public:
     27  static Stats::Counters::SimpleCounter* new_nodes;
     28
    2529        CodeLocation location;
     30
     31  BaseSyntaxNode() { ++*new_nodes; }
     32  BaseSyntaxNode( const BaseSyntaxNode& o ) : location(o.location) { ++*new_nodes; }
    2633
    2734        virtual ~BaseSyntaxNode() {}
  • src/SynTree/BasicType.cc

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 25 14:14:03 2017
    13 // Update Count     : 11
     12// Last Modified On : Thu Jan 31 21:37:36 2019
     13// Update Count     : 12
    1414//
    1515
     
    3030
    3131bool BasicType::isInteger() const {
     32        return kind <= UnsignedInt128;
     33#if 0
    3234        switch ( kind ) {
    3335          case Bool:
     
    6365        assert( false );
    6466        return false;
     67#endif
    6568}
    6669
  • src/SynTree/Constant.cc

    r6a9d4b4 r933f32f  
    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 : Fri Spt 28 14:49:00 2018
    13 // Update Count     : 30
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Feb 13 18:11:22 2019
     13// Update Count     : 32
    1414//
    1515
     
    2525Constant::Constant( Type * type, std::string rep, double val ) : type( type ), rep( rep ), val( val ) {}
    2626
    27 Constant::Constant( const Constant &other ) : rep( other.rep ), val( other.val ) {
     27Constant::Constant( const Constant &other ) : BaseSyntaxNode( other ), rep( other.rep ), val( other.val ) {
    2828        type = other.type->clone();
    2929}
  • src/SynTree/Declaration.cc

    r6a9d4b4 r933f32f  
    3131
    3232Declaration::Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage )
    33                 : name( name ), linkage( linkage ), storageClasses( scs ), uniqueId( 0 ) {
     33                : name( name ), linkage( linkage ), uniqueId( 0 ), storageClasses( scs ) {
    3434}
    3535
    3636Declaration::Declaration( const Declaration &other )
    37         : BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), storageClasses( other.storageClasses ), uniqueId( other.uniqueId ) {
     37        : BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), uniqueId( other.uniqueId ), storageClasses( other.storageClasses ) {
    3838}
    3939
  • src/SynTree/Declaration.h

    r6a9d4b4 r933f32f  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Sep  3 19:24:06 2017
    13 // Update Count     : 131
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr May  2 10:47:00 2019
     13// Update Count     : 135
    1414//
    1515
     
    1919#include <iosfwd>                // for ostream
    2020#include <list>                  // for list
     21#include <unordered_map>         // for unordered_map
    2122#include <string>                // for string, operator+, allocator, to_string
    2223
     
    7071        static Declaration *declFromId( UniqueId id );
    7172
    72   private:
     73        UniqueId uniqueId;
    7374        Type::StorageClasses storageClasses;
    74         UniqueId uniqueId;
     75  private:
    7576};
    7677
     
    166167        CompoundStmt *get_statements() const { return statements; }
    167168        void set_statements( CompoundStmt *newValue ) { statements = newValue; }
     169        bool has_body() const { return NULL != statements; }
    168170
    169171        static FunctionDecl * newFunction( const std::string & name, FunctionType * type, CompoundStmt * statements );
     
    211213                TypeDecl::Kind kind;
    212214                bool isComplete;
     215
    213216                Data() : kind( (TypeDecl::Kind)-1 ), isComplete( false ) {}
    214217                Data( TypeDecl * typeDecl ) : Data( typeDecl->get_kind(), typeDecl->isComplete() ) {}
    215218                Data( Kind kind, bool isComplete ) : kind( kind ), isComplete( isComplete ) {}
     219                Data( const Data& d1, const Data& d2 )
     220                : kind( d1.kind ), isComplete ( d1.isComplete || d2.isComplete ) {}
     221
    216222                bool operator==(const Data & other) const { return kind == other.kind && isComplete == other.isComplete; }
    217223                bool operator!=(const Data & other) const { return !(*this == other);}
     
    239245        virtual void print( std::ostream &os, Indenter indent = {} ) const override;
    240246
    241   private:
    242247        Kind kind;
    243248};
     
    300305        virtual void accept( Visitor &v ) override { v.visit( this ); }
    301306        virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    302   private:
    303307        DeclarationNode::Aggregate kind;
     308  private:
    304309        virtual std::string typeString() const override;
    305310};
     
    330335        virtual Declaration *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    331336  private:
    332         std::map< std::string, long long int > enumValues;
     337        std::unordered_map< std::string, long long int > enumValues;
    333338        virtual std::string typeString() const override;
    334339};
  • src/SynTree/Expression.cc

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 25 14:15:47 2017
    13 // Update Count     : 54
     12// Last Modified On : Tue Feb 19 18:10:55 2019
     13// Update Count     : 60
    1414//
    1515
     
    3333#include "GenPoly/Lvalue.h"
    3434
    35 void printInferParams( const InferredParams & inferParams, std::ostream &os, Indenter indent, int level ) {
     35void printInferParams( const InferredParams & inferParams, std::ostream & os, Indenter indent, int level ) {
    3636        if ( ! inferParams.empty() ) {
    3737                os << indent << "with inferred parameters " << level << ":" << std::endl;
     
    4747Expression::Expression() : result( 0 ), env( 0 ) {}
    4848
    49 Expression::Expression( const Expression &other ) : BaseSyntaxNode( other ), result( maybeClone( other.result ) ), env( maybeClone( other.env ) ), extension( other.extension ), inferParams( other.inferParams ), resnSlots( other.resnSlots ) {}
     49Expression::Expression( const Expression & other ) : BaseSyntaxNode( other ), result( maybeClone( other.result ) ), env( maybeClone( other.env ) ), extension( other.extension ), inferParams( other.inferParams ), resnSlots( other.resnSlots ) {}
    5050
    5151void Expression::spliceInferParams( Expression * other ) {
     
    6262}
    6363
    64 void Expression::print( std::ostream &os, Indenter indent ) const {
     64void Expression::print( std::ostream & os, Indenter indent ) const {
    6565        printInferParams( inferParams, os, indent+1, 0 );
    6666
     
    7979}
    8080
    81 ConstantExpr::ConstantExpr( const ConstantExpr &other) : Expression( other ), constant( other.constant ) {
     81ConstantExpr::ConstantExpr( const ConstantExpr & other) : Expression( other ), constant( other.constant ) {
    8282}
    8383
    8484ConstantExpr::~ConstantExpr() {}
    8585
    86 void ConstantExpr::print( std::ostream &os, Indenter indent ) const {
     86void ConstantExpr::print( std::ostream & os, Indenter indent ) const {
    8787        os << "constant expression " ;
    8888        constant.print( os );
     
    124124}
    125125
    126 VariableExpr::VariableExpr( const VariableExpr &other ) : Expression( other ), var( other.var ) {
     126VariableExpr::VariableExpr( const VariableExpr & other ) : Expression( other ), var( other.var ) {
    127127}
    128128
     
    137137}
    138138
    139 void VariableExpr::print( std::ostream &os, Indenter indent ) const {
     139void VariableExpr::print( std::ostream & os, Indenter indent ) const {
    140140        os << "Variable Expression: ";
    141141        var->printShort(os, indent);
     
    143143}
    144144
    145 SizeofExpr::SizeofExpr( Expression *expr_ ) :
     145SizeofExpr::SizeofExpr( Expression * expr_ ) :
    146146                Expression(), expr(expr_), type(0), isType(false) {
    147147        set_result( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) );
    148148}
    149149
    150 SizeofExpr::SizeofExpr( Type *type_ ) :
     150SizeofExpr::SizeofExpr( Type * type_ ) :
    151151                Expression(), expr(0), type(type_), isType(true) {
    152152        set_result( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) );
    153153}
    154154
    155 SizeofExpr::SizeofExpr( const SizeofExpr &other ) :
     155SizeofExpr::SizeofExpr( const SizeofExpr & other ) :
    156156        Expression( other ), expr( maybeClone( other.expr ) ), type( maybeClone( other.type ) ), isType( other.isType ) {
    157157}
     
    162162}
    163163
    164 void SizeofExpr::print( std::ostream &os, Indenter indent) const {
     164void SizeofExpr::print( std::ostream & os, Indenter indent) const {
    165165        os << "Sizeof Expression on: ";
    166166        if (isType) type->print(os, indent+1);
     
    169169}
    170170
    171 AlignofExpr::AlignofExpr( Expression *expr_ ) :
     171AlignofExpr::AlignofExpr( Expression * expr_ ) :
    172172                Expression(), expr(expr_), type(0), isType(false) {
    173173        set_result( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) );
    174174}
    175175
    176 AlignofExpr::AlignofExpr( Type *type_ ) :
     176AlignofExpr::AlignofExpr( Type * type_ ) :
    177177                Expression(), expr(0), type(type_), isType(true) {
    178178        set_result( new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) );
    179179}
    180180
    181 AlignofExpr::AlignofExpr( const AlignofExpr &other ) :
     181AlignofExpr::AlignofExpr( const AlignofExpr & other ) :
    182182        Expression( other ), expr( maybeClone( other.expr ) ), type( maybeClone( other.type ) ), isType( other.isType ) {
    183183}
     
    188188}
    189189
    190 void AlignofExpr::print( std::ostream &os, Indenter indent) const {
     190void AlignofExpr::print( std::ostream & os, Indenter indent) const {
    191191        os << "Alignof Expression on: ";
    192192        if (isType) type->print(os, indent+1);
     
    195195}
    196196
    197 UntypedOffsetofExpr::UntypedOffsetofExpr( Type *type, const std::string &member ) :
     197UntypedOffsetofExpr::UntypedOffsetofExpr( Type * type, const std::string & member ) :
    198198                Expression(), type(type), member(member) {
    199199        assert( type );
     
    201201}
    202202
    203 UntypedOffsetofExpr::UntypedOffsetofExpr( const UntypedOffsetofExpr &other ) :
     203UntypedOffsetofExpr::UntypedOffsetofExpr( const UntypedOffsetofExpr & other ) :
    204204        Expression( other ), type( maybeClone( other.type ) ), member( other.member ) {}
    205205
     
    208208}
    209209
    210 void UntypedOffsetofExpr::print( std::ostream &os, Indenter indent) const {
     210void UntypedOffsetofExpr::print( std::ostream & os, Indenter indent) const {
    211211        os << "Untyped Offsetof Expression on member " << member << " of ";
    212212        type->print(os, indent+1);
     
    214214}
    215215
    216 OffsetofExpr::OffsetofExpr( Type *type, DeclarationWithType *member ) :
     216OffsetofExpr::OffsetofExpr( Type * type, DeclarationWithType * member ) :
    217217                Expression(), type(type), member(member) {
    218218        assert( member );
     
    221221}
    222222
    223 OffsetofExpr::OffsetofExpr( const OffsetofExpr &other ) :
     223OffsetofExpr::OffsetofExpr( const OffsetofExpr & other ) :
    224224        Expression( other ), type( maybeClone( other.type ) ), member( other.member ) {}
    225225
     
    228228}
    229229
    230 void OffsetofExpr::print( std::ostream &os, Indenter indent) const {
     230void OffsetofExpr::print( std::ostream & os, Indenter indent) const {
    231231        os << "Offsetof Expression on member " << member->name << " of ";
    232232        type->print(os, indent+1);
     
    234234}
    235235
    236 OffsetPackExpr::OffsetPackExpr( StructInstType *type ) : Expression(), type( type ) {
     236OffsetPackExpr::OffsetPackExpr( StructInstType * type ) : Expression(), type( type ) {
    237237        assert( type );
    238238        set_result( new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0, false, false ) );
    239239}
    240240
    241 OffsetPackExpr::OffsetPackExpr( const OffsetPackExpr &other ) : Expression( other ), type( maybeClone( other.type ) ) {}
     241OffsetPackExpr::OffsetPackExpr( const OffsetPackExpr & other ) : Expression( other ), type( maybeClone( other.type ) ) {}
    242242
    243243OffsetPackExpr::~OffsetPackExpr() { delete type; }
    244244
    245 void OffsetPackExpr::print( std::ostream &os, Indenter indent ) const {
     245void OffsetPackExpr::print( std::ostream & os, Indenter indent ) const {
    246246        os << "Offset pack expression on ";
    247247        type->print(os, indent+1);
     
    249249}
    250250
    251 AttrExpr::AttrExpr( Expression *attr, Expression *expr_ ) :
     251AttrExpr::AttrExpr( Expression * attr, Expression * expr_ ) :
    252252                Expression(), attr( attr ), expr(expr_), type(0), isType(false) {
    253253}
    254254
    255 AttrExpr::AttrExpr( Expression *attr, Type *type_ ) :
     255AttrExpr::AttrExpr( Expression * attr, Type * type_ ) :
    256256                Expression(), attr( attr ), expr(0), type(type_), isType(true) {
    257257}
    258258
    259 AttrExpr::AttrExpr( const AttrExpr &other ) :
     259AttrExpr::AttrExpr( const AttrExpr & other ) :
    260260                Expression( other ), attr( maybeClone( other.attr ) ), expr( maybeClone( other.expr ) ), type( maybeClone( other.type ) ), isType( other.isType ) {
    261261}
     
    267267}
    268268
    269 void AttrExpr::print( std::ostream &os, Indenter indent) const {
     269void AttrExpr::print( std::ostream & os, Indenter indent) const {
    270270        os << "Attr ";
    271271        attr->print( os, indent+1);
     
    278278}
    279279
    280 CastExpr::CastExpr( Expression *arg, Type *toType, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) {
     280CastExpr::CastExpr( Expression * arg, Type * toType, bool isGenerated ) : arg(arg), isGenerated( isGenerated ) {
    281281        set_result(toType);
    282282}
    283283
    284 CastExpr::CastExpr( Expression *arg, bool isGenerated ) : Expression(), arg(arg), isGenerated( isGenerated ) {
     284CastExpr::CastExpr( Expression * arg, bool isGenerated ) : arg(arg), isGenerated( isGenerated ) {
    285285        set_result( new VoidType( Type::Qualifiers() ) );
    286286}
    287287
    288 CastExpr::CastExpr( const CastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ), isGenerated( other.isGenerated ) {
     288CastExpr::CastExpr( const CastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), isGenerated( other.isGenerated ) {
    289289}
    290290
     
    293293}
    294294
    295 void CastExpr::print( std::ostream &os, Indenter indent ) const {
    296         os << "Cast of:" << std::endl << indent+1;
     295void CastExpr::print( std::ostream & os, Indenter indent ) const {
     296        os << (isGenerated ? "Generated " : "Explicit ") << "Cast of:" << std::endl << indent+1;
    297297        arg->print(os, indent+1);
    298298        os << std::endl << indent << "... to:";
     
    306306}
    307307
    308 KeywordCastExpr::KeywordCastExpr( Expression *arg, Target target ) : Expression(), arg(arg), target( target ) {
    309 }
    310 
    311 KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {
     308KeywordCastExpr::KeywordCastExpr( Expression * arg, Target target ) : Expression(), arg(arg), target( target ) {
     309}
     310
     311KeywordCastExpr::KeywordCastExpr( const KeywordCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ), target( other.target ) {
    312312}
    313313
     
    327327}
    328328
    329 void KeywordCastExpr::print( std::ostream &os, Indenter indent ) const {
     329void KeywordCastExpr::print( std::ostream & os, Indenter indent ) const {
    330330        os << "Keyword Cast of:" << std::endl << indent+1;
    331331        arg->print(os, indent+1);
     
    335335}
    336336
    337 VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) {
     337VirtualCastExpr::VirtualCastExpr( Expression * arg_, Type * toType ) : Expression(), arg(arg_) {
    338338        set_result(toType);
    339339}
    340340
    341 VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
     341VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr & other ) : Expression( other ), arg( maybeClone( other.arg ) ) {
    342342}
    343343
     
    346346}
    347347
    348 void VirtualCastExpr::print( std::ostream &os, Indenter indent ) const {
     348void VirtualCastExpr::print( std::ostream & os, Indenter indent ) const {
    349349        os << "Virtual Cast of:" << std::endl << indent+1;
    350350        arg->print(os, indent+1);
     
    359359}
    360360
    361 UntypedMemberExpr::UntypedMemberExpr( Expression * member, Expression *aggregate ) :
     361UntypedMemberExpr::UntypedMemberExpr( Expression * member, Expression * aggregate ) :
    362362                Expression(), member(member), aggregate(aggregate) {
    363363        assert( aggregate );
    364364}
    365365
    366 UntypedMemberExpr::UntypedMemberExpr( const UntypedMemberExpr &other ) :
     366UntypedMemberExpr::UntypedMemberExpr( const UntypedMemberExpr & other ) :
    367367                Expression( other ), member( maybeClone( other.member ) ), aggregate( maybeClone( other.aggregate ) ) {
    368368}
     
    373373}
    374374
    375 void UntypedMemberExpr::print( std::ostream &os, Indenter indent ) const {
     375void UntypedMemberExpr::print( std::ostream & os, Indenter indent ) const {
    376376        os << "Untyped Member Expression, with field: " << std::endl << indent+1;
    377377        member->print(os, indent+1 );
     
    381381}
    382382
    383 MemberExpr::MemberExpr( DeclarationWithType *member, Expression *aggregate ) :
     383MemberExpr::MemberExpr( DeclarationWithType * member, Expression * aggregate ) :
    384384                Expression(), member(member), aggregate(aggregate) {
    385385        assert( member );
     
    395395}
    396396
    397 MemberExpr::MemberExpr( const MemberExpr &other ) :
     397MemberExpr::MemberExpr( const MemberExpr & other ) :
    398398                Expression( other ), member( other.member ), aggregate( maybeClone( other.aggregate ) ) {
    399399}
     
    404404}
    405405
    406 void MemberExpr::print( std::ostream &os, Indenter indent ) const {
     406void MemberExpr::print( std::ostream & os, Indenter indent ) const {
    407407        os << "Member Expression, with field:" << std::endl;
    408408        os << indent+1;
     
    413413}
    414414
    415 UntypedExpr::UntypedExpr( Expression *function, const std::list<Expression *> &args ) :
     415UntypedExpr::UntypedExpr( Expression * function, const std::list<Expression *> & args ) :
    416416                Expression(), function(function), args(args) {}
    417417
    418 UntypedExpr::UntypedExpr( const UntypedExpr &other ) :
     418UntypedExpr::UntypedExpr( const UntypedExpr & other ) :
    419419                Expression( other ), function( maybeClone( other.function ) ) {
    420420        cloneAll( other.args, args );
     
    455455
    456456
    457 void UntypedExpr::print( std::ostream &os, Indenter indent ) const {
     457void UntypedExpr::print( std::ostream & os, Indenter indent ) const {
    458458        os << "Applying untyped:" << std::endl;
    459459        os << indent+1;
     
    469469}
    470470
    471 NameExpr::NameExpr( const NameExpr &other ) : Expression( other ), name( other.name ) {
     471NameExpr::NameExpr( const NameExpr & other ) : Expression( other ), name( other.name ) {
    472472}
    473473
    474474NameExpr::~NameExpr() {}
    475475
    476 void NameExpr::print( std::ostream &os, Indenter indent ) const {
     476void NameExpr::print( std::ostream & os, Indenter indent ) const {
    477477        os << "Name: " << get_name();
    478478        Expression::print( os, indent );
    479479}
    480480
    481 LogicalExpr::LogicalExpr( Expression *arg1_, Expression *arg2_, bool andp ) :
     481LogicalExpr::LogicalExpr( Expression * arg1_, Expression * arg2_, bool andp ) :
    482482                Expression(), arg1(arg1_), arg2(arg2_), isAnd(andp) {
    483483        set_result( new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
    484484}
    485485
    486 LogicalExpr::LogicalExpr( const LogicalExpr &other ) :
     486LogicalExpr::LogicalExpr( const LogicalExpr & other ) :
    487487                Expression( other ), arg1( maybeClone( other.arg1 ) ), arg2( maybeClone( other.arg2 ) ), isAnd( other.isAnd ) {
    488488}
     
    493493}
    494494
    495 void LogicalExpr::print( std::ostream &os, Indenter indent )const {
     495void LogicalExpr::print( std::ostream & os, Indenter indent )const {
    496496        os << "Short-circuited operation (" << (isAnd ? "and" : "or") << ") on: ";
    497497        arg1->print(os);
     
    504504                Expression(), arg1(arg1), arg2(arg2), arg3(arg3) {}
    505505
    506 ConditionalExpr::ConditionalExpr( const ConditionalExpr &other ) :
     506ConditionalExpr::ConditionalExpr( const ConditionalExpr & other ) :
    507507                Expression( other ), arg1( maybeClone( other.arg1 ) ), arg2( maybeClone( other.arg2 ) ), arg3( maybeClone( other.arg3 ) ) {
    508508}
     
    514514}
    515515
    516 void ConditionalExpr::print( std::ostream &os, Indenter indent ) const {
     516void ConditionalExpr::print( std::ostream & os, Indenter indent ) const {
    517517        os << "Conditional expression on: " << std::endl << indent+1;
    518518        arg1->print( os, indent+1 );
     
    527527
    528528
    529 void AsmExpr::print( std::ostream &os, Indenter indent ) const {
     529void AsmExpr::print( std::ostream & os, Indenter indent ) const {
    530530        os << "Asm Expression: " << std::endl;
    531531        if ( inout ) inout->print( os, indent+1 );
     
    549549}
    550550
    551 void ImplicitCopyCtorExpr::print( std::ostream &os, Indenter indent ) const {
     551void ImplicitCopyCtorExpr::print( std::ostream & os, Indenter indent ) const {
    552552        os <<  "Implicit Copy Constructor Expression: " << std::endl << indent+1;
    553553        callExpr->print( os, indent+1 );
     
    570570}
    571571
    572 void ConstructorExpr::print( std::ostream &os, Indenter indent ) const {
     572void ConstructorExpr::print( std::ostream & os, Indenter indent ) const {
    573573        os <<  "Constructor Expression: " << std::endl << indent+1;
    574574        callExpr->print( os, indent + 2 );
     
    583583}
    584584
    585 CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr &other ) : Expression( other ), initializer( other.initializer->clone() ) {}
     585CompoundLiteralExpr::CompoundLiteralExpr( const CompoundLiteralExpr & other ) : Expression( other ), initializer( other.initializer->clone() ) {}
    586586
    587587CompoundLiteralExpr::~CompoundLiteralExpr() {
     
    589589}
    590590
    591 void CompoundLiteralExpr::print( std::ostream &os, Indenter indent ) const {
     591void CompoundLiteralExpr::print( std::ostream & os, Indenter indent ) const {
    592592        os << "Compound Literal Expression: " << std::endl << indent+1;
    593593        result->print( os, indent+1 );
     
    597597}
    598598
    599 RangeExpr::RangeExpr( Expression *low, Expression *high ) : low( low ), high( high ) {}
    600 RangeExpr::RangeExpr( const RangeExpr &other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
    601 void RangeExpr::print( std::ostream &os, Indenter indent ) const {
     599RangeExpr::RangeExpr( Expression * low, Expression * high ) : low( low ), high( high ) {}
     600RangeExpr::RangeExpr( const RangeExpr & other ) : Expression( other ), low( other.low->clone() ), high( other.high->clone() ) {}
     601void RangeExpr::print( std::ostream & os, Indenter indent ) const {
    602602        os << "Range Expression: ";
    603603        low->print( os, indent );
     
    607607}
    608608
    609 StmtExpr::StmtExpr( CompoundStmt *statements ) : statements( statements ) {
     609StmtExpr::StmtExpr( CompoundStmt * statements ) : statements( statements ) {
    610610        computeResult();
    611611}
    612 StmtExpr::StmtExpr( const StmtExpr &other ) : Expression( other ), statements( other.statements->clone() ) {
     612StmtExpr::StmtExpr( const StmtExpr & other ) : Expression( other ), statements( other.statements->clone() ) {
    613613        cloneAll( other.returnDecls, returnDecls );
    614614        cloneAll( other.dtors, dtors );
     
    639639        }
    640640}
    641 void StmtExpr::print( std::ostream &os, Indenter indent ) const {
     641void StmtExpr::print( std::ostream & os, Indenter indent ) const {
    642642        os << "Statement Expression: " << std::endl << indent+1;
    643643        statements->print( os, indent+1 );
     
    655655
    656656long long UniqueExpr::count = 0;
    657 UniqueExpr::UniqueExpr( Expression *expr, long long idVal ) : expr( expr ), object( nullptr ), var( nullptr ), id( idVal ) {
     657UniqueExpr::UniqueExpr( Expression * expr, long long idVal ) : expr( expr ), object( nullptr ), var( nullptr ), id( idVal ) {
    658658        assert( expr );
    659659        assert( count != -1 );
     
    663663        }
    664664}
    665 UniqueExpr::UniqueExpr( const UniqueExpr &other ) : Expression( other ), expr( maybeClone( other.expr ) ), object( maybeClone( other.object ) ), var( maybeClone( other.var ) ), id( other.id ) {
     665UniqueExpr::UniqueExpr( const UniqueExpr & other ) : Expression( other ), expr( maybeClone( other.expr ) ), object( maybeClone( other.object ) ), var( maybeClone( other.var ) ), id( other.id ) {
    666666}
    667667UniqueExpr::~UniqueExpr() {
     
    670670        delete var;
    671671}
    672 void UniqueExpr::print( std::ostream &os, Indenter indent ) const {
     672void UniqueExpr::print( std::ostream & os, Indenter indent ) const {
    673673        os << "Unique Expression with id:" << id << std::endl << indent+1;
    674674        expr->print( os, indent+1 );
  • src/SynTree/Expression.h

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Sep  3 19:23:46 2017
    13 // Update Count     : 48
     12// Last Modified On : Mon Feb 18 18:29:51 2019
     13// Update Count     : 49
    1414//
    1515
     
    195195  public:
    196196        Expression * arg;
    197         bool isGenerated = true; // whether this cast appeared in the source program
     197        bool isGenerated = true; // cast generated implicitly by code generation or explicit in program
    198198
    199199        CastExpr( Expression * arg, bool isGenerated = true );
  • src/SynTree/Label.h

    r6a9d4b4 r933f32f  
    3535        operator std::string() const { return name; }
    3636        bool empty() { return name.empty(); }
    37   private:
     37
    3838        std::string name;
    3939        Statement * labelled;
  • src/SynTree/Mutator.h

    r6a9d4b4 r933f32f  
    121121        virtual Initializer * mutate( ConstructorInit * ctorInit ) = 0 ;
    122122
    123         virtual Subrange * mutate( Subrange * subrange ) = 0;
    124 
    125123        virtual Constant * mutate( Constant * constant ) = 0;
    126124
  • src/SynTree/Statement.h

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar  8 14:53:02 2018
    13 // Update Count     : 78
     12// Last Modified On : Tue Mar 12 09:01:53 2019
     13// Update Count     : 83
    1414//
    1515
     
    1919#include <list>                    // for list
    2020#include <memory>                  // for allocator
    21 #include <vector>                        // for vector
     21#include <vector>                                  // for vector
    2222
    2323#include "BaseSyntaxNode.h"        // for BaseSyntaxNode
     
    4343        const std::list<Label> & get_labels() const { return labels; }
    4444
    45         virtual Statement *clone() const override = 0;
    46         virtual void accept( Visitor &v ) override = 0;
    47         virtual Statement *acceptMutator( Mutator &m ) override = 0;
    48         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     45        virtual Statement * clone() const override = 0;
     46        virtual void accept( Visitor & v ) override = 0;
     47        virtual Statement * acceptMutator( Mutator & m ) override = 0;
     48        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    4949};
    5050
     
    5555        CompoundStmt();
    5656        CompoundStmt( std::list<Statement *> stmts );
    57         CompoundStmt( const CompoundStmt &other );
     57        CompoundStmt( const CompoundStmt & other );
    5858        virtual ~CompoundStmt();
    5959
     
    6262        void push_front( Statement * stmt ) { kids.push_front( stmt ); }
    6363
    64         virtual CompoundStmt *clone() const override { return new CompoundStmt( *this ); }
    65         virtual void accept( Visitor &v ) override { v.visit( this ); }
    66         virtual CompoundStmt *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    67         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     64        virtual CompoundStmt * clone() const override { return new CompoundStmt( *this ); }
     65        virtual void accept( Visitor & v ) override { v.visit( this ); }
     66        virtual CompoundStmt * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     67        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    6868};
    6969
     
    7272        NullStmt( const std::list<Label> & labels = {} );
    7373
    74         virtual NullStmt *clone() const override { return new NullStmt( *this ); }
    75         virtual void accept( Visitor &v ) override { v.visit( this ); }
    76         virtual NullStmt *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    77         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     74        virtual NullStmt * clone() const override { return new NullStmt( *this ); }
     75        virtual void accept( Visitor & v ) override { v.visit( this ); }
     76        virtual NullStmt * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     77        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    7878};
    7979
    8080class ExprStmt : public Statement {
    8181  public:
    82         Expression *expr;
    83 
    84         ExprStmt( Expression *expr );
    85         ExprStmt( const ExprStmt &other );
     82        Expression * expr;
     83
     84        ExprStmt( Expression * expr );
     85        ExprStmt( const ExprStmt & other );
    8686        virtual ~ExprStmt();
    8787
    88         Expression *get_expr() { return expr; }
    89         void set_expr( Expression *newValue ) { expr = newValue; }
    90 
    91         virtual ExprStmt *clone() const override { return new ExprStmt( *this ); }
    92         virtual void accept( Visitor &v ) override { v.visit( this ); }
    93         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    94         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     88        Expression * get_expr() { return expr; }
     89        void set_expr( Expression * newValue ) { expr = newValue; }
     90
     91        virtual ExprStmt * clone() const override { return new ExprStmt( *this ); }
     92        virtual void accept( Visitor & v ) override { v.visit( this ); }
     93        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     94        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    9595};
    9696
     
    9898  public:
    9999        bool voltile;
    100         Expression *instruction;
     100        Expression * instruction;
    101101        std::list<Expression *> output, input;
    102102        std::list<ConstantExpr *> clobber;
    103103        std::list<Label> gotolabels;
    104104
    105         AsmStmt( bool voltile, Expression *instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
    106         AsmStmt( const AsmStmt &other );
     105        AsmStmt( bool voltile, Expression * instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
     106        AsmStmt( const AsmStmt & other );
    107107        virtual ~AsmStmt();
    108108
     
    114114        void set_output( const std::list<Expression *> & newValue ) { output = newValue; }
    115115        std::list<Expression *> & get_input() { return input; }
    116         void set_input( const std::list<Expression *> &newValue ) { input = newValue; }
     116        void set_input( const std::list<Expression *> & newValue ) { input = newValue; }
    117117        std::list<ConstantExpr *> & get_clobber() { return clobber; }
    118         void set_clobber( const std::list<ConstantExpr *> &newValue ) { clobber = newValue; }
     118        void set_clobber( const std::list<ConstantExpr *> & newValue ) { clobber = newValue; }
    119119        std::list<Label> & get_gotolabels() { return gotolabels; }
    120         void set_gotolabels( const std::list<Label> &newValue ) { gotolabels = newValue; }
     120        void set_gotolabels( const std::list<Label> & newValue ) { gotolabels = newValue; }
    121121
    122122        virtual AsmStmt * clone() const { return new AsmStmt( *this ); }
     
    141141class IfStmt : public Statement {
    142142  public:
    143         Expression *condition;
    144         Statement *thenPart;
    145         Statement *elsePart;
     143        Expression * condition;
     144        Statement * thenPart;
     145        Statement * elsePart;
    146146        std::list<Statement *> initialization;
    147147
    148         IfStmt( Expression *condition, Statement *thenPart, Statement *elsePart,
     148        IfStmt( Expression * condition, Statement * thenPart, Statement * elsePart,
    149149                        std::list<Statement *> initialization = std::list<Statement *>() );
    150         IfStmt( const IfStmt &other );
     150        IfStmt( const IfStmt & other );
    151151        virtual ~IfStmt();
    152152
    153         std::list<Statement *> &get_initialization() { return initialization; }
    154         Expression *get_condition() { return condition; }
    155         void set_condition( Expression *newValue ) { condition = newValue; }
    156         Statement *get_thenPart() { return thenPart; }
    157         void set_thenPart( Statement *newValue ) { thenPart = newValue; }
    158         Statement *get_elsePart() { return elsePart; }
    159         void set_elsePart( Statement *newValue ) { elsePart = newValue; }
    160 
    161         virtual IfStmt *clone() const override { return new IfStmt( *this ); }
    162         virtual void accept( Visitor &v ) override { v.visit( this ); }
    163         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    164         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     153        std::list<Statement *> & get_initialization() { return initialization; }
     154        Expression * get_condition() { return condition; }
     155        void set_condition( Expression * newValue ) { condition = newValue; }
     156        Statement * get_thenPart() { return thenPart; }
     157        void set_thenPart( Statement * newValue ) { thenPart = newValue; }
     158        Statement * get_elsePart() { return elsePart; }
     159        void set_elsePart( Statement * newValue ) { elsePart = newValue; }
     160
     161        virtual IfStmt * clone() const override { return new IfStmt( *this ); }
     162        virtual void accept( Visitor & v ) override { v.visit( this ); }
     163        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     164        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    165165};
    166166
     
    170170        std::list<Statement *> statements;
    171171
    172         SwitchStmt( Expression *condition, const std::list<Statement *> &statements );
    173         SwitchStmt( const SwitchStmt &other );
     172        SwitchStmt( Expression * condition, const std::list<Statement *> & statements );
     173        SwitchStmt( const SwitchStmt & other );
    174174        virtual ~SwitchStmt();
    175175
    176         Expression *get_condition() { return condition; }
    177         void set_condition( Expression *newValue ) { condition = newValue; }
     176        Expression * get_condition() { return condition; }
     177        void set_condition( Expression * newValue ) { condition = newValue; }
    178178
    179179        std::list<Statement *> & get_statements() { return statements; }
    180180
    181         virtual void accept( Visitor &v ) override { v.visit( this ); }
    182         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    183 
    184         virtual SwitchStmt *clone() const override { return new SwitchStmt( *this ); }
    185         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     181        virtual void accept( Visitor & v ) override { v.visit( this ); }
     182        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     183
     184        virtual SwitchStmt * clone() const override { return new SwitchStmt( *this ); }
     185        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    186186
    187187};
     
    192192        std::list<Statement *> stmts;
    193193
    194         CaseStmt( Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw (SemanticErrorException);
    195         CaseStmt( const CaseStmt &other );
     194        CaseStmt( Expression * conditions, const std::list<Statement *> & stmts, bool isdef = false ) throw (SemanticErrorException);
     195        CaseStmt( const CaseStmt & other );
    196196        virtual ~CaseStmt();
    197197
     
    201201        void set_default(bool b) { _isDefault = b; }
    202202
    203         Expression * &get_condition() { return condition; }
    204         void set_condition( Expression *newValue ) { condition = newValue; }
    205 
    206         std::list<Statement *> &get_statements() { return stmts; }
    207         void set_statements( std::list<Statement *> &newValue ) { stmts = newValue; }
    208 
    209         virtual void accept( Visitor &v ) override { v.visit( this ); }
    210         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    211 
    212         virtual CaseStmt *clone() const override { return new CaseStmt( *this ); }
    213         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     203        Expression * & get_condition() { return condition; }
     204        void set_condition( Expression * newValue ) { condition = newValue; }
     205
     206        std::list<Statement *> & get_statements() { return stmts; }
     207        void set_statements( std::list<Statement *> & newValue ) { stmts = newValue; }
     208
     209        virtual void accept( Visitor & v ) override { v.visit( this ); }
     210        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     211
     212        virtual CaseStmt * clone() const override { return new CaseStmt( *this ); }
     213        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    214214  private:
    215215        bool _isDefault;
     
    218218class WhileStmt : public Statement {
    219219  public:
    220         Expression *condition;
    221         Statement *body;
     220        Expression * condition;
     221        Statement * body;
    222222        std::list<Statement *> initialization;
    223223        bool isDoWhile;
    224224
    225         WhileStmt( Expression *condition,
    226                Statement *body, std::list<Statement *> & initialization, bool isDoWhile = false );
    227         WhileStmt( const WhileStmt &other );
     225        WhileStmt( Expression * condition, Statement * body, std::list<Statement *> & initialization, bool isDoWhile = false );
     226        WhileStmt( const WhileStmt & other );
    228227        virtual ~WhileStmt();
    229228
    230         Expression *get_condition() { return condition; }
    231         void set_condition( Expression *newValue ) { condition = newValue; }
    232         Statement *get_body() { return body; }
    233         void set_body( Statement *newValue ) { body = newValue; }
     229        Expression * get_condition() { return condition; }
     230        void set_condition( Expression * newValue ) { condition = newValue; }
     231        Statement * get_body() { return body; }
     232        void set_body( Statement * newValue ) { body = newValue; }
    234233        bool get_isDoWhile() { return isDoWhile; }
    235234        void set_isDoWhile( bool newValue ) { isDoWhile = newValue; }
    236235
    237         virtual WhileStmt *clone() const override { return new WhileStmt( *this ); }
    238         virtual void accept( Visitor &v ) override { v.visit( this ); }
    239         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    240         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     236        virtual WhileStmt * clone() const override { return new WhileStmt( *this ); }
     237        virtual void accept( Visitor & v ) override { v.visit( this ); }
     238        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     239        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    241240};
    242241
     
    244243  public:
    245244        std::list<Statement *> initialization;
    246         Expression *condition;
    247         Expression *increment;
    248         Statement *body;
    249 
    250         ForStmt( std::list<Statement *> initialization,
    251              Expression *condition = 0, Expression *increment = 0, Statement *body = 0 );
    252         ForStmt( const ForStmt &other );
     245        Expression * condition;
     246        Expression * increment;
     247        Statement * body;
     248
     249        ForStmt( std::list<Statement *> initialization, Expression * condition = 0, Expression * increment = 0, Statement * body = 0 );
     250        ForStmt( const ForStmt & other );
    253251        virtual ~ForStmt();
    254252
    255         std::list<Statement *> &get_initialization() { return initialization; }
    256         Expression *get_condition() { return condition; }
    257         void set_condition( Expression *newValue ) { condition = newValue; }
    258         Expression *get_increment() { return increment; }
    259         void set_increment( Expression *newValue ) { increment = newValue; }
    260         Statement *get_body() { return body; }
    261         void set_body( Statement *newValue ) { body = newValue; }
    262 
    263         virtual ForStmt *clone() const override { return new ForStmt( *this ); }
    264         virtual void accept( Visitor &v ) override { v.visit( this ); }
    265         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    266         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     253        std::list<Statement *> & get_initialization() { return initialization; }
     254        Expression * get_condition() { return condition; }
     255        void set_condition( Expression * newValue ) { condition = newValue; }
     256        Expression * get_increment() { return increment; }
     257        void set_increment( Expression * newValue ) { increment = newValue; }
     258        Statement * get_body() { return body; }
     259        void set_body( Statement * newValue ) { body = newValue; }
     260
     261        virtual ForStmt * clone() const override { return new ForStmt( *this ); }
     262        virtual void accept( Visitor & v ) override { v.visit( this ); }
     263        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     264        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    267265};
    268266
     
    274272        const Label originalTarget;
    275273        Label target;
    276         Expression *computedTarget;
     274        Expression * computedTarget;
    277275        Type type;
    278276
    279277        BranchStmt( Label target, Type ) throw (SemanticErrorException);
    280         BranchStmt( Expression *computedTarget, Type ) throw (SemanticErrorException);
     278        BranchStmt( Expression * computedTarget, Type ) throw (SemanticErrorException);
    281279
    282280        Label get_originalTarget() { return originalTarget; }
     
    284282        void set_target( Label newValue ) { target = newValue; }
    285283
    286         Expression *get_computedTarget() { return computedTarget; }
     284        Expression * get_computedTarget() { return computedTarget; }
    287285        void set_target( Expression * newValue ) { computedTarget = newValue; }
    288286
    289287        Type get_type() { return type; }
    290         const char *get_typename() { return brType[ type ]; }
    291 
    292         virtual BranchStmt *clone() const override { return new BranchStmt( *this ); }
    293         virtual void accept( Visitor &v ) override { v.visit( this ); }
    294         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    295         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     288        const char * get_typename() { return brType[ type ]; }
     289
     290        virtual BranchStmt * clone() const override { return new BranchStmt( *this ); }
     291        virtual void accept( Visitor & v ) override { v.visit( this ); }
     292        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     293        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    296294  private:
    297         static const char *brType[];
     295        static const char * brType[];
    298296};
    299297
    300298class ReturnStmt : public Statement {
    301299  public:
    302         Expression *expr;
    303 
    304         ReturnStmt( Expression *expr );
    305         ReturnStmt( const ReturnStmt &other );
     300        Expression * expr;
     301
     302        ReturnStmt( Expression * expr );
     303        ReturnStmt( const ReturnStmt & other );
    306304        virtual ~ReturnStmt();
    307305
    308         Expression *get_expr() { return expr; }
    309         void set_expr( Expression *newValue ) { expr = newValue; }
    310 
    311         virtual ReturnStmt *clone() const override { return new ReturnStmt( *this ); }
    312         virtual void accept( Visitor &v ) override { v.visit( this ); }
    313         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    314         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     306        Expression * get_expr() { return expr; }
     307        void set_expr( Expression * newValue ) { expr = newValue; }
     308
     309        virtual ReturnStmt * clone() const override { return new ReturnStmt( *this ); }
     310        virtual void accept( Visitor & v ) override { v.visit( this ); }
     311        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     312        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    315313};
    316314
     
    324322
    325323        ThrowStmt( Kind kind, Expression * expr, Expression * target = nullptr );
    326         ThrowStmt( const ThrowStmt &other );
     324        ThrowStmt( const ThrowStmt & other );
    327325        virtual ~ThrowStmt();
    328326
     
    333331        void set_target( Expression * newTarget ) { target = newTarget; }
    334332
    335         virtual ThrowStmt *clone() const override { return new ThrowStmt( *this ); }
    336         virtual void accept( Visitor &v ) override { v.visit( this ); }
    337         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    338         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     333        virtual ThrowStmt * clone() const override { return new ThrowStmt( *this ); }
     334        virtual void accept( Visitor & v ) override { v.visit( this ); }
     335        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     336        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    339337};
    340338
     
    345343        FinallyStmt * finallyBlock;
    346344
    347         TryStmt( CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
    348         TryStmt( const TryStmt &other );
     345        TryStmt( CompoundStmt * tryBlock, std::list<CatchStmt *> & handlers, FinallyStmt * finallyBlock = 0 );
     346        TryStmt( const TryStmt & other );
    349347        virtual ~TryStmt();
    350348
    351         CompoundStmt *get_block() const { return block; }
    352         void set_block( CompoundStmt *newValue ) { block = newValue; }
     349        CompoundStmt * get_block() const { return block; }
     350        void set_block( CompoundStmt * newValue ) { block = newValue; }
    353351        std::list<CatchStmt *>& get_catchers() { return handlers; }
    354352
    355         FinallyStmt *get_finally() const { return finallyBlock; }
    356         void set_finally( FinallyStmt *newValue ) { finallyBlock = newValue; }
    357 
    358         virtual TryStmt *clone() const override { return new TryStmt( *this ); }
    359         virtual void accept( Visitor &v ) override { v.visit( this ); }
    360         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    361         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     353        FinallyStmt * get_finally() const { return finallyBlock; }
     354        void set_finally( FinallyStmt * newValue ) { finallyBlock = newValue; }
     355
     356        virtual TryStmt * clone() const override { return new TryStmt( *this ); }
     357        virtual void accept( Visitor & v ) override { v.visit( this ); }
     358        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     359        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    362360};
    363361
     
    367365
    368366        const Kind kind;
    369         Declaration *decl;
    370         Expression *cond;
    371         Statement *body;
    372 
    373         CatchStmt( Kind kind, Declaration *decl,
    374                    Expression *cond, Statement *body );
    375         CatchStmt( const CatchStmt &other );
     367        Declaration * decl;
     368        Expression * cond;
     369        Statement * body;
     370
     371        CatchStmt( Kind kind, Declaration * decl,
     372                   Expression * cond, Statement * body );
     373        CatchStmt( const CatchStmt & other );
    376374        virtual ~CatchStmt();
    377375
    378376        Kind get_kind() { return kind; }
    379         Declaration *get_decl() { return decl; }
    380         void set_decl( Declaration *newValue ) { decl = newValue; }
    381         Expression *get_cond() { return cond; }
    382         void set_cond( Expression *newCond ) { cond = newCond; }
    383         Statement *get_body() { return body; }
    384         void set_body( Statement *newValue ) { body = newValue; }
    385 
    386         virtual CatchStmt *clone() const override { return new CatchStmt( *this ); }
    387         virtual void accept( Visitor &v ) override { v.visit( this ); }
    388         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    389         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     377        Declaration * get_decl() { return decl; }
     378        void set_decl( Declaration * newValue ) { decl = newValue; }
     379        Expression * get_cond() { return cond; }
     380        void set_cond( Expression * newCond ) { cond = newCond; }
     381        Statement * get_body() { return body; }
     382        void set_body( Statement * newValue ) { body = newValue; }
     383
     384        virtual CatchStmt * clone() const override { return new CatchStmt( *this ); }
     385        virtual void accept( Visitor & v ) override { v.visit( this ); }
     386        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     387        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    390388};
    391389
    392390class FinallyStmt : public Statement {
    393391  public:
    394         CompoundStmt *block;
    395 
    396         FinallyStmt( CompoundStmt *block );
    397         FinallyStmt( const FinallyStmt &other );
     392        CompoundStmt * block;
     393
     394        FinallyStmt( CompoundStmt * block );
     395        FinallyStmt( const FinallyStmt & other );
    398396        virtual ~FinallyStmt();
    399397
    400         CompoundStmt *get_block() const { return block; }
    401         void set_block( CompoundStmt *newValue ) { block = newValue; }
    402 
    403         virtual FinallyStmt *clone() const override { return new FinallyStmt( *this ); }
    404         virtual void accept( Visitor &v ) override { v.visit( this ); }
    405         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    406         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     398        CompoundStmt * get_block() const { return block; }
     399        void set_block( CompoundStmt * newValue ) { block = newValue; }
     400
     401        virtual FinallyStmt * clone() const override { return new FinallyStmt( *this ); }
     402        virtual void accept( Visitor & v ) override { v.visit( this ); }
     403        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     404        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    407405};
    408406
     
    438436        } orelse;
    439437
    440         virtual WaitForStmt *clone() const override { return new WaitForStmt( *this ); }
    441         virtual void accept( Visitor &v ) override { v.visit( this ); }
    442         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    443         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     438        virtual WaitForStmt * clone() const override { return new WaitForStmt( *this ); }
     439        virtual void accept( Visitor & v ) override { v.visit( this ); }
     440        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     441        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    444442
    445443};
     
    464462class DeclStmt : public Statement {
    465463  public:
    466         Declaration *decl;
    467 
    468         DeclStmt( Declaration *decl );
    469         DeclStmt( const DeclStmt &other );
     464        Declaration * decl;
     465
     466        DeclStmt( Declaration * decl );
     467        DeclStmt( const DeclStmt & other );
    470468        virtual ~DeclStmt();
    471469
    472         Declaration *get_decl() const { return decl; }
    473         void set_decl( Declaration *newValue ) { decl = newValue; }
    474 
    475         virtual DeclStmt *clone() const override { return new DeclStmt( *this ); }
    476         virtual void accept( Visitor &v ) override { v.visit( this ); }
    477         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    478         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
    479 };
    480 
    481 
    482 /// represents an implicit application of a constructor or destructor. Qualifiers are replaced
    483 /// immediately before and after the call so that qualified objects can be constructed
    484 /// with the same functions as unqualified objects.
     470        Declaration * get_decl() const { return decl; }
     471        void set_decl( Declaration * newValue ) { decl = newValue; }
     472
     473        virtual DeclStmt * clone() const override { return new DeclStmt( *this ); }
     474        virtual void accept( Visitor & v ) override { v.visit( this ); }
     475        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     476        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
     477};
     478
     479
     480/// represents an implicit application of a constructor or destructor. Qualifiers are replaced immediately before and
     481/// after the call so that qualified objects can be constructed with the same functions as unqualified objects.
    485482class ImplicitCtorDtorStmt : public Statement {
    486483  public:
     
    492489        virtual ~ImplicitCtorDtorStmt();
    493490
    494         Statement *get_callStmt() const { return callStmt; }
     491        Statement * get_callStmt() const { return callStmt; }
    495492        void set_callStmt( Statement * newValue ) { callStmt = newValue; }
    496493
    497         virtual ImplicitCtorDtorStmt *clone() const override { return new ImplicitCtorDtorStmt( *this ); }
    498         virtual void accept( Visitor &v ) override { v.visit( this ); }
    499         virtual Statement *acceptMutator( Mutator &m )  override { return m.mutate( this ); }
    500         virtual void print( std::ostream &os, Indenter indent = {} ) const override;
     494        virtual ImplicitCtorDtorStmt * clone() const override { return new ImplicitCtorDtorStmt( *this ); }
     495        virtual void accept( Visitor & v ) override { v.visit( this ); }
     496        virtual Statement * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
     497        virtual void print( std::ostream & os, Indenter indent = {} ) const override;
    501498};
    502499
  • src/SynTree/SynTree.h

    r6a9d4b4 r933f32f  
    3434class NamedTypeDecl;
    3535class TypeDecl;
    36 class FtypeDecl;
    37 class DtypeDecl;
    3836class TypedefDecl;
    3937class AsmDecl;
     
    9088class ConstructorExpr;
    9189class CompoundLiteralExpr;
    92 class UntypedValofExpr;
    9390class RangeExpr;
    9491class UntypedTupleExpr;
     
    132129class ConstructorInit;
    133130
    134 class Subrange;
    135 
    136131//template <class T>    // emulate a union with templates?
    137132class Constant;
  • src/SynTree/Type.cc

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 22 10:17:19 2018
    13 // Update Count     : 39
     12// Last Modified On : Thu Jan 31 21:54:16 2019
     13// Update Count     : 43
    1414//
    1515#include "Type.h"
     
    2525
    2626const char *BasicType::typeNames[] = {
     27#if 0
    2728        "_Bool",
    2829        "char",
     
    4950        "unsigned __int128",
    5051        "__float80",
    51         "__float128"
     52        "__float128",
     53        "_Float16",
     54        "_Float32",
     55        "_Float32x",
     56        "_Float64",
     57        "_Float64x",
     58        "_Float128",
     59        "_Float128x",
     60        "_Float16 _Complex",
     61        "_Float32 _Complex",
     62        "_Float32x _Complex",
     63        "_Float64 _Complex",
     64        "_Float64x _Complex",
     65        "_Float128 _Complex",
     66        "_Float128x _Complex",
     67#endif
     68        "_Bool",
     69        "char",
     70        "signed char",
     71        "unsigned char",
     72        "signed short int",
     73        "unsigned short int",
     74        "signed int",
     75        "unsigned int",
     76        "signed long int",
     77        "unsigned long int",
     78        "signed long long int",
     79        "unsigned long long int",
     80        "__int128",
     81        "unsigned __int128",
     82        "_Float16",
     83        "_Float16 _Complex",
     84        "_Float32",
     85        "_Float32 _Complex",
     86        "float",
     87        "float _Complex",
     88        //"float _Imaginary",
     89        "_Float32x",
     90        "_Float32x _Complex",
     91        "_Float64",
     92        "_Float64 _Complex",
     93        "double",
     94        "double _Complex",
     95        //"double _Imaginary",
     96        "_Float64x",
     97        "_Float64x _Complex",
     98        "__float80",
     99        "_Float128",
     100        "_Float128 _Complex",
     101        "__float128",
     102        "long double",
     103        "long double _Complex",
     104        //"long double _Imaginary",
     105        "_Float128x",
     106        "_Float128x _Complex",
    52107};
    53108static_assert(
  • src/SynTree/Type.h

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 25 14:14:01 2017
    13 // Update Count     : 154
     12// Last Modified On : Thu Feb 14 17:11:24 2019
     13// Update Count     : 169
    1414//
    1515
     
    207207class BasicType : public Type {
    208208  public:
     209        // GENERATED START, DO NOT EDIT
     210        // GENERATED BY BasicTypes-gen.cc
    209211        enum Kind {
    210212                Bool,
     
    220222                LongLongSignedInt,
    221223                LongLongUnsignedInt,
    222                 Float,
    223                 Double,
    224                 LongDouble,
    225                 FloatComplex,
    226                 DoubleComplex,
    227                 LongDoubleComplex,
    228                 FloatImaginary,
    229                 DoubleImaginary,
    230                 LongDoubleImaginary,
    231224                SignedInt128,
    232225                UnsignedInt128,
    233                 Float80,
    234                 Float128,
     226                uFloat16,
     227                uFloat16Complex,
     228                uFloat32,
     229                uFloat32Complex,
     230                Float,
     231                FloatComplex,
     232                uFloat32x,
     233                uFloat32xComplex,
     234                uFloat64,
     235                uFloat64Complex,
     236                Double,
     237                DoubleComplex,
     238                uFloat64x,
     239                uFloat64xComplex,
     240                uuFloat80,
     241                uFloat128,
     242                uFloat128Complex,
     243                uuFloat128,
     244                LongDouble,
     245                LongDoubleComplex,
     246                uFloat128x,
     247                uFloat128xComplex,
    235248                NUMBER_OF_BASIC_TYPES
    236249        } kind;
     250        // GENERATED END
    237251
    238252        static const char *typeNames[];                                         // string names for basic types, MUST MATCH with Kind
  • src/SynTree/TypeSubstitution.cc

    r6a9d4b4 r933f32f  
    6464}
    6565
     66void TypeSubstitution::addVar( std::string formalExpr, Expression *actualExpr ) {
     67        varEnv[ formalExpr ] = actualExpr;
     68}
     69
    6670void TypeSubstitution::remove( std::string formalType ) {
    6771        TypeEnvType::iterator i = typeEnv.find( formalType );
     
    108112namespace {
    109113        struct EnvTrimmer {
    110                 TypeSubstitution * env, * newEnv;
    111                 EnvTrimmer( TypeSubstitution * env, TypeSubstitution * newEnv ) : env( env ), newEnv( newEnv ){}
     114                const TypeSubstitution * env;
     115                TypeSubstitution * newEnv;
     116                EnvTrimmer( const TypeSubstitution * env, TypeSubstitution * newEnv ) : env( env ), newEnv( newEnv ){}
    112117                void previsit( TypeDecl * tyDecl ) {
    113118                        // transfer known bindings for seen type variables
     
    120125
    121126/// reduce environment to just the parts that are referenced in a given expression
    122 TypeSubstitution * TypeSubstitution::newFromExpr( Expression * expr, TypeSubstitution * env ) {
     127TypeSubstitution * TypeSubstitution::newFromExpr( Expression * expr, const TypeSubstitution * env ) {
    123128        if ( env ) {
    124129                TypeSubstitution * newEnv = new TypeSubstitution();
  • src/SynTree/TypeSubstitution.h

    r6a9d4b4 r933f32f  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:52:24 2017
    13 // Update Count     : 3
     12// Last Modified On : Tue Apr 30 22:52:47 2019
     13// Update Count     : 9
    1414//
    1515
     
    1919#include <iosfwd>                  // for ostream
    2020#include <list>                    // for list<>::iterator, _List_iterator
    21 #include <map>                     // for _Rb_tree_iterator, map, map<>::val...
    22 #include <set>                     // for set
     21#include <unordered_map>
     22#include <unordered_set>
    2323#include <string>                  // for string, operator!=
    2424#include <utility>                 // for pair
     
    3939        TypeSubstitution &operator=( const TypeSubstitution &other );
    4040
    41         template< typename SynTreeClass > int apply( SynTreeClass *&input );
    42         template< typename SynTreeClass > int applyFree( SynTreeClass *&input );
     41        template< typename SynTreeClass > int apply( SynTreeClass *&input ) const;
     42        template< typename SynTreeClass > int applyFree( SynTreeClass *&input ) const;
    4343
    4444        void add( std::string formalType, Type *actualType );
     
    4848        bool empty() const;
    4949
     50        void addVar( std::string formalExpr, Expression *actualExpr );
     51
    5052        template< typename FormalIterator, typename ActualIterator >
    5153        void add( FormalIterator formalBegin, FormalIterator formalEnd, ActualIterator actualBegin );
     
    5658
    5759        /// create a new TypeSubstitution using bindings from env containing all of the type variables in expr
    58         static TypeSubstitution * newFromExpr( Expression * expr, TypeSubstitution * env );
     60        static TypeSubstitution * newFromExpr( Expression * expr, const TypeSubstitution * env );
    5961
    6062        void normalize();
     
    7880        friend class PassVisitor;
    7981
    80         typedef std::map< std::string, Type* > TypeEnvType;
    81         typedef std::map< std::string, Expression* > VarEnvType;
     82        typedef std::unordered_map< std::string, Type * > TypeEnvType;
     83        typedef std::unordered_map< std::string, Expression * > VarEnvType;
    8284        TypeEnvType typeEnv;
    8385        VarEnvType varEnv;
     
    8991        auto begin() const -> decltype( typeEnv.begin() ) { return typeEnv.begin(); }
    9092        auto   end() const -> decltype( typeEnv.  end() ) { return typeEnv.  end(); }
     93
     94        auto beginVar()       -> decltype( varEnv.begin() ) { return varEnv.begin(); }
     95        auto   endVar()       -> decltype( varEnv.  end() ) { return varEnv.  end(); }
     96        auto beginVar() const -> decltype( varEnv.begin() ) { return varEnv.begin(); }
     97        auto   endVar() const -> decltype( varEnv.  end() ) { return varEnv.  end(); }
    9198};
    9299
     
    98105        ActualIterator actualIt = actualBegin;
    99106        for ( ; formalIt != formalEnd; ++formalIt, ++actualIt ) {
    100                 if ( TypeDecl *formal = dynamic_cast< TypeDecl* >( *formalIt ) ) {
    101                         if ( TypeExpr *actual = dynamic_cast< TypeExpr* >( *actualIt ) ) {
     107                if ( TypeDecl *formal = dynamic_cast< TypeDecl * >( *formalIt ) ) {
     108                        if ( TypeExpr *actual = dynamic_cast< TypeExpr * >( *actualIt ) ) {
    102109                                if ( formal->get_name() != "" ) {
    103110                                        TypeEnvType::iterator i = typeEnv.find( formal->get_name() );
     
    130137// definitition must happen after PassVisitor is included so that WithGuards can be used
    131138struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter> {
    132                 Substituter( TypeSubstitution & sub, bool freeOnly ) : sub( sub ), freeOnly( freeOnly ) {}
     139                Substituter( const TypeSubstitution & sub, bool freeOnly ) : sub( sub ), freeOnly( freeOnly ) {}
    133140
    134141                Type * postmutate( TypeInstType * aggregateUseType );
     
    143150                void premutate( UnionInstType * aggregateUseType );
    144151
    145                 TypeSubstitution & sub;
     152                const TypeSubstitution & sub;
    146153                int subCount = 0;
    147154                bool freeOnly;
    148                 typedef std::set< std::string > BoundVarsType;
     155                typedef std::unordered_set< std::string > BoundVarsType;
    149156                BoundVarsType boundVars;
    150157};
    151158
    152159template< typename SynTreeClass >
    153 int TypeSubstitution::apply( SynTreeClass *&input ) {
     160int TypeSubstitution::apply( SynTreeClass *&input ) const {
    154161        assert( input );
    155162        PassVisitor<Substituter> sub( *this, false );
     
    163170
    164171template< typename SynTreeClass >
    165 int TypeSubstitution::applyFree( SynTreeClass *&input ) {
     172int TypeSubstitution::applyFree( SynTreeClass *&input ) const {
    166173        assert( input );
    167174        PassVisitor<Substituter> sub( *this, true );
  • src/SynTree/Visitor.h

    r6a9d4b4 r933f32f  
    123123        virtual void visit( ConstructorInit * ctorInit ) = 0;
    124124
    125         virtual void visit( Subrange * subrange ) = 0;
    126 
    127125        virtual void visit( Constant * constant ) = 0;
    128126
  • src/SynTree/module.mk

    r6a9d4b4 r933f32f  
    1515###############################################################################
    1616
    17 SRC += SynTree/Type.cc \
    18        SynTree/VoidType.cc \
    19        SynTree/BasicType.cc \
    20        SynTree/PointerType.cc \
    21        SynTree/ArrayType.cc \
    22        SynTree/ReferenceType.cc \
    23        SynTree/FunctionType.cc \
    24        SynTree/ReferenceToType.cc \
    25        SynTree/TupleType.cc \
    26        SynTree/TypeofType.cc \
    27        SynTree/AttrType.cc \
    28        SynTree/VarArgsType.cc \
    29        SynTree/ZeroOneType.cc \
    30        SynTree/Constant.cc \
    31        SynTree/Expression.cc \
    32        SynTree/TupleExpr.cc \
    33        SynTree/CommaExpr.cc \
    34        SynTree/TypeExpr.cc \
    35        SynTree/ApplicationExpr.cc \
    36        SynTree/AddressExpr.cc \
    37        SynTree/Statement.cc \
    38        SynTree/CompoundStmt.cc \
    39        SynTree/DeclStmt.cc \
    40        SynTree/Declaration.cc \
    41        SynTree/DeclarationWithType.cc \
    42        SynTree/ObjectDecl.cc \
    43        SynTree/FunctionDecl.cc \
    44        SynTree/AggregateDecl.cc \
    45        SynTree/NamedTypeDecl.cc \
    46        SynTree/TypeDecl.cc \
    47        SynTree/Initializer.cc \
    48        SynTree/TypeSubstitution.cc \
    49        SynTree/Attribute.cc \
    50        SynTree/DeclReplacer.cc
     17SRC_SYNTREE = \
     18      SynTree/Type.cc \
     19      SynTree/VoidType.cc \
     20      SynTree/BasicType.cc \
     21      SynTree/PointerType.cc \
     22      SynTree/ArrayType.cc \
     23      SynTree/ReferenceType.cc \
     24      SynTree/FunctionType.cc \
     25      SynTree/ReferenceToType.cc \
     26      SynTree/TupleType.cc \
     27      SynTree/TypeofType.cc \
     28      SynTree/AttrType.cc \
     29      SynTree/VarArgsType.cc \
     30      SynTree/ZeroOneType.cc \
     31      SynTree/Constant.cc \
     32      SynTree/Expression.cc \
     33      SynTree/TupleExpr.cc \
     34      SynTree/CommaExpr.cc \
     35      SynTree/TypeExpr.cc \
     36      SynTree/ApplicationExpr.cc \
     37      SynTree/AddressExpr.cc \
     38      SynTree/Statement.cc \
     39      SynTree/CompoundStmt.cc \
     40      SynTree/DeclStmt.cc \
     41      SynTree/Declaration.cc \
     42      SynTree/DeclarationWithType.cc \
     43      SynTree/ObjectDecl.cc \
     44      SynTree/FunctionDecl.cc \
     45      SynTree/AggregateDecl.cc \
     46      SynTree/NamedTypeDecl.cc \
     47      SynTree/TypeDecl.cc \
     48      SynTree/Initializer.cc \
     49      SynTree/TypeSubstitution.cc \
     50      SynTree/Attribute.cc \
     51      SynTree/DeclReplacer.cc
    5152
     53SRC += $(SRC_SYNTREE)
     54SRCDEMANGLE += $(SRC_SYNTREE)
Note: See TracChangeset for help on using the changeset viewer.