Changeset ae32d96 for src/SymTab


Ignore:
Timestamp:
May 30, 2018, 5:57:43 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, with_gc
Children:
597c34a3, 6810fcb, 94b1022a, cf5e5b1
Parents:
6b4cdd3 (diff), d15a45d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    r6b4cdd3 rae32d96  
    148148                for ( auto decl : copy ) {
    149149                        if ( FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl.id ) ) {
    150                                 std::list< DeclarationWithType * > & params = function->get_functionType()->get_parameters();
     150                                std::list< DeclarationWithType * > & params = function->type->parameters;
    151151                                assert( ! params.empty() );
    152152                                // use base type of pointer, so that qualifiers on the pointer type aren't considered.
     
    170170                                bool noUserDefinedFunc = ! val.existsUserDefinedFunc;
    171171                                bool isUserDefinedFunc = ball.isUserDefinedFunc;
    172                                 bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl.id->get_linkage() == LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides
     172                                bool isAcceptableDefaultCtor = (! val.existsUserDefinedCtor || (! val.existsUserDefinedDefaultCtor && ball.decl.id->linkage == LinkageSpec::Intrinsic)) && ball.isDefaultCtor; // allow default constructors only when no user-defined constructors exist, except in the case of intrinsics, which require exact overrides
    173173                                bool isAcceptableCopyFunc = ! val.existsUserDefinedCopyFunc && ball.isCopyFunc; // handles copy ctor and assignment operator
    174174                                bool isAcceptableDtor = ! val.existsUserDefinedDtor && ball.isDtor;
     
    471471        void Indexer::addId( DeclarationWithType * decl, Expression * baseExpr ) {
    472472                // default handling of conflicts is to raise an error
    473                 addId( decl, [decl](IdData &, const std::string & msg) { SemanticError( decl, msg ); return true; }, baseExpr );
     473                addId( decl, [decl](IdData &, const std::string & msg) { SemanticError( decl, msg ); return true; }, baseExpr, decl->isDeleted ? decl : nullptr );
    474474        }
    475475
  • src/SymTab/Mangler.cc

    r6b4cdd3 rae32d96  
    171171                                        "w",    // SignedInt128
    172172                                        "Uw",   // UnsignedInt128
    173                                         "a",   // Float80
    174                                         "A",   // Float128
     173                                        "x",   // Float80
     174                                        "y",   // Float128
    175175                                };
    176176                                static_assert(
     
    225225                                GuardValue( inFunctionType );
    226226                                inFunctionType = true;
    227                                 std::list< Type* > returnTypes = getTypes( functionType->get_returnVals() );
     227                                std::list< Type* > returnTypes = getTypes( functionType->returnVals );
    228228                                acceptAll( returnTypes, *visitor );
    229229                                mangleName << "_";
    230                                 std::list< Type* > paramTypes = getTypes( functionType->get_parameters() );
     230                                std::list< Type* > paramTypes = getTypes( functionType->parameters );
    231231                                acceptAll( paramTypes, *visitor );
    232232                                mangleName << "_";
     
    236236                                printQualifiers( refType );
    237237
    238                                 mangleName << ( refType->get_name().length() + prefix.length() ) << prefix << refType->get_name();
     238                                mangleName << ( refType->name.length() + prefix.length() ) << prefix << refType->name;
    239239
    240240                                if ( mangleGenericParams ) {
    241                                         std::list< Expression* >& params = refType->get_parameters();
     241                                        std::list< Expression* >& params = refType->parameters;
    242242                                        if ( ! params.empty() ) {
    243243                                                mangleName << "_";
    244244                                                for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) {
    245245                                                        TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param );
    246                                                         assertf(paramType, "Aggregate parameters should be type expressions: %s", toString(*param).c_str());
    247                                                         maybeAccept( paramType->get_type(), *visitor );
     246                                                        assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(*param));
     247                                                        maybeAccept( paramType->type, *visitor );
    248248                                                }
    249249                                                mangleName << "_";
Note: See TracChangeset for help on using the changeset viewer.