Changeset 954c954 for src/SymTab


Ignore:
Timestamp:
Sep 24, 2020, 3:56:16 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6cc913e
Parents:
eccb14d
Message:

Move function argument and return variable declarations from FunctionType? to FunctionDecl?

Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    reccb14d r954c954  
    551551                        GuardValue( inFunctionType );
    552552                        inFunctionType = true;
    553                         std::vector< ast::ptr< ast::Type > > returnTypes = getTypes( functionType->returns );
    554                         if (returnTypes.empty()) mangleName << Encoding::void_t;
    555                         else accept_each( returnTypes, *visitor );
     553                        if (functionType->returns.empty()) mangleName << Encoding::void_t;
     554                        else accept_each( functionType->returns, *visitor );
    556555                        mangleName << "_";
    557                         std::vector< ast::ptr< ast::Type > > paramTypes = getTypes( functionType->params );
    558                         accept_each( paramTypes, *visitor );
     556                        accept_each( functionType->params, *visitor );
    559557                        mangleName << "_";
    560558                }
  • src/SymTab/Validate.cc

    reccb14d r954c954  
    13841384        /// Replaces enum types by int, and function/array types in function parameter and return
    13851385        /// lists by appropriate pointers
     1386        /*
    13861387        struct EnumAndPointerDecay_new {
    13871388                const ast::EnumDecl * previsit( const ast::EnumDecl * enumDecl ) {
     
    14341435                }
    14351436        };
     1437        */
    14361438
    14371439        /// expand assertions from a trait instance, performing appropriate type variable substitutions
     
    18371839const ast::Type * validateType(
    18381840                const CodeLocation & loc, const ast::Type * type, const ast::SymbolTable & symtab ) {
    1839         ast::Pass< EnumAndPointerDecay_new > epc;
     1841        // ast::Pass< EnumAndPointerDecay_new > epc;
    18401842        ast::Pass< LinkReferenceToTypes_new > lrt{ loc, symtab };
    18411843        ast::Pass< ForallPointerDecay_new > fpd{ loc };
    18421844
    1843         return type->accept( epc )->accept( lrt )->accept( fpd );
     1845        return type->accept( lrt )->accept( fpd );
    18441846}
    18451847
Note: See TracChangeset for help on using the changeset viewer.