Changes in / [63afee0:258eb5c9]


Ignore:
Location:
src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/LinkageSpec.cc

    r63afee0 r258eb5c9  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:22:09 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 19 15:53:05 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat May 16 13:23:21 2015
     13// Update Count     : 2
    1414//
    1515
     
    7979}
    8080
    81 
    82 bool LinkageSpec::isOverridable( Type t ) {
    83         switch ( t ) {
    84           case Intrinsic:
    85           case AutoGen:
    86                 return true;
    87           case Cforall:
    88           case C:
    89           case Compiler:
    90                 return false;
    91         }
    92         assert( false );
    93         return false;
    94 }
    95 
    9681bool LinkageSpec::isBuiltin( Type t ) {
    9782        switch ( t ) {
  • src/Parser/LinkageSpec.h

    r63afee0 r258eb5c9  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 13:24:28 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Aug 18 14:11:55 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sat May 16 13:26:14 2015
     13// Update Count     : 3
    1414//
    1515
     
    3434        static bool isGeneratable( Type );
    3535        static bool isOverloadable( Type );
    36         static bool isOverridable( Type );
    3736        static bool isBuiltin( Type );
    3837};
  • src/ResolvExpr/CastCost.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 06:57:43 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Oct 05 14:48:45 2015
    13 // Update Count     : 5
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 06:59:10 2015
     13// Update Count     : 2
    1414//
    1515
     
    5656                                return Cost::infinity;
    5757                        } else {
    58                                 // xxx - why are we adding cost 0 here?
    5958                                return converter.get_cost() + Cost( 0, 0, 0 );
    6059                        } // if
     
    8382                                newEnv.add( pointerType->get_forall() );
    8483                                newEnv.add( pointerType->get_base()->get_forall() );
    85                                 int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
    86                                 if ( castResult > 0 ) {
     84                                int assignResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
     85                                if ( assignResult > 0 ) {
    8786                                        cost = Cost( 0, 0, 1 );
    88                                 } else if ( castResult < 0 ) {
     87                                } else if ( assignResult < 0 ) {
    8988                                        cost = Cost( 1, 0, 0 );
    9089                                } // if
  • src/ResolvExpr/PtrsAssignable.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 11:44:11 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Sep 21 14:34:58 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 11:47:36 2015
     13// Update Count     : 2
    1414//
    1515
     
    106106        void PtrsAssignable::visit( TypeInstType *inst ) {
    107107                EqvClass eqvClass;
    108                 if ( env.lookup( inst->get_name(), eqvClass ) && eqvClass.type ) {
     108                if ( env.lookup( inst->get_name(), eqvClass ) ) {
    109109                        result = ptrsAssignable( eqvClass.type, dest, env );
    110110                } else {
  • src/ResolvExpr/PtrsCastable.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 11:48:00 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Mon Oct 05 14:49:12 2015
    13 // Update Count     : 7
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 11:51:17 2015
     13// Update Count     : 2
    1414//
    1515
     
    133133
    134134        void PtrsCastable::visit(TypeInstType *inst) {
    135                 result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1;
     135                result = objectCast( inst, env, indexer ) && objectCast( dest, env, indexer ) ? 1 : -1;
    136136        }
    137137
  • src/ResolvExpr/Unify.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 12:27:10 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Sep 02 14:43:22 2015
    13 // Update Count     : 36
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Jun 26 14:57:05 2015
     13// Update Count     : 7
    1414//
    1515
     
    2828
    2929
    30 // #define DEBUG
     30//#define DEBUG
    3131
    3232namespace ResolvExpr {
     
    8080        bool typesCompatible( Type *first, Type *second, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    8181                TypeEnvironment newEnv;
    82                 OpenVarSet openVars, closedVars; // added closedVars
     82                OpenVarSet openVars;
    8383                AssertionSet needAssertions, haveAssertions;
    8484                Type *newFirst = first->clone(), *newSecond = second->clone();
    8585                env.apply( newFirst );
    8686                env.apply( newSecond );
    87 
    88                 // do we need to do this? Seems like we do, types should be able to be compatible if they
    89                 // have free variables that can unify
    90                 findOpenVars( newFirst, openVars, closedVars, needAssertions, haveAssertions, false );
    91                 findOpenVars( newSecond, openVars, closedVars, needAssertions, haveAssertions, true );
    92 
    9387                bool result = unifyExact( newFirst, newSecond, newEnv, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer );
    9488                delete newFirst;
     
    431425
    432426        void Unify::visit(ArrayType *arrayType) {
     427                // XXX -- compare array dimension
    433428                ArrayType *otherArray = dynamic_cast< ArrayType* >( type2 );
    434                 // to unify, array types must both be VLA or both not VLA
    435                 // and must both have a dimension expression or not have a dimension
    436                 if ( otherArray && arrayType->get_isVarLen() == otherArray->get_isVarLen()
    437                                 && ((arrayType->get_dimension() != 0 && otherArray->get_dimension() != 0)
    438                                         || (arrayType->get_dimension() == 0 && otherArray->get_dimension() == 0))) {
    439 
    440                         // not positive this is correct in all cases, but it's needed for typedefs
    441                         if ( arrayType->get_isVarLen() || otherArray->get_isVarLen() ) {
    442                                 return;
    443                         }
    444 
    445                         if ( ! arrayType->get_isVarLen() && ! otherArray->get_isVarLen() &&
    446                                 arrayType->get_dimension() != 0 && otherArray->get_dimension() != 0 ) {
    447                                 ConstantExpr * ce1 = dynamic_cast< ConstantExpr * >( arrayType->get_dimension() );
    448                                 ConstantExpr * ce2 = dynamic_cast< ConstantExpr * >( otherArray->get_dimension() );
    449                                 assert(ce1 && ce2);
    450 
    451                                 Constant * c1 = ce1->get_constant();
    452                                 Constant * c2 = ce2->get_constant();
    453 
    454                                 if ( c1->get_value() != c2->get_value() ) {
    455                                         // does not unify if the dimension is different
    456                                         return;
    457                                 }
    458                         }
    459 
     429                if ( otherArray && arrayType->get_isVarLen() == otherArray->get_isVarLen() ) {
    460430                        result = unifyExact( arrayType->get_base(), otherArray->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer );
    461431                } // if
     
    465435        bool unifyDeclList( Iterator1 list1Begin, Iterator1 list1End, Iterator2 list2Begin, Iterator2 list2End, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, const SymTab::Indexer &indexer ) {
    466436                for ( ; list1Begin != list1End && list2Begin != list2End; ++list1Begin, ++list2Begin ) {
    467                         // Type * commonType;
    468                         // if ( ! unifyInexact( (*list1Begin)->get_type(), (*list2Begin)->get_type(), env, needAssertions, haveAssertions, openVars, WidenMode( true, true ), indexer, commonType ) ) {
    469437                        if ( ! unifyExact( (*list1Begin)->get_type(), (*list2Begin)->get_type(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ) ) {
    470438                                return false;
     
    481449                FunctionType *otherFunction = dynamic_cast< FunctionType* >( type2 );
    482450                if ( otherFunction && functionType->get_isVarArgs() == otherFunction->get_isVarArgs() ) {
    483 
     451 
    484452                        if ( unifyDeclList( functionType->get_parameters().begin(), functionType->get_parameters().end(), otherFunction->get_parameters().begin(), otherFunction->get_parameters().end(), env, needAssertions, haveAssertions, openVars, indexer ) ) {
    485453       
  • src/SymTab/IdTable.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 17:04:02 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Oct 07 12:21:13 2015
    13 // Update Count     : 73
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun May 17 17:07:43 2015
     13// Update Count     : 3
    1414//
    1515
     
    3737                        for ( InnerTableType::iterator inner = outer->second.begin(); inner != outer->second.end(); ++inner ) {
    3838                                std::stack< DeclEntry >& entry = inner->second;
    39                                 // xxx - should be while?
    4039                                if ( ! entry.empty() && entry.top().second == scopeLevel ) {
    4140                                        entry.pop();
     
    5352                if ( decl->get_linkage() == LinkageSpec::C ) {
    5453                        manglename = name;
    55                 } else if ( LinkageSpec::isOverridable( decl->get_linkage() ) ) {
    56                         // mangle the name without including the appropriate suffix
    57                         // this will make it so that overridable routines are placed
    58                         // into the same "bucket" as their user defined versions.
    59                         manglename = Mangler::mangle( decl, false );
    6054                } else {
    6155                        manglename = Mangler::mangle( decl );
     
    6660
    6761                if ( it == declTable.end() ) {
    68                         // first time this name mangling has been defined
    6962                        declTable[ manglename ].push( DeclEntry( decl, scopeLevel ) );
    7063                } else {
    7164                        std::stack< DeclEntry >& entry = it->second;
    7265                        if ( ! entry.empty() && entry.top().second == scopeLevel ) {
    73                                 // if we're giving the same name mangling to things of
    74                                 //  different types then there is something wrong
    75                                 Declaration *old = entry.top().first;
    76                                 assert( (dynamic_cast<ObjectDecl*>( decl ) && dynamic_cast<ObjectDecl*>( old ) )
    77                                   || (dynamic_cast<FunctionDecl*>( decl ) && dynamic_cast<FunctionDecl*>( old ) ) );
    78 
    79                                 if ( LinkageSpec::isOverridable( old->get_linkage() ) ) {
    80                                         // new definition shadows the autogenerated one, even at the same scope
    81                                         declTable[ manglename ].push( DeclEntry( decl, scopeLevel ) );
    82                                 } else if ( decl->get_linkage() != LinkageSpec::C || ResolvExpr::typesCompatible( decl->get_type(), entry.top().first->get_type(), Indexer() ) ) {
    83                                         // typesCompatible doesn't really do the right thing here. When checking compatibility of function types,
    84                                         // we should ignore outermost pointer qualifiers, except _Atomic?
     66                                if ( decl->get_linkage() != LinkageSpec::C || ResolvExpr::typesCompatible( decl->get_type(), entry.top().first->get_type(), Indexer() ) ) {
    8567                                        FunctionDecl *newentry = dynamic_cast< FunctionDecl* >( decl );
    86                                         FunctionDecl *oldentry = dynamic_cast< FunctionDecl* >( old );
    87                                         if ( newentry && oldentry ) {
    88                                                 if ( newentry->get_statements() && oldentry->get_statements() ) {
    89                                                         throw SemanticError( "duplicate function definition for 1 ", decl );
    90                                                 } // if
     68                                        FunctionDecl *old = dynamic_cast< FunctionDecl* >( entry.top().first );
     69                                        if ( newentry && old && newentry->get_statements() && old->get_statements() ) {
     70                                                throw SemanticError( "duplicate function definition for ", decl );
    9171                                        } else {
    92                                                 // two objects with the same mangled name defined in the same scope.
    93                                                 // both objects must be marked extern or both must be intrinsic for this to be okay
    94                                                 // xxx - perhaps it's actually if either is intrinsic then this is okay?
    95                                                 //       might also need to be same storage class?
    9672                                                ObjectDecl *newobj = dynamic_cast< ObjectDecl* >( decl );
    97                                                 ObjectDecl *oldobj = dynamic_cast< ObjectDecl* >( old );
    98                                                 if (newobj->get_storageClass() != DeclarationNode::Extern && oldobj->get_storageClass() != DeclarationNode::Extern ) {
    99                                                         throw SemanticError( "duplicate definition for 3 ", decl );
     73                                                ObjectDecl *oldobj = dynamic_cast< ObjectDecl* >( entry.top().first );
     74                                                if ( newobj && oldobj && newobj->get_init() && oldobj->get_init() ) {
     75                                                        throw SemanticError( "duplicate definition for ", decl );
    10076                                                } // if
    10177                                        } // if
     
    10480                                } // if
    10581                        } else {
    106                                 // new scope level - shadow existing definition
    10782                                declTable[ manglename ].push( DeclEntry( decl, scopeLevel ) );
    10883                        } // if
    10984                } // if
    110                 // this ensures that no two declarations with the same unmangled name both have C linkage
     85                // ensure the set of routines with C linkage cannot be overloaded
    11186                for ( InnerTableType::iterator i = declTable.begin(); i != declTable.end(); ++i ) {
    11287                        if ( ! i->second.empty() && i->second.top().first->get_linkage() == LinkageSpec::C && declTable.size() > 1 ) {
  • src/SymTab/Mangler.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:40:29 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 19 15:52:24 2015
    13 // Update Count     : 19
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jun  8 15:12:12 2015
     13// Update Count     : 8
    1414//
    1515
     
    3030
    3131namespace SymTab {
    32         Mangler::Mangler( bool mangleOverridable ) : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ) {
     32        Mangler::Mangler() : nextVarNum( 0 ), isTopLevel( true ) {
    3333        }
    3434
     
    4141                nextVarNum = rhs.nextVarNum;
    4242                isTopLevel = rhs.isTopLevel;
    43                 mangleOverridable = rhs.mangleOverridable;
    4443        }
    4544
     
    6059                mangleName << "__";
    6160                maybeAccept( declaration->get_type(), *this );
    62                 if ( mangleOverridable && LinkageSpec::isOverridable( declaration->get_linkage() ) ) {
    63                         // want to be able to override autogenerated and intrinsic routines,
    64                         // so they need a different name mangling
    65                         if ( declaration->get_linkage() == LinkageSpec::AutoGen ) {
    66                                 mangleName << "autogen__";
    67                         } else if ( declaration->get_linkage() == LinkageSpec::Intrinsic ) {
    68                                 mangleName << "intrinsic__";
    69                         } else {
    70                                 // if we add another kind of overridable function, this has to change
    71                                 assert( false );
    72                         } // if
    73                 }
    7461                isTopLevel = wasTopLevel;
    7562        }
     
    227214                                varNums[ (*i )->get_name() ] = std::pair< int, int >( nextVarNum++, (int )(*i )->get_kind() );
    228215                                for ( std::list< DeclarationWithType* >::iterator assert = (*i )->get_assertions().begin(); assert != (*i )->get_assertions().end(); ++assert ) {
    229                                         Mangler sub_mangler( mangleOverridable );
     216                                        Mangler sub_mangler;
    230217                                        sub_mangler.nextVarNum = nextVarNum;
    231218                                        sub_mangler.isTopLevel = false;
  • src/SymTab/Mangler.h

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:44:03 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 19 15:48:46 2015
    13 // Update Count     : 14
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jun  8 14:47:14 2015
     13// Update Count     : 5
    1414//
    1515
     
    2525          public:
    2626                template< typename SynTreeClass >
    27             static std::string mangle( SynTreeClass *decl, bool mangleOverridable = true ); // interface to clients
     27            static std::string mangle( SynTreeClass *decl ); // interface to clients
    2828
    2929///   using Visitor::visit;
     
    5050                int nextVarNum;
    5151                bool isTopLevel;
    52                 bool mangleOverridable;
    5352 
    54                 Mangler( bool mangleOverridable );
     53                Mangler();
    5554                Mangler( const Mangler & );
    5655 
     
    6261
    6362        template< typename SynTreeClass >
    64         std::string Mangler::mangle( SynTreeClass *decl, bool mangleOverridable ) {
    65                 Mangler mangler( mangleOverridable );
     63        std::string Mangler::mangle( SynTreeClass *decl ) {
     64                Mangler mangler;
    6665                maybeAccept( decl, mangler );
    6766                return mangler.get_mangleName();
  • src/SymTab/Validate.cc

    r63afee0 r258eb5c9  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Nov 19 10:44:55 2015
    13 // Update Count     : 199
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Aug 11 16:59:35 2015
     13// Update Count     : 196
    1414//
    1515
     
    5454#include "MakeLibCfa.h"
    5555#include "TypeEquality.h"
    56 #include "ResolvExpr/typeops.h"
    5756
    5857#define debugPrint( x ) if ( doDebug ) { std::cout << x; }
     
    126125        };
    127126
    128         class AutogenerateRoutines : public Visitor {
     127        class AddStructAssignment : public Visitor {
    129128          public:
    130129                /// Generates assignment operators for aggregate types as required
    131                 static void autogenerateRoutines( std::list< Declaration * > &translationUnit );
     130                static void addStructAssignment( std::list< Declaration * > &translationUnit );
    132131
    133132                std::list< Declaration * > &get_declsToAdd() { return declsToAdd; }
     
    152151                virtual void visit( CatchStmt *catchStmt );
    153152
    154                 AutogenerateRoutines() : functionNesting( 0 ) {}
     153                AddStructAssignment() : functionNesting( 0 ) {}
    155154          private:
    156155                template< typename StmtClass > void visitStatement( StmtClass *stmt );
     
    196195                acceptAll( translationUnit, pass1 );
    197196                acceptAll( translationUnit, pass2 );
    198                 AutogenerateRoutines::autogenerateRoutines( translationUnit );
     197                // need to collect all of the assignment operators prior to
     198                // this point and only generate assignment operators if one doesn't exist
     199                AddStructAssignment::addStructAssignment( translationUnit );
    199200                acceptAll( translationUnit, pass3 );
    200201        }
     
    500501        static const std::list< std::string > noLabels;
    501502
    502         void AutogenerateRoutines::autogenerateRoutines( std::list< Declaration * > &translationUnit ) {
    503                 AutogenerateRoutines visitor;
     503        void AddStructAssignment::addStructAssignment( std::list< Declaration * > &translationUnit ) {
     504                AddStructAssignment visitor;
    504505                acceptAndAdd( translationUnit, visitor, false );
    505506        }
     
    703704        }
    704705
    705         void AutogenerateRoutines::visit( EnumDecl *enumDecl ) {
     706        void AddStructAssignment::visit( EnumDecl *enumDecl ) {
    706707                if ( ! enumDecl->get_members().empty() ) {
    707708                        EnumInstType *enumInst = new EnumInstType( Type::Qualifiers(), enumDecl->get_name() );
     
    712713        }
    713714
    714         void AutogenerateRoutines::visit( StructDecl *structDecl ) {
     715        void AddStructAssignment::visit( StructDecl *structDecl ) {
    715716                if ( ! structDecl->get_members().empty() && structsDone.find( structDecl->get_name() ) == structsDone.end() ) {
    716717                        StructInstType *structInst = new StructInstType( Type::Qualifiers(), structDecl->get_name() );
     
    721722        }
    722723
    723         void AutogenerateRoutines::visit( UnionDecl *unionDecl ) {
     724        void AddStructAssignment::visit( UnionDecl *unionDecl ) {
    724725                if ( ! unionDecl->get_members().empty() ) {
    725726                        UnionInstType *unionInst = new UnionInstType( Type::Qualifiers(), unionDecl->get_name() );
     
    729730        }
    730731
    731         void AutogenerateRoutines::visit( TypeDecl *typeDecl ) {
     732        void AddStructAssignment::visit( TypeDecl *typeDecl ) {
    732733                CompoundStmt *stmts = 0;
    733734                TypeInstType *typeInst = new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), false );
     
    757758        }
    758759
    759         void AutogenerateRoutines::visit( FunctionType *) {
     760        void AddStructAssignment::visit( FunctionType *) {
    760761                // ensure that we don't add assignment ops for types defined as part of the function
    761762        }
    762763
    763         void AutogenerateRoutines::visit( PointerType *) {
     764        void AddStructAssignment::visit( PointerType *) {
    764765                // ensure that we don't add assignment ops for types defined as part of the pointer
    765766        }
    766767
    767         void AutogenerateRoutines::visit( ContextDecl *) {
     768        void AddStructAssignment::visit( ContextDecl *) {
    768769                // ensure that we don't add assignment ops for types defined as part of the context
    769770        }
    770771
    771772        template< typename StmtClass >
    772         inline void AutogenerateRoutines::visitStatement( StmtClass *stmt ) {
     773        inline void AddStructAssignment::visitStatement( StmtClass *stmt ) {
    773774                std::set< std::string > oldStructs = structsDone;
    774775                addVisit( stmt, *this );
     
    776777        }
    777778
    778         void AutogenerateRoutines::visit( FunctionDecl *functionDecl ) {
     779        void AddStructAssignment::visit( FunctionDecl *functionDecl ) {
    779780                maybeAccept( functionDecl->get_functionType(), *this );
    780781                acceptAll( functionDecl->get_oldDecls(), *this );
     
    784785        }
    785786
    786         void AutogenerateRoutines::visit( CompoundStmt *compoundStmt ) {
     787        void AddStructAssignment::visit( CompoundStmt *compoundStmt ) {
    787788                visitStatement( compoundStmt );
    788789        }
    789790
    790         void AutogenerateRoutines::visit( IfStmt *ifStmt ) {
     791        void AddStructAssignment::visit( IfStmt *ifStmt ) {
    791792                visitStatement( ifStmt );
    792793        }
    793794
    794         void AutogenerateRoutines::visit( WhileStmt *whileStmt ) {
     795        void AddStructAssignment::visit( WhileStmt *whileStmt ) {
    795796                visitStatement( whileStmt );
    796797        }
    797798
    798         void AutogenerateRoutines::visit( ForStmt *forStmt ) {
     799        void AddStructAssignment::visit( ForStmt *forStmt ) {
    799800                visitStatement( forStmt );
    800801        }
    801802
    802         void AutogenerateRoutines::visit( SwitchStmt *switchStmt ) {
     803        void AddStructAssignment::visit( SwitchStmt *switchStmt ) {
    803804                visitStatement( switchStmt );
    804805        }
    805806
    806         void AutogenerateRoutines::visit( ChooseStmt *switchStmt ) {
     807        void AddStructAssignment::visit( ChooseStmt *switchStmt ) {
    807808                visitStatement( switchStmt );
    808809        }
    809810
    810         void AutogenerateRoutines::visit( CaseStmt *caseStmt ) {
     811        void AddStructAssignment::visit( CaseStmt *caseStmt ) {
    811812                visitStatement( caseStmt );
    812813        }
    813814
    814         void AutogenerateRoutines::visit( CatchStmt *cathStmt ) {
     815        void AddStructAssignment::visit( CatchStmt *cathStmt ) {
    815816                visitStatement( cathStmt );
    816817        }
     
    856857                        Type * t1 = tyDecl->get_base();
    857858                        Type * t2 = typedefNames[ tyDecl->get_name() ].first->get_base();
    858                         if ( ! ResolvExpr::typesCompatible( t1, t2, Indexer() ) ) {
     859                        if ( ! typeEquals( t1, t2, true ) ) {
    859860                                throw SemanticError( "cannot redefine typedef: " + tyDecl->get_name() );
    860861                        }
  • src/SynTree/ObjectDecl.cc

    r63afee0 r258eb5c9  
    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 : Tue Sep 29 14:13:01 2015
    13 // Update Count     : 18
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Mon Jul 13 18:08:27 2015
     13// Update Count     : 16
    1414//
    1515
     
    5252                get_type()->print( os, indent );
    5353        } else {
    54                 os << " untyped entity ";
     54                os << "untyped entity ";
    5555        } // if
    5656
    5757        if ( init ) {
    58                 os << " with initializer ";
     58                os << "with initializer ";
    5959                init->print( os, indent );
    6060        } // if
    6161
    6262        if ( bitfieldWidth ) {
    63                 os << " with bitfield width ";
     63                os << "with bitfield width ";
    6464                bitfieldWidth->print( os );
    6565        } // if
  • src/libcfa/prelude.cf

    r63afee0 r258eb5c9  
    77// Author           : Glen Ditchfield
    88// Created On       : Sat Nov 29 07:23:41 2014
    9 // Last Modified By : Rob Schluntz
    10 // Last Modified On : Thu Nov 19 11:09:47 2015
    11 // Update Count     : 76
     9// Last Modified By : Peter A. Buhr
     10// Last Modified On : Tue Jun  9 14:43:47 2015
     11// Update Count     : 75
    1212//
    1313
Note: See TracChangeset for help on using the changeset viewer.