Changes in / [63afee0:258eb5c9]
- Location:
- src
- Files:
-
- 12 edited
-
Parser/LinkageSpec.cc (modified) (2 diffs)
-
Parser/LinkageSpec.h (modified) (2 diffs)
-
ResolvExpr/CastCost.cc (modified) (3 diffs)
-
ResolvExpr/PtrsAssignable.cc (modified) (2 diffs)
-
ResolvExpr/PtrsCastable.cc (modified) (2 diffs)
-
ResolvExpr/Unify.cc (modified) (6 diffs)
-
SymTab/IdTable.cc (modified) (5 diffs)
-
SymTab/Mangler.cc (modified) (5 diffs)
-
SymTab/Mangler.h (modified) (4 diffs)
-
SymTab/Validate.cc (modified) (14 diffs)
-
SynTree/ObjectDecl.cc (modified) (2 diffs)
-
libcfa/prelude.cf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/LinkageSpec.cc
r63afee0 r258eb5c9 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:22:09 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 19 15:53:05201513 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 16 13:23:21 2015 13 // Update Count : 2 14 14 // 15 15 … … 79 79 } 80 80 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 96 81 bool LinkageSpec::isBuiltin( Type t ) { 97 82 switch ( t ) { -
src/Parser/LinkageSpec.h
r63afee0 r258eb5c9 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 13:24:28 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Tue Aug 18 14:11:55201513 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 16 13:26:14 2015 13 // Update Count : 3 14 14 // 15 15 … … 34 34 static bool isGeneratable( Type ); 35 35 static bool isOverloadable( Type ); 36 static bool isOverridable( Type );37 36 static bool isBuiltin( Type ); 38 37 }; -
src/ResolvExpr/CastCost.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 06:57:43 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon Oct 05 14:48:45201513 // Update Count : 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 06:59:10 2015 13 // Update Count : 2 14 14 // 15 15 … … 56 56 return Cost::infinity; 57 57 } else { 58 // xxx - why are we adding cost 0 here?59 58 return converter.get_cost() + Cost( 0, 0, 0 ); 60 59 } // if … … 83 82 newEnv.add( pointerType->get_forall() ); 84 83 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 ) { 87 86 cost = Cost( 0, 0, 1 ); 88 } else if ( castResult < 0 ) {87 } else if ( assignResult < 0 ) { 89 88 cost = Cost( 1, 0, 0 ); 90 89 } // if -
src/ResolvExpr/PtrsAssignable.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 11:44:11 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon Sep 21 14:34:58201513 // Update Count : 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 11:47:36 2015 13 // Update Count : 2 14 14 // 15 15 … … 106 106 void PtrsAssignable::visit( TypeInstType *inst ) { 107 107 EqvClass eqvClass; 108 if ( env.lookup( inst->get_name(), eqvClass ) && eqvClass.type) {108 if ( env.lookup( inst->get_name(), eqvClass ) ) { 109 109 result = ptrsAssignable( eqvClass.type, dest, env ); 110 110 } else { -
src/ResolvExpr/PtrsCastable.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 11:48:00 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Mon Oct 05 14:49:12201513 // Update Count : 711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 11:51:17 2015 13 // Update Count : 2 14 14 // 15 15 … … 133 133 134 134 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; 136 136 } 137 137 -
src/ResolvExpr/Unify.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:27:10 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Sep 02 14:43:22201513 // Update Count : 3611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 26 14:57:05 2015 13 // Update Count : 7 14 14 // 15 15 … … 28 28 29 29 30 // #define DEBUG30 //#define DEBUG 31 31 32 32 namespace ResolvExpr { … … 80 80 bool typesCompatible( Type *first, Type *second, const SymTab::Indexer &indexer, const TypeEnvironment &env ) { 81 81 TypeEnvironment newEnv; 82 OpenVarSet openVars , closedVars; // added closedVars82 OpenVarSet openVars; 83 83 AssertionSet needAssertions, haveAssertions; 84 84 Type *newFirst = first->clone(), *newSecond = second->clone(); 85 85 env.apply( newFirst ); 86 86 env.apply( newSecond ); 87 88 // do we need to do this? Seems like we do, types should be able to be compatible if they89 // have free variables that can unify90 findOpenVars( newFirst, openVars, closedVars, needAssertions, haveAssertions, false );91 findOpenVars( newSecond, openVars, closedVars, needAssertions, haveAssertions, true );92 93 87 bool result = unifyExact( newFirst, newSecond, newEnv, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 94 88 delete newFirst; … … 431 425 432 426 void Unify::visit(ArrayType *arrayType) { 427 // XXX -- compare array dimension 433 428 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() ) { 460 430 result = unifyExact( arrayType->get_base(), otherArray->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ); 461 431 } // if … … 465 435 bool unifyDeclList( Iterator1 list1Begin, Iterator1 list1End, Iterator2 list2Begin, Iterator2 list2End, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, const SymTab::Indexer &indexer ) { 466 436 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 ) ) {469 437 if ( ! unifyExact( (*list1Begin)->get_type(), (*list2Begin)->get_type(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer ) ) { 470 438 return false; … … 481 449 FunctionType *otherFunction = dynamic_cast< FunctionType* >( type2 ); 482 450 if ( otherFunction && functionType->get_isVarArgs() == otherFunction->get_isVarArgs() ) { 483 451 484 452 if ( unifyDeclList( functionType->get_parameters().begin(), functionType->get_parameters().end(), otherFunction->get_parameters().begin(), otherFunction->get_parameters().end(), env, needAssertions, haveAssertions, openVars, indexer ) ) { 485 453 -
src/SymTab/IdTable.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 17:04:02 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Oct 07 12:21:13 201513 // Update Count : 7311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 17:07:43 2015 13 // Update Count : 3 14 14 // 15 15 … … 37 37 for ( InnerTableType::iterator inner = outer->second.begin(); inner != outer->second.end(); ++inner ) { 38 38 std::stack< DeclEntry >& entry = inner->second; 39 // xxx - should be while?40 39 if ( ! entry.empty() && entry.top().second == scopeLevel ) { 41 40 entry.pop(); … … 53 52 if ( decl->get_linkage() == LinkageSpec::C ) { 54 53 manglename = name; 55 } else if ( LinkageSpec::isOverridable( decl->get_linkage() ) ) {56 // mangle the name without including the appropriate suffix57 // this will make it so that overridable routines are placed58 // into the same "bucket" as their user defined versions.59 manglename = Mangler::mangle( decl, false );60 54 } else { 61 55 manglename = Mangler::mangle( decl ); … … 66 60 67 61 if ( it == declTable.end() ) { 68 // first time this name mangling has been defined69 62 declTable[ manglename ].push( DeclEntry( decl, scopeLevel ) ); 70 63 } else { 71 64 std::stack< DeclEntry >& entry = it->second; 72 65 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() ) ) { 85 67 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 ); 91 71 } 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 okay94 // xxx - perhaps it's actually if either is intrinsic then this is okay?95 // might also need to be same storage class?96 72 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 ); 100 76 } // if 101 77 } // if … … 104 80 } // if 105 81 } else { 106 // new scope level - shadow existing definition107 82 declTable[ manglename ].push( DeclEntry( decl, scopeLevel ) ); 108 83 } // if 109 84 } // if 110 // this ensures that no two declarations with the same unmangled name both have C linkage85 // ensure the set of routines with C linkage cannot be overloaded 111 86 for ( InnerTableType::iterator i = declTable.begin(); i != declTable.end(); ++i ) { 112 87 if ( ! i->second.empty() && i->second.top().first->get_linkage() == LinkageSpec::C && declTable.size() > 1 ) { -
src/SymTab/Mangler.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:40:29 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 19 15:52:24201513 // Update Count : 1911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 8 15:12:12 2015 13 // Update Count : 8 14 14 // 15 15 … … 30 30 31 31 namespace SymTab { 32 Mangler::Mangler( bool mangleOverridable ) : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ) {32 Mangler::Mangler() : nextVarNum( 0 ), isTopLevel( true ) { 33 33 } 34 34 … … 41 41 nextVarNum = rhs.nextVarNum; 42 42 isTopLevel = rhs.isTopLevel; 43 mangleOverridable = rhs.mangleOverridable;44 43 } 45 44 … … 60 59 mangleName << "__"; 61 60 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 mangling65 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 change71 assert( false );72 } // if73 }74 61 isTopLevel = wasTopLevel; 75 62 } … … 227 214 varNums[ (*i )->get_name() ] = std::pair< int, int >( nextVarNum++, (int )(*i )->get_kind() ); 228 215 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; 230 217 sub_mangler.nextVarNum = nextVarNum; 231 218 sub_mangler.isTopLevel = false; -
src/SymTab/Mangler.h
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:44:03 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Aug 19 15:48:46201513 // Update Count : 1411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 8 14:47:14 2015 13 // Update Count : 5 14 14 // 15 15 … … 25 25 public: 26 26 template< typename SynTreeClass > 27 static std::string mangle( SynTreeClass *decl , bool mangleOverridable = true); // interface to clients27 static std::string mangle( SynTreeClass *decl ); // interface to clients 28 28 29 29 /// using Visitor::visit; … … 50 50 int nextVarNum; 51 51 bool isTopLevel; 52 bool mangleOverridable;53 52 54 Mangler( bool mangleOverridable);53 Mangler(); 55 54 Mangler( const Mangler & ); 56 55 … … 62 61 63 62 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; 66 65 maybeAccept( decl, mangler ); 67 66 return mangler.get_mangleName(); -
src/SymTab/Validate.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : T hu Nov 19 10:44:55 201513 // Update Count : 19 911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 11 16:59:35 2015 13 // Update Count : 196 14 14 // 15 15 … … 54 54 #include "MakeLibCfa.h" 55 55 #include "TypeEquality.h" 56 #include "ResolvExpr/typeops.h"57 56 58 57 #define debugPrint( x ) if ( doDebug ) { std::cout << x; } … … 126 125 }; 127 126 128 class A utogenerateRoutines: public Visitor {127 class AddStructAssignment : public Visitor { 129 128 public: 130 129 /// Generates assignment operators for aggregate types as required 131 static void a utogenerateRoutines( std::list< Declaration * > &translationUnit );130 static void addStructAssignment( std::list< Declaration * > &translationUnit ); 132 131 133 132 std::list< Declaration * > &get_declsToAdd() { return declsToAdd; } … … 152 151 virtual void visit( CatchStmt *catchStmt ); 153 152 154 A utogenerateRoutines() : functionNesting( 0 ) {}153 AddStructAssignment() : functionNesting( 0 ) {} 155 154 private: 156 155 template< typename StmtClass > void visitStatement( StmtClass *stmt ); … … 196 195 acceptAll( translationUnit, pass1 ); 197 196 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 ); 199 200 acceptAll( translationUnit, pass3 ); 200 201 } … … 500 501 static const std::list< std::string > noLabels; 501 502 502 void A utogenerateRoutines::autogenerateRoutines( std::list< Declaration * > &translationUnit ) {503 A utogenerateRoutinesvisitor;503 void AddStructAssignment::addStructAssignment( std::list< Declaration * > &translationUnit ) { 504 AddStructAssignment visitor; 504 505 acceptAndAdd( translationUnit, visitor, false ); 505 506 } … … 703 704 } 704 705 705 void A utogenerateRoutines::visit( EnumDecl *enumDecl ) {706 void AddStructAssignment::visit( EnumDecl *enumDecl ) { 706 707 if ( ! enumDecl->get_members().empty() ) { 707 708 EnumInstType *enumInst = new EnumInstType( Type::Qualifiers(), enumDecl->get_name() ); … … 712 713 } 713 714 714 void A utogenerateRoutines::visit( StructDecl *structDecl ) {715 void AddStructAssignment::visit( StructDecl *structDecl ) { 715 716 if ( ! structDecl->get_members().empty() && structsDone.find( structDecl->get_name() ) == structsDone.end() ) { 716 717 StructInstType *structInst = new StructInstType( Type::Qualifiers(), structDecl->get_name() ); … … 721 722 } 722 723 723 void A utogenerateRoutines::visit( UnionDecl *unionDecl ) {724 void AddStructAssignment::visit( UnionDecl *unionDecl ) { 724 725 if ( ! unionDecl->get_members().empty() ) { 725 726 UnionInstType *unionInst = new UnionInstType( Type::Qualifiers(), unionDecl->get_name() ); … … 729 730 } 730 731 731 void A utogenerateRoutines::visit( TypeDecl *typeDecl ) {732 void AddStructAssignment::visit( TypeDecl *typeDecl ) { 732 733 CompoundStmt *stmts = 0; 733 734 TypeInstType *typeInst = new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), false ); … … 757 758 } 758 759 759 void A utogenerateRoutines::visit( FunctionType *) {760 void AddStructAssignment::visit( FunctionType *) { 760 761 // ensure that we don't add assignment ops for types defined as part of the function 761 762 } 762 763 763 void A utogenerateRoutines::visit( PointerType *) {764 void AddStructAssignment::visit( PointerType *) { 764 765 // ensure that we don't add assignment ops for types defined as part of the pointer 765 766 } 766 767 767 void A utogenerateRoutines::visit( ContextDecl *) {768 void AddStructAssignment::visit( ContextDecl *) { 768 769 // ensure that we don't add assignment ops for types defined as part of the context 769 770 } 770 771 771 772 template< typename StmtClass > 772 inline void A utogenerateRoutines::visitStatement( StmtClass *stmt ) {773 inline void AddStructAssignment::visitStatement( StmtClass *stmt ) { 773 774 std::set< std::string > oldStructs = structsDone; 774 775 addVisit( stmt, *this ); … … 776 777 } 777 778 778 void A utogenerateRoutines::visit( FunctionDecl *functionDecl ) {779 void AddStructAssignment::visit( FunctionDecl *functionDecl ) { 779 780 maybeAccept( functionDecl->get_functionType(), *this ); 780 781 acceptAll( functionDecl->get_oldDecls(), *this ); … … 784 785 } 785 786 786 void A utogenerateRoutines::visit( CompoundStmt *compoundStmt ) {787 void AddStructAssignment::visit( CompoundStmt *compoundStmt ) { 787 788 visitStatement( compoundStmt ); 788 789 } 789 790 790 void A utogenerateRoutines::visit( IfStmt *ifStmt ) {791 void AddStructAssignment::visit( IfStmt *ifStmt ) { 791 792 visitStatement( ifStmt ); 792 793 } 793 794 794 void A utogenerateRoutines::visit( WhileStmt *whileStmt ) {795 void AddStructAssignment::visit( WhileStmt *whileStmt ) { 795 796 visitStatement( whileStmt ); 796 797 } 797 798 798 void A utogenerateRoutines::visit( ForStmt *forStmt ) {799 void AddStructAssignment::visit( ForStmt *forStmt ) { 799 800 visitStatement( forStmt ); 800 801 } 801 802 802 void A utogenerateRoutines::visit( SwitchStmt *switchStmt ) {803 void AddStructAssignment::visit( SwitchStmt *switchStmt ) { 803 804 visitStatement( switchStmt ); 804 805 } 805 806 806 void A utogenerateRoutines::visit( ChooseStmt *switchStmt ) {807 void AddStructAssignment::visit( ChooseStmt *switchStmt ) { 807 808 visitStatement( switchStmt ); 808 809 } 809 810 810 void A utogenerateRoutines::visit( CaseStmt *caseStmt ) {811 void AddStructAssignment::visit( CaseStmt *caseStmt ) { 811 812 visitStatement( caseStmt ); 812 813 } 813 814 814 void A utogenerateRoutines::visit( CatchStmt *cathStmt ) {815 void AddStructAssignment::visit( CatchStmt *cathStmt ) { 815 816 visitStatement( cathStmt ); 816 817 } … … 856 857 Type * t1 = tyDecl->get_base(); 857 858 Type * t2 = typedefNames[ tyDecl->get_name() ].first->get_base(); 858 if ( ! ResolvExpr::typesCompatible( t1, t2, Indexer()) ) {859 if ( ! typeEquals( t1, t2, true ) ) { 859 860 throw SemanticError( "cannot redefine typedef: " + tyDecl->get_name() ); 860 861 } -
src/SynTree/ObjectDecl.cc
r63afee0 r258eb5c9 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Tue Sep 29 14:13:01201513 // Update Count : 1 811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 13 18:08:27 2015 13 // Update Count : 16 14 14 // 15 15 … … 52 52 get_type()->print( os, indent ); 53 53 } else { 54 os << " untyped entity ";54 os << "untyped entity "; 55 55 } // if 56 56 57 57 if ( init ) { 58 os << " with initializer ";58 os << "with initializer "; 59 59 init->print( os, indent ); 60 60 } // if 61 61 62 62 if ( bitfieldWidth ) { 63 os << " with bitfield width ";63 os << "with bitfield width "; 64 64 bitfieldWidth->print( os ); 65 65 } // if -
src/libcfa/prelude.cf
r63afee0 r258eb5c9 7 7 // Author : Glen Ditchfield 8 8 // Created On : Sat Nov 29 07:23:41 2014 9 // Last Modified By : Rob Schluntz10 // Last Modified On : T hu Nov 19 11:09:47 201511 // Update Count : 7 69 // Last Modified By : Peter A. Buhr 10 // Last Modified On : Tue Jun 9 14:43:47 2015 11 // Update Count : 75 12 12 // 13 13
Note:
See TracChangeset
for help on using the changeset viewer.