Changeset 189d800


Ignore:
Timestamp:
Oct 19, 2017, 11:13:11 AM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, 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)
Message:

Rework autogen to resolve struct functions as they are generated [fixes #43]

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rbd7e609 r189d800  
    5454        };
    5555
    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 {
    5757                AutogenerateRoutines();
    5858
     
    194194                Type *refType;
    195195                unsigned int functionNesting;
    196                 const std::list< TypeDecl* > & typeParams;
    197196                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                }
    199208
    200209                /// generates a function (?{}, ?=?, ^?{}) based on the data argument and members. If function is generated, inserts the type into the map.
    201210                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
    203214                        FunctionType * ftype = data.genType( refType );
    204215
     
    214225
    215226        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 );
    218229        }
    219230
     
    243254        // E ?=?(E volatile*, int),
    244255        //   ?=?(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 ) {
    246257
    247258                // T ?=?(E *, E);
     
    278289                declsToAdd.push_back( dtorDecl );
    279290                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 );
    280296        }
    281297
     
    306322                                }
    307323
    308                                 if ( field->get_name() == "" ) {
    309                                         // don't assign to anonymous members
    310                                         // xxx - this is a temporary fix. Anonymous members tie into
    311                                         // our inheritance model. I think the correct way to handle this is to
    312                                         // cast the structure to the type of the member and let the resolver
    313                                         // figure out whether it's valid and have a pass afterwards that fixes
    314                                         // the assignment to use pointer arithmetic with the offset of the
    315                                         // member, much like how generic type members are handled.
    316                                         continue;
    317                                 }
    318 
    319324                                assert( ! func->get_functionType()->get_parameters().empty() );
    320325                                ObjectDecl * dstParam = dynamic_cast<ObjectDecl*>( func->get_functionType()->get_parameters().front() );
     
    348353                                if ( isUnnamedBitfield( dynamic_cast< ObjectDecl * > ( field ) ) ) {
    349354                                        // 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 members
    353                                         // xxx - this is a temporary fix. Anonymous members tie into
    354                                         // our inheritance model. I think the correct way to handle this is to
    355                                         // cast the structure to the type of the member and let the resolver
    356                                         // figure out whether it's valid and have a pass afterwards that fixes
    357                                         // the assignment to use pointer arithmetic with the offset of the
    358                                         // member, much like how generic type members are handled.
    359355                                        continue;
    360356                                } else if ( parameter != params.end() ) {
     
    379375
    380376        /// 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 ) {
    382378                // Builtins do not use autogeneration.
    383379                if ( LinkageSpec::isBuiltin( aggregateDecl->get_linkage() ) ) {
     
    385381                }
    386382
    387                 // Make function polymorphic in same parameters as generic struct, if applicable
    388                 const std::list< TypeDecl * > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
    389 
    390383                // generate each of the functions based on the supplied FuncData objects
    391384                std::list< FunctionDecl * > newFuncs;
    392385                // 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 ) );
    394387                for ( const FuncData & d : data ) {
    395388                        generator.gen( d, aggregateDecl->is_thread() || aggregateDecl->is_monitor() );
    396389                }
    397390
    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;
    411392                for ( FunctionDecl * dcl : newFuncs ) {
    412393                        // generate appropriate calls to member ctor, assignment
    413394                        // destructor needs to do everything in reverse, so pass "forward" based on whether the function is a destructor
    414395                        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 );
    416397                        } 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 ) ) {
    420401                                // assignment needs to return a value
    421402                                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() ); } );
    428433
    429434                // create constructors which take each member type as a parameter.
     
    433438                // are generated, since they need access to both
    434439                if ( numCtors == 2 ) {
     440                        const auto & typeParams = aggregateDecl->parameters;
    435441                        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 ) ) ) {
    441447                                        // don't make a function whose parameter is an unnamed bitfield
    442448                                        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;
    449459                                        continue;
    450460                                }
    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 );
    455462                        }
    456463                        delete memCtorType;
    457464                }
     465
     466                declsToAdd.splice( declsToAdd.end(), forwards );
     467                declsToAdd.splice( declsToAdd.end(), definitions );
    458468        }
    459469
     
    483493
    484494        /// 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 ) {
    486496                // Make function polymorphic in same parameters as generic union, if applicable
    487497                const std::list< TypeDecl* > & typeParams = aggregateDecl->get_parameters(); // List of type variables to be placed on the generated functions
     
    545555                declsToAdd.push_back( dtorDecl );
    546556                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
    547563                declsToAdd.splice( declsToAdd.end(), memCtors );
    548564        }
     
    558574
    559575        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() ) {
    562578                        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 );
    565581                }
    566582        }
     
    572588                        for ( TypeDecl * typeDecl : structDecl->parameters ) {
    573589                                // need to visit assertions so that they are added to the appropriate maps
    574                                 acceptAll( typeDecl->assertions, *visitor );
     590                                // acceptAll( typeDecl->assertions, *visitor );
    575591                                structInst.parameters.push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->name, typeDecl ) ) );
    576592                        }
    577593                        structInst.set_baseStruct( structDecl );
    578                         makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data );
     594                        makeStructFunctions( structDecl, &structInst, functionNesting, declsToAddAfter, data, indexer );
    579595                        structsDone.insert( structDecl->name );
    580596                } // if
     
    583599        void AutogenerateRoutines::previsit( UnionDecl * unionDecl ) {
    584600                visit_children = false;
    585                 if ( ! unionDecl->get_members().empty() ) {
     601                if ( unionDecl->has_body() /* && unionsDone.find( unionDecl->name ) == unionsDone.end() */ ) {
    586602                        UnionInstType unionInst( Type::Qualifiers(), unionDecl->get_name() );
    587603                        unionInst.set_baseUnion( unionDecl );
     
    589605                                unionInst.get_parameters().push_back( new TypeExpr( new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), typeDecl ) ) );
    590606                        }
    591                         makeUnionFunctions( unionDecl, &unionInst, functionNesting, declsToAddAfter );
     607                        makeUnionFunctions( unionDecl, &unionInst, functionNesting, declsToAddAfter, indexer );
    592608                } // if
    593609        }
     
    608624                std::list< FunctionDecl * > newFuncs;
    609625                std::list< Declaration * > tds { typeDecl };
    610                 std::list< TypeDecl * > typeParams;
    611626                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 ) );
    613628                for ( const FuncData & d : data ) {
    614629                        generator.gen( d, false );
  • src/tests/.expect/64/attributes.txt

    rbd7e609 r189d800  
    7878    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    7979    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     80    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    8081    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    8182}
     
    8990    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1) /* ?{} */);
    9091    ((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) /* ?{} */);
    9193    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1) /* ?{} */);
    9294}
    9395static inline void ___destructor__F_R4sFdl_autogen___1(struct Fdl *___dst__R4sFdl_1){
    9496    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ^?{} */);
     97    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ^?{} */);
    9598    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ^?{} */);
    9699    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ^?{} */);
     
    112115    ((void)((*___dst__R4sFdl_1).__f7__i_1=___src__4sFdl_1.__f7__i_1));
    113116    ((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));
    114118    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=___src__4sFdl_1.__f9__Pi_1));
    115119    ((void)___constructor__F_R4sFdl4sFdl_autogen___1((&___ret__4sFdl_1), ___src__4sFdl_1));
     
    125129    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    126130    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     131    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    127132    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    128133}
     
    136141    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    137142    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     143    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    138144    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    139145}
     
    147153    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    148154    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     155    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    149156    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    150157}
     
    158165    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    159166    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     167    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    160168    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    161169}
     
    169177    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    170178    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     179    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    171180    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    172181}
     
    180189    ((void)((*___dst__R4sFdl_1).__f7__i_1) /* ?{} */);
    181190    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     191    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    182192    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    183193}
     
    191201    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
    192202    ((void)((*___dst__R4sFdl_1).__f8__i_1) /* ?{} */);
     203    ((void)((*___dst__R4sFdl_1).__anonymous_object0) /* ?{} */);
    193204    ((void)((*___dst__R4sFdl_1).__f9__Pi_1) /* ?{} */);
    194205}
     
    202213    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
    203214    ((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}
     218static 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){
    207219    ((void)((*___dst__R4sFdl_1).__f1__i_1=__f1__i_1) /* ?{} */);
    208220    ((void)((*___dst__R4sFdl_1).__f2__i_1=__f2__i_1) /* ?{} */);
     
    213225    ((void)((*___dst__R4sFdl_1).__f7__i_1=__f7__i_1) /* ?{} */);
    214226    ((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}
     230static 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) /* ?{} */);
    215240    ((void)((*___dst__R4sFdl_1).__f9__Pi_1=__f9__Pi_1) /* ?{} */);
    216241}
     
    232257    __attribute__ ((unused)) signed int **const ___retval_f2__CPPi_1;
    233258}
    234 __attribute__ ((unused,used,unused)) signed int (*__f3__FPA0i_i__1(signed int __anonymous_object1))[];
     259__attribute__ ((unused,used,unused)) signed int (*__f3__FPA0i_i__1(signed int __anonymous_object3))[];
    235260__attribute__ ((unused,unused)) signed int (*__f3__FPA0i_i__1(signed int __p__i_1))[]{
    236261    __attribute__ ((unused)) signed int (*___retval_f3__PA0i_1)[];
    237262}
    238 __attribute__ ((unused,used,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object2);
    239 __attribute__ ((unused,unused)) signed int (*__f4__FPFi_i____1())(signed int __anonymous_object3){
    240     __attribute__ ((unused)) signed int (*___retval_f4__PFi_i__1)(signed int __anonymous_object4);
     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);
    241266}
    242267signed int __vtr__Fi___1(){
     
    268293signed int __tpr2__Fi_PPi__1(__attribute__ ((unused,unused,unused,unused,unused,unused)) signed int **__Foo__PPi_1);
    269294signed 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_object5)(__attribute__ ((unused,unused)) signed int __anonymous_object6[((unsigned long int )5)]));
     295signed int __tpr4__Fi_PFi_Pi___1(__attribute__ ((unused,unused)) signed int (*__anonymous_object7)(__attribute__ ((unused,unused)) signed int __anonymous_object8[((unsigned long int )5)]));
    271296signed int __tpr5__Fi_PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__Foo__PFi___1)());
    272297signed 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_object7)(__attribute__ ((unused)) signed int (*__anonymous_object8)(__attribute__ ((unused,unused)) signed int __anonymous_object9)));
     298signed 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)));
    274299signed int __ad__Fi___1(){
    275300    __attribute__ ((unused)) signed int ___retval_ad__i_1;
     
    324349    ((void)sizeof(enum __anonymous5 ));
    325350}
    326 signed int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object10, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object11);
    327 signed int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object12, __attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object13);
    328 signed int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object14, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object15);
    329 signed int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object16)(), __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_object18)(__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_object22)(), __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_object24)(__attribute__ ((unused)) signed int __anonymous_object25), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object26)(__attribute__ ((unused)) signed int __anonymous_object27));
     351signed int __apd1__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object12, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object13);
     352signed int __apd2__Fi_PPiPPi__1(__attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object14, __attribute__ ((unused,unused,unused,unused)) signed int **__anonymous_object15);
     353signed int __apd3__Fi_PiPi__1(__attribute__ ((unused,unused,unused)) signed int *__anonymous_object16, __attribute__ ((unused,unused,unused)) signed int *__anonymous_object17);
     354signed int __apd4__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object18)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object19)());
     355signed 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));
     356signed int __apd6__Fi_PFi__PFi____1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object24)(), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object25)());
     357signed 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));
    333358struct Vad {
    334     __attribute__ ((unused)) signed int __anonymous_object28;
    335     __attribute__ ((unused,unused)) signed int *__anonymous_object29;
    336     __attribute__ ((unused,unused)) signed int __anonymous_object30[((unsigned long int )10)];
    337     __attribute__ ((unused,unused)) signed int (*__anonymous_object31)();
     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)();
    338363};
    339364static inline void ___constructor__F_R4sVad_autogen___1(struct Vad *___dst__R4sVad_1);
     
    342367static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1);
    343368static 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) /* ?{} */);
    344380}
    345381static 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) /* ?{} */);
    346393}
    347394static 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) /* ^?{} */);
    348406}
    349407static inline struct Vad ___operator_assign__F4sVad_R4sVad4sVad_autogen___1(struct Vad *___dst__R4sVad_1, struct Vad ___src__4sVad_1){
    350408    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));
    351420    ((void)___constructor__F_R4sVad4sVad_autogen___1((&___ret__4sVad_1), ___src__4sVad_1));
    352421    return ___ret__4sVad_1;
    353422}
     423static 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}
     436static 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}
     449static 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}
     462static 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.