- Timestamp:
- Oct 19, 2017, 11:13:11 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bfd4974
- Parents:
- bd7e609
- git-author:
- Rob Schluntz <rschlunt@…> (10/11/17 17:20:30)
- git-committer:
- Rob Schluntz <rschlunt@…> (10/19/17 11:13:11)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
rbd7e609 r189d800 54 54 }; 55 55 56 struct AutogenerateRoutines final : public WithDeclsToAdd, public WithVisitorRef<AutogenerateRoutines>, public WithGuards, public WithShortCircuiting {56 struct AutogenerateRoutines final : public WithDeclsToAdd, public WithVisitorRef<AutogenerateRoutines>, public WithGuards, public WithShortCircuiting, public WithIndexer { 57 57 AutogenerateRoutines(); 58 58 … … 194 194 Type *refType; 195 195 unsigned int functionNesting; 196 const std::list< TypeDecl* > & typeParams;197 196 OutputIterator out; 198 FuncGenerator( const Container & container, Type *refType, unsigned int functionNesting, const std::list< TypeDecl* > & typeParams, OutputIterator out ) : container( container ), refType( refType ), functionNesting( functionNesting ), typeParams( typeParams ), out( out ) {} 197 FuncGenerator( const Container & container, Type *refType, unsigned int functionNesting, OutputIterator out ) : container( container ), refType( refType ), functionNesting( functionNesting ), out( out ) {} 198 199 const std::list< TypeDecl * > getGenericParams( Type * t ) { 200 std::list< TypeDecl * > * ret = nullptr; 201 if ( StructInstType * inst = dynamic_cast< StructInstType * > ( t ) ) { 202 ret = inst->get_baseParameters(); 203 } else if ( UnionInstType * inst = dynamic_cast< UnionInstType * >( t ) ) { 204 ret = inst->get_baseParameters(); 205 } 206 return ret ? *ret : std::list< TypeDecl * >(); 207 } 199 208 200 209 /// generates a function (?{}, ?=?, ^?{}) based on the data argument and members. If function is generated, inserts the type into the map. 201 210 void gen( const FuncData & data, bool concurrent_type ) { 202 if ( ! shouldGenerate( data.map, container ) ) return; 211 // Make function polymorphic in same parameters as generic struct, if applicable 212 std::list< TypeDecl * > typeParams = getGenericParams( refType ); // List of type variables to be placed on the generated functions 213 203 214 FunctionType * ftype = data.genType( refType ); 204 215 … … 214 225 215 226 template< typename OutputIterator, typename Container > 216 FuncGenerator<OutputIterator, Container> makeFuncGenerator( const Container & container, Type *refType, unsigned int functionNesting, const std::list< TypeDecl* > & typeParams,OutputIterator out ) {217 return FuncGenerator<OutputIterator, Container>( container, refType, functionNesting, typeParams,out );227 FuncGenerator<OutputIterator, Container> makeFuncGenerator( const Container & container, Type *refType, unsigned int functionNesting, OutputIterator out ) { 228 return FuncGenerator<OutputIterator, Container>( container, refType, functionNesting, out ); 218 229 } 219 230 … … 243 254 // E ?=?(E volatile*, int), 244 255 // ?=?(E _Atomic volatile*, int); 245 void makeEnumFunctions( EnumInstType *refType, unsigned int functionNesting, std::list< Declaration * > &declsToAdd ) {256 void makeEnumFunctions( EnumInstType *refType, unsigned int functionNesting, std::list< Declaration * > &declsToAdd, SymTab::Indexer & indexer ) { 246 257 247 258 // T ?=?(E *, E); … … 278 289 declsToAdd.push_back( dtorDecl ); 279 290 declsToAdd.push_back( assignDecl ); // assignment should come last since it uses copy constructor in return 291 292 indexer.addId( ctorDecl ); 293 indexer.addId( copyCtorDecl ); 294 indexer.addId( dtorDecl ); 295 indexer.addId( assignDecl ); 280 296 } 281 297 … … 306 322 } 307 323 308 if ( field->get_name() == "" ) {309 // don't assign to anonymous members310 // xxx - this is a temporary fix. Anonymous members tie into311 // our inheritance model. I think the correct way to handle this is to312 // cast the structure to the type of the member and let the resolver313 // figure out whether it's valid and have a pass afterwards that fixes314 // the assignment to use pointer arithmetic with the offset of the315 // member, much like how generic type members are handled.316 continue;317 }318 319 324 assert( ! func->get_functionType()->get_parameters().empty() ); 320 325 ObjectDecl * dstParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().front() ); … … 348 353 if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( field ) ) ) { 349 354 // don't make a function whose parameter is an unnamed bitfield 350 continue;351 } else if ( field->get_name() == "" ) {352 // don't assign to anonymous members353 // xxx - this is a temporary fix. Anonymous members tie into354 // our inheritance model. I think the correct way to handle this is to355 // cast the structure to the type of the member and let the resolver356 // figure out whether it's valid and have a pass afterwards that fixes357 // the assignment to use pointer arithmetic with the offset of the358 // member, much like how generic type members are handled.359 355 continue; 360 356 } else if ( parameter != params.end() ) { … … 379 375 380 376 /// generates struct constructors, destructor, and assignment functions 381 void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, const std::vector< FuncData > & data ) {377 void makeStructFunctions( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, const std::vector< FuncData > & data, SymTab::Indexer & indexer ) { 382 378 // Builtins do not use autogeneration. 383 379 if ( LinkageSpec::isBuiltin( aggregateDecl->get_linkage() ) ) { … … 385 381 } 386 382 387 // Make function polymorphic in same parameters as generic struct, if applicable388 const std::list< TypeDecl * > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions389 390 383 // generate each of the functions based on the supplied FuncData objects 391 384 std::list< FunctionDecl * > newFuncs; 392 385 // structure that iterates aggregate decl members, returning their types 393 auto generator = makeFuncGenerator( lazy_map( aggregateDecl->members, declToType ), refType, functionNesting, typeParams,back_inserter( newFuncs ) );386 auto generator = makeFuncGenerator( lazy_map( aggregateDecl->members, declToType ), refType, functionNesting, back_inserter( newFuncs ) ); 394 387 for ( const FuncData & d : data ) { 395 388 generator.gen( d, aggregateDecl->is_thread() || aggregateDecl->is_monitor() ); 396 389 } 397 390 398 // field ctors are only generated if default constructor and copy constructor are both generated 399 unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return CodeGen::isConstructor( dcl->get_name() ); } ); 400 401 if ( functionNesting == 0 ) { 402 // forward declare if top-level struct, so that 403 // type is complete as soon as its body ends 404 // Note: this is necessary if we want structs which contain 405 // generic (otype) structs as members. 406 for ( FunctionDecl * dcl : newFuncs ) { 407 addForwardDecl( dcl, declsToAdd ); 408 } 409 } 410 391 std::list< Declaration * > definitions, forwards; 411 392 for ( FunctionDecl * dcl : newFuncs ) { 412 393 // generate appropriate calls to member ctor, assignment 413 394 // destructor needs to do everything in reverse, so pass "forward" based on whether the function is a destructor 414 395 if ( ! CodeGen::isDestructor( dcl->get_name() ) ) { 415 makeStructFunctionBody( aggregateDecl-> get_members().begin(), aggregateDecl->get_members().end(), dcl );396 makeStructFunctionBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), dcl ); 416 397 } else { 417 makeStructFunctionBody( aggregateDecl-> get_members().rbegin(), aggregateDecl->get_members().rend(), dcl, false );418 } 419 if ( CodeGen::isAssignment( dcl-> get_name()) ) {398 makeStructFunctionBody( aggregateDecl->members.rbegin(), aggregateDecl->members.rend(), dcl, false ); 399 } 400 if ( CodeGen::isAssignment( dcl->name ) ) { 420 401 // assignment needs to return a value 421 402 FunctionType * assignType = dcl->get_functionType(); 422 assert( assignType->get_parameters().size() == 2 ); 423 ObjectDecl * srcParam = strict_dynamic_cast< ObjectDecl * >( assignType->get_parameters().back() ); 424 dcl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) ); 425 } 426 declsToAdd.push_back( dcl ); 427 } 403 assert( assignType->parameters.size() == 2 ); 404 assert( assignType->returnVals.size() == 1 ); 405 ObjectDecl * srcParam = strict_dynamic_cast< ObjectDecl * >( assignType->parameters.back() ); 406 ObjectDecl * retParam = strict_dynamic_cast< ObjectDecl * >( assignType->returnVals.front() ); 407 408 dcl->statements->push_back( new ExprStmt( noLabels, new UntypedExpr( new NameExpr("?{}"), { new VariableExpr( retParam ), new VariableExpr( srcParam ) } ) ) ); 409 dcl->statements->push_back( new ReturnStmt( noLabels, new VariableExpr( retParam ) ) ); 410 } 411 412 try { 413 ResolvExpr::resolveDecl( dcl, indexer ); 414 } catch ( SemanticError err ) { 415 // okay if decl does not resolve - that means the function should not be generated 416 delete dcl; 417 continue; 418 } 419 420 if ( functionNesting == 0 ) { 421 // forward declare if top-level struct, so that 422 // type is complete as soon as its body ends 423 // Note: this is necessary if we want structs which contain 424 // generic (otype) structs as members. 425 addForwardDecl( dcl, forwards ); 426 } 427 definitions.push_back( dcl ); 428 indexer.addId( dcl ); 429 } 430 431 // field ctors are only generated if default constructor and copy constructor are both generated 432 unsigned numCtors = std::count_if( definitions.begin(), definitions.end(), [](Declaration * dcl) { return CodeGen::isConstructor( dcl->get_name() ); } ); 428 433 429 434 // create constructors which take each member type as a parameter. … … 433 438 // are generated, since they need access to both 434 439 if ( numCtors == 2 ) { 440 const auto & typeParams = aggregateDecl->parameters; 435 441 FunctionType * memCtorType = genDefaultType( refType ); 436 cloneAll( typeParams, memCtorType-> get_forall());437 for ( std::list<Declaration *>::iterator i = aggregateDecl->get_members().begin(); i != aggregateDecl->get_members().end(); ++i) {438 DeclarationWithType * member = dynamic_cast<DeclarationWithType *>( *i);439 assert( member);440 if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( member) ) ) {442 cloneAll( typeParams, memCtorType->forall ); 443 for ( Declaration * member : aggregateDecl->members ) { 444 DeclarationWithType * field = dynamic_cast<DeclarationWithType *>( member ); 445 assert( field ); 446 if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( field ) ) ) { 441 447 // don't make a function whose parameter is an unnamed bitfield 442 448 continue; 443 } else if ( member->get_name() == "" ) { 444 // don't assign to anonymous members 445 // xxx - this is a temporary fix. Anonymous members tie into 446 // our inheritance model. I think the correct way to handle this is to 447 // cast the structure to the type of the member and let the resolver 448 // figure out whether it's valid/choose the correct unnamed member 449 } 450 memCtorType->get_parameters().push_back( new ObjectDecl( field->get_name(), Type::StorageClasses(), LinkageSpec::Cforall, 0, field->get_type()->clone(), 0 ) ); 451 FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting ); 452 makeStructFieldCtorBody( aggregateDecl->members.begin(), aggregateDecl->members.end(), ctor ); 453 454 try { 455 ResolvExpr::resolveDecl( ctor, indexer ); 456 } catch ( SemanticError err ) { 457 // okay if decl does not resolve - that means the function should not be generated 458 delete ctor; 449 459 continue; 450 460 } 451 memCtorType->get_parameters().push_back( new ObjectDecl( member->get_name(), Type::StorageClasses(), LinkageSpec::Cforall, 0, member->get_type()->clone(), 0 ) ); 452 FunctionDecl * ctor = genFunc( "?{}", memCtorType->clone(), functionNesting ); 453 makeStructFieldCtorBody( aggregateDecl->get_members().begin(), aggregateDecl->get_members().end(), ctor ); 454 declsToAdd.push_back( ctor ); 461 definitions.push_back( ctor ); 455 462 } 456 463 delete memCtorType; 457 464 } 465 466 declsToAdd.splice( declsToAdd.end(), forwards ); 467 declsToAdd.splice( declsToAdd.end(), definitions ); 458 468 } 459 469 … … 483 493 484 494 /// generates union constructors, destructors, and assignment operator 485 void makeUnionFunctions( UnionDecl *aggregateDecl, UnionInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd ) {495 void makeUnionFunctions( UnionDecl *aggregateDecl, UnionInstType *refType, unsigned int functionNesting, std::list< Declaration * > & declsToAdd, SymTab::Indexer & indexer ) { 486 496 // Make function polymorphic in same parameters as generic union, if applicable 487 497 const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions … … 545 555 declsToAdd.push_back( dtorDecl ); 546 556 declsToAdd.push_back( assignDecl ); // assignment should come last since it uses copy constructor in return 557 558 indexer.addId( ctorDecl ); 559 indexer.addId( copyCtorDecl ); 560 indexer.addId( dtorDecl ); 561 indexer.addId( assignDecl ); 562 547 563 declsToAdd.splice( declsToAdd.end(), memCtors ); 548 564 } … … 558 574 559 575 void AutogenerateRoutines::previsit( EnumDecl * enumDecl ) { 560 visit_children = false;561 if ( ! enumDecl->get_members().empty() ) {576 // must visit children (enum constants) to add them to the indexer 577 if ( enumDecl->has_body() ) { 562 578 EnumInstType *enumInst = new EnumInstType( Type::Qualifiers(), enumDecl->get_name() ); 563 //enumInst->set_baseEnum( enumDecl );564 makeEnumFunctions( enumInst, functionNesting, declsToAddAfter );579 enumInst->set_baseEnum( enumDecl ); 580 makeEnumFunctions( enumInst, functionNesting, declsToAddAfter, indexer ); 565 581 } 566 582 } … … 572 588 for ( TypeDecl * typeDecl : structDecl->parameters ) { 573 589 // need to visit assertions so that they are added to the appropriate maps 574 acceptAll( typeDecl->assertions, *visitor );590 // acceptAll( typeDecl->assertions, *visitor ); 575 591 structInst.parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) ); 576 592 } 577 593 structInst.set_baseStruct( structDecl ); 578 makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data );594 makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data, indexer ); 579 595 structsDone.insert( structDecl->name ); 580 596 } // if … … 583 599 void AutogenerateRoutines::previsit( UnionDecl * unionDecl ) { 584 600 visit_children = false; 585 if ( ! unionDecl->get_members().empty()) {601 if ( unionDecl->has_body() /* && unionsDone.find( unionDecl->name ) == unionsDone.end() */ ) { 586 602 UnionInstType unionInst( Type::Qualifiers(), unionDecl->get_name() ); 587 603 unionInst.set_baseUnion( unionDecl ); … … 589 605 unionInst.get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) ); 590 606 } 591 makeUnionFunctions( unionDecl, &unionInst, functionNesting, declsToAddAfter );607 makeUnionFunctions( unionDecl, &unionInst, functionNesting, declsToAddAfter, indexer ); 592 608 } // if 593 609 } … … 608 624 std::list< FunctionDecl * > newFuncs; 609 625 std::list< Declaration * > tds { typeDecl }; 610 std::list< TypeDecl * > typeParams;611 626 TypeInstType refType( Type::Qualifiers(), typeDecl->name, typeDecl ); 612 auto generator = makeFuncGenerator( lazy_map( tds, declToTypeDeclBase ), &refType, functionNesting, typeParams,back_inserter( newFuncs ) );627 auto generator = makeFuncGenerator( lazy_map( tds, declToTypeDeclBase ), &refType, functionNesting, back_inserter( newFuncs ) ); 613 628 for ( const FuncData & d : data ) { 614 629 generator.gen( d, false ); -
src/tests/.expect/64/attributes.txt
rbd7e609 r189d800 78 78 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 79 79 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 80 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 80 81 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 81 82 } … … 89 90 ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1) /* ?{} */); 90 91 ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1) /* ?{} */); 92 ((void)((*___dst__R4sFdl_1).__anonymous_object0=___src__4sFdl_1.__anonymous_object0) /* ?{} */); 91 93 ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1) /* ?{} */); 92 94 } 93 95 static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){ 94 96 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ^?{} */); 97 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ^?{} */); 95 98 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ^?{} */); 96 99 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ^?{} */); … … 112 115 ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1)); 113 116 ((void)((*___dst__R4sFdl_1).__f8__i_1=___src__4sFdl_1.__f8__i_1)); 117 ((void)((*___dst__R4sFdl_1).__anonymous_object0=___src__4sFdl_1.__anonymous_object0)); 114 118 ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1)); 115 119 ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1)); … … 125 129 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 126 130 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 131 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 127 132 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 128 133 } … … 136 141 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 137 142 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 143 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 138 144 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 139 145 } … … 147 153 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 148 154 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 155 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 149 156 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 150 157 } … … 158 165 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 159 166 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 167 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 160 168 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 161 169 } … … 169 177 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 170 178 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 179 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 171 180 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 172 181 } … … 180 189 ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */); 181 190 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 191 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 182 192 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 183 193 } … … 191 201 ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */); 192 202 ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */); 203 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 193 204 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 194 205 } … … 202 213 ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */); 203 214 ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */); 204 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 205 } 206 static inline void ___constructor__F_R4sFdliiiiiiiiPi_autogen___1(struct Fdl *___dst__R4sFdl_1, signed int __f1__i_1, signed int __f2__i_1, signed int __f3__i_1, signed int __f4__i_1, signed int __f5__i_1, signed int __f6__i_1, signed int __f7__i_1, signed int __f8__i_1, signed int *__f9__Pi_1){ 215 ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */); 216 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 217 } 218 static inline void ___constructor__F_R4sFdliiiiiiiii_autogen___1(struct Fdl *___dst__R4sFdl_1, signed int __f1__i_1, signed int __f2__i_1, signed int __f3__i_1, signed int __f4__i_1, signed int __f5__i_1, signed int __f6__i_1, signed int __f7__i_1, signed int __f8__i_1, signed int __anonymous_object1){ 207 219 ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */); 208 220 ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */); … … 213 225 ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */); 214 226 ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */); 227 ((void)((*___dst__R4sFdl_1).__anonymous_object0=__anonymous_object1) /* ?{} */); 228 ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */); 229 } 230 static inline void ___constructor__F_R4sFdliiiiiiiiiPi_autogen___1(struct Fdl *___dst__R4sFdl_1, signed int __f1__i_1, signed int __f2__i_1, signed int __f3__i_1, signed int __f4__i_1, signed int __f5__i_1, signed int __f6__i_1, signed int __f7__i_1, signed int __f8__i_1, signed int __anonymous_object2, signed int *__f9__Pi_1){ 231 ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */); 232 ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */); 233 ((void)((*___dst__R4sFdl_1).__f3__i_1=__f3__i_1) /* ?{} */); 234 ((void)((*___dst__R4sFdl_1).__f4__i_1=__f4__i_1) /* ?{} */); 235 ((void)((*___dst__R4sFdl_1).__f5__i_1=__f5__i_1) /* ?{} */); 236 ((void)((*___dst__R4sFdl_1).__f6__i_1=__f6__i_1) /* ?{} */); 237 ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */); 238 ((void)((*___dst__R4sFdl_1).__f8__i_1=__f8__i_1) /* ?{} */); 239 ((void)((*___dst__R4sFdl_1).__anonymous_object0=__anonymous_object2) /* ?{} */); 215 240 ((void)((*___dst__R4sFdl_1).__f9__Pi_1=__f9__Pi_1) /* ?{} */); 216 241 } … … 232 257 __attribute__ ((unused)) signed int **const ___retval_f2__CPPi_1; 233 258 } 234 __attribute__ ((unused,used,unused)) signed int (*__f3__FPA0i_i__1(signed int __anonymous_object 1))[];259 __attribute__ ((unused,used,unused)) signed int (*__f3__FPA0i_i__1(signed int __anonymous_object3))[]; 235 260 __attribute__ ((unused,unused)) signed int (*__f3__FPA0i_i__1(signed int __p__i_1))[]{ 236 261 __attribute__ ((unused)) signed int (*___retval_f3__PA0i_1)[]; 237 262 } 238 __attribute__ ((unused,used,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object 2);239 __attribute__ ((unused,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object 3){240 __attribute__ ((unused)) signed int (*___retval_f4__PFi_i__1)(signed int __anonymous_object 4);263 __attribute__ ((unused,used,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object4); 264 __attribute__ ((unused,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object5){ 265 __attribute__ ((unused)) signed int (*___retval_f4__PFi_i__1)(signed int __anonymous_object6); 241 266 } 242 267 signed int __vtr__Fi___1(){ … … 268 293 signed int __tpr2__Fi_PPi__1(__attribute__ ((unused,unused,unused,unused,unused,unused)) signed int **__Foo__PPi_1); 269 294 signed int __tpr3__Fi_Pi__1(__attribute__ ((unused,unused,unused)) signed int *__Foo__Pi_1); 270 signed int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) signed int (*__anonymous_object 5)(__attribute__ ((unused,unused)) signed int __anonymous_object6[((unsigned long int )5)]));295 signed int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) signed int (*__anonymous_object7)(__attribute__ ((unused,unused)) signed int __anonymous_object8[((unsigned long int )5)])); 271 296 signed int __tpr5__Fi_PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__Foo__PFi___1)()); 272 297 signed int __tpr6__Fi_PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__Foo__PFi___1)()); 273 signed int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) signed int (*__anonymous_object 7)(__attribute__ ((unused)) signed int (*__anonymous_object8)(__attribute__ ((unused,unused)) signed int __anonymous_object9)));298 signed int __tpr7__Fi_PFi_PFi_i____1(__attribute__ ((unused,unused)) signed int (*__anonymous_object9)(__attribute__ ((unused)) signed int (*__anonymous_object10)(__attribute__ ((unused,unused)) signed int __anonymous_object11))); 274 299 signed int __ad__Fi___1(){ 275 300 __attribute__ ((unused)) signed int ___retval_ad__i_1; … … 324 349 ((void)sizeof(enum __anonymous5 )); 325 350 } 326 signed int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object1 0, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object11);327 signed int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object1 2, __attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object13);328 signed int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object1 4, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object15);329 signed int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object1 6)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object17)());330 signed int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object 18)(__attribute__ ((unused)) signed int __anonymous_object19), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object20)(__attribute__ ((unused)) signed int __anonymous_object21));331 signed int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object2 2)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object23)());332 signed int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object2 4)(__attribute__ ((unused)) signed int __anonymous_object25), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object26)(__attribute__ ((unused)) signed int __anonymous_object27));351 signed int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object12, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object13); 352 signed int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object14, __attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object15); 353 signed int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object16, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object17); 354 signed int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object18)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object19)()); 355 signed int __apd5__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object20)(__attribute__ ((unused)) signed int __anonymous_object21), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object22)(__attribute__ ((unused)) signed int __anonymous_object23)); 356 signed int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object24)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object25)()); 357 signed int __apd7__Fi_PFi_i_PFi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object26)(__attribute__ ((unused)) signed int __anonymous_object27), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object28)(__attribute__ ((unused)) signed int __anonymous_object29)); 333 358 struct Vad { 334 __attribute__ ((unused)) signed int __anonymous_object 28;335 __attribute__ ((unused,unused)) signed int *__anonymous_object 29;336 __attribute__ ((unused,unused)) signed int __anonymous_object3 0[((unsigned long int )10)];337 __attribute__ ((unused,unused)) signed int (*__anonymous_object3 1)();359 __attribute__ ((unused)) signed int __anonymous_object30; 360 __attribute__ ((unused,unused)) signed int *__anonymous_object31; 361 __attribute__ ((unused,unused)) signed int __anonymous_object32[((unsigned long int )10)]; 362 __attribute__ ((unused,unused)) signed int (*__anonymous_object33)(); 338 363 }; 339 364 static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1); … … 342 367 static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1); 343 368 static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){ 369 ((void)((*___dst__R4sVad_1).__anonymous_object30) /* ?{} */); 370 ((void)((*___dst__R4sVad_1).__anonymous_object31) /* ?{} */); 371 { 372 signed int _index0 = 0; 373 for (;(_index0<10);((void)(++_index0))) { 374 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index0)])))) /* ?{} */); 375 } 376 377 } 378 379 ((void)((*___dst__R4sVad_1).__anonymous_object33) /* ?{} */); 344 380 } 345 381 static inline void ___constructor__F_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){ 382 ((void)((*___dst__R4sVad_1).__anonymous_object30=___src__4sVad_1.__anonymous_object30) /* ?{} */); 383 ((void)((*___dst__R4sVad_1).__anonymous_object31=___src__4sVad_1.__anonymous_object31) /* ?{} */); 384 { 385 signed int _index1 = 0; 386 for (;(_index1<10);((void)(++_index1))) { 387 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index1)])))=___src__4sVad_1.__anonymous_object32[((signed long int )_index1)]) /* ?{} */); 388 } 389 390 } 391 392 ((void)((*___dst__R4sVad_1).__anonymous_object33=___src__4sVad_1.__anonymous_object33) /* ?{} */); 346 393 } 347 394 static inline void ___destructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1){ 395 ((void)((*___dst__R4sVad_1).__anonymous_object33) /* ^?{} */); 396 { 397 signed int _index2 = (10-1); 398 for (;(_index2>=0);((void)(--_index2))) { 399 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index2)])))) /* ^?{} */); 400 } 401 402 } 403 404 ((void)((*___dst__R4sVad_1).__anonymous_object31) /* ^?{} */); 405 ((void)((*___dst__R4sVad_1).__anonymous_object30) /* ^?{} */); 348 406 } 349 407 static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){ 350 408 struct Vad ___ret__4sVad_1; 409 ((void)((*___dst__R4sVad_1).__anonymous_object30=___src__4sVad_1.__anonymous_object30)); 410 ((void)((*___dst__R4sVad_1).__anonymous_object31=___src__4sVad_1.__anonymous_object31)); 411 { 412 signed int _index3 = 0; 413 for (;(_index3<10);((void)(++_index3))) { 414 ((void)((*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index3)]=___src__4sVad_1.__anonymous_object32[((signed long int )_index3)])); 415 } 416 417 } 418 419 ((void)((*___dst__R4sVad_1).__anonymous_object33=___src__4sVad_1.__anonymous_object33)); 351 420 ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1)); 352 421 return ___ret__4sVad_1; 353 422 } 423 static inline void ___constructor__F_R4sVadi_autogen___1(struct Vad *___dst__R4sVad_1, signed int __anonymous_object34){ 424 ((void)((*___dst__R4sVad_1).__anonymous_object30=__anonymous_object34) /* ?{} */); 425 ((void)((*___dst__R4sVad_1).__anonymous_object31) /* ?{} */); 426 { 427 signed int _index4 = 0; 428 for (;(_index4<10);((void)(++_index4))) { 429 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index4)])))) /* ?{} */); 430 } 431 432 } 433 434 ((void)((*___dst__R4sVad_1).__anonymous_object33) /* ?{} */); 435 } 436 static inline void ___constructor__F_R4sVadiPi_autogen___1(struct Vad *___dst__R4sVad_1, signed int __anonymous_object35, signed int *__anonymous_object36){ 437 ((void)((*___dst__R4sVad_1).__anonymous_object30=__anonymous_object35) /* ?{} */); 438 ((void)((*___dst__R4sVad_1).__anonymous_object31=__anonymous_object36) /* ?{} */); 439 { 440 signed int _index5 = 0; 441 for (;(_index5<10);((void)(++_index5))) { 442 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index5)])))) /* ?{} */); 443 } 444 445 } 446 447 ((void)((*___dst__R4sVad_1).__anonymous_object33) /* ?{} */); 448 } 449 static inline void ___constructor__F_R4sVadiPiA0i_autogen___1(struct Vad *___dst__R4sVad_1, signed int __anonymous_object37, signed int *__anonymous_object38, signed int __anonymous_object39[((unsigned long int )10)]){ 450 ((void)((*___dst__R4sVad_1).__anonymous_object30=__anonymous_object37) /* ?{} */); 451 ((void)((*___dst__R4sVad_1).__anonymous_object31=__anonymous_object38) /* ?{} */); 452 { 453 signed int _index6 = 0; 454 for (;(_index6<10);((void)(++_index6))) { 455 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index6)])))=__anonymous_object39[((signed long int )_index6)]) /* ?{} */); 456 } 457 458 } 459 460 ((void)((*___dst__R4sVad_1).__anonymous_object33) /* ?{} */); 461 } 462 static inline void ___constructor__F_R4sVadiPiA0iPFi___autogen___1(struct Vad *___dst__R4sVad_1, signed int __anonymous_object40, signed int *__anonymous_object41, signed int __anonymous_object42[((unsigned long int )10)], signed int (*__anonymous_object43)()){ 463 ((void)((*___dst__R4sVad_1).__anonymous_object30=__anonymous_object40) /* ?{} */); 464 ((void)((*___dst__R4sVad_1).__anonymous_object31=__anonymous_object41) /* ?{} */); 465 { 466 signed int _index7 = 0; 467 for (;(_index7<10);((void)(++_index7))) { 468 ((void)((*((signed int *)(&(*___dst__R4sVad_1).__anonymous_object32[((signed long int )_index7)])))=__anonymous_object42[((signed long int )_index7)]) /* ?{} */); 469 } 470 471 } 472 473 ((void)((*___dst__R4sVad_1).__anonymous_object33=__anonymous_object43) /* ?{} */); 474 }
Note: See TracChangeset
for help on using the changeset viewer.