Changes in / [37466ba0:c469f43]
- Location:
- src
- Files:
-
- 4 edited
-
GenPoly/InstantiateGeneric.cc (modified) (3 diffs)
-
SymTab/Validate.cc (modified) (2 diffs)
-
SynTree/PointerType.cc (modified) (2 diffs)
-
SynTree/Type.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/InstantiateGeneric.cc
r37466ba0 rc469f43 233 233 } else { 234 234 // normalize possibly dtype-static parameter type 235 out.push_back( new TypeExpr{ 235 out.push_back( new TypeExpr{ 236 236 ScrubTyVars::scrubAll( paramType->get_type()->clone() ) } ); 237 237 gt |= genericType::concrete; … … 369 369 DeclMutator::addDeclaration( concDecl ); 370 370 insert( inst, typeSubs, concDecl ); 371 concDecl->acceptMutator( *this ); // recursively instantiate members372 371 } 373 372 StructInstType *newInst = new StructInstType( inst->get_qualifiers(), concDecl->get_name() ); … … 424 423 DeclMutator::addDeclaration( concDecl ); 425 424 insert( inst, typeSubs, concDecl ); 426 concDecl->acceptMutator( *this ); // recursively instantiate members427 425 } 428 426 UnionInstType *newInst = new UnionInstType( inst->get_qualifiers(), concDecl->get_name() ); -
src/SymTab/Validate.cc
r37466ba0 rc469f43 240 240 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 241 241 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 242 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist243 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors244 242 Concurrency::applyKeywords( translationUnit ); 245 243 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass 246 244 Concurrency::implementMutexFuncs( translationUnit ); 247 245 Concurrency::implementThreadStarter( translationUnit ); 246 acceptAll( translationUnit, epc ); 248 247 ReturnChecker::checkFunctionReturns( translationUnit ); 249 248 compoundliteral.mutateDeclarationList( translationUnit ); 250 249 acceptAll( translationUnit, pass3 ); 250 VerifyCtorDtorAssign::verify( translationUnit ); 251 251 ArrayLength::computeLength( translationUnit ); 252 252 } … … 817 817 throw SemanticError( "Constructors, destructors, and assignment functions require at least one parameter ", funcDecl ); 818 818 } 819 PointerType * ptrType = dynamic_cast< PointerType * >( params.front()->get_type() ); 820 if ( ! ptrType || ptrType->is_array() ) { 819 if ( ! dynamic_cast< PointerType * >( params.front()->get_type() ) ) { 821 820 throw SemanticError( "First parameter of a constructor, destructor, or assignment function must be a pointer ", funcDecl ); 822 821 } -
src/SynTree/PointerType.cc
r37466ba0 rc469f43 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // PointerType.cc -- 7 // PointerType.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 38 38 void PointerType::print( std::ostream &os, int indent ) const { 39 39 Type::print( os, indent ); 40 if ( ! is_array() ) { 41 os << "pointer to "; 42 } else { 43 os << "decayed "; 44 if ( isStatic ) { 45 os << "static "; 46 } // if 47 if ( isVarLen ) { 48 os << "variable length array of "; 49 } else if ( dimension ) { 50 os << "array of "; 51 dimension->print( os, indent ); 52 os << " "; 53 } // if 54 } 40 os << "pointer to "; 41 if ( isStatic ) { 42 os << "static "; 43 } // if 44 if ( isVarLen ) { 45 os << "variable length array of "; 46 } else if ( dimension ) { 47 os << "array of "; 48 dimension->print( os, indent ); 49 } // if 55 50 if ( base ) { 56 51 base->print( os, indent ); -
src/SynTree/Type.h
r37466ba0 rc469f43 247 247 void set_isStatic( bool newValue ) { isStatic = newValue; } 248 248 249 bool is_array() const { return isStatic || isVarLen || dimension; }250 251 249 virtual PointerType *clone() const { return new PointerType( *this ); } 252 250 virtual void accept( Visitor & v ) { v.visit( this ); }
Note:
See TracChangeset
for help on using the changeset viewer.