Ignore:
Timestamp:
Jun 27, 2018, 3:28:41 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
b21c77a
Parents:
0182bfa (diff), 63238a4 (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' into with_gc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    r0182bfa r28f3a19  
    171171                                        "w",    // SignedInt128
    172172                                        "Uw",   // UnsignedInt128
     173                                        "x",   // Float80
     174                                        "y",   // Float128
    173175                                };
     176                                static_assert(
     177                                        sizeof(btLetter)/sizeof(btLetter[0]) == BasicType::NUMBER_OF_BASIC_TYPES,
     178                                        "Each basic type kind should have a corresponding mangler letter"
     179                                );
    174180
    175181                                printQualifiers( basicType );
     182                                assert( basicType->get_kind() < sizeof(btLetter)/sizeof(btLetter[0]) );
    176183                                mangleName << btLetter[ basicType->get_kind() ];
    177184                        }
     
    218225                                GuardValue( inFunctionType );
    219226                                inFunctionType = true;
    220                                 std::list< Type* > returnTypes = getTypes( functionType->get_returnVals() );
     227                                std::list< Type* > returnTypes = getTypes( functionType->returnVals );
    221228                                acceptAll( returnTypes, *visitor );
    222229                                mangleName << "_";
    223                                 std::list< Type* > paramTypes = getTypes( functionType->get_parameters() );
     230                                std::list< Type* > paramTypes = getTypes( functionType->parameters );
    224231                                acceptAll( paramTypes, *visitor );
    225232                                mangleName << "_";
     
    229236                                printQualifiers( refType );
    230237
    231                                 mangleName << ( refType->get_name().length() + prefix.length() ) << prefix << refType->get_name();
     238                                mangleName << ( refType->name.length() + prefix.length() ) << prefix << refType->name;
    232239
    233240                                if ( mangleGenericParams ) {
    234                                         std::list< Expression* >& params = refType->get_parameters();
     241                                        std::list< Expression* >& params = refType->parameters;
    235242                                        if ( ! params.empty() ) {
    236243                                                mangleName << "_";
    237244                                                for ( std::list< Expression* >::const_iterator param = params.begin(); param != params.end(); ++param ) {
    238245                                                        TypeExpr *paramType = dynamic_cast< TypeExpr* >( *param );
    239                                                         assertf(paramType, "Aggregate parameters should be type expressions: %s", toString(*param).c_str());
    240                                                         maybeAccept( paramType->get_type(), *visitor );
     246                                                        assertf(paramType, "Aggregate parameters should be type expressions: %s", toCString(*param));
     247                                                        maybeAccept( paramType->type, *visitor );
    241248                                                }
    242249                                                mangleName << "_";
Note: See TracChangeset for help on using the changeset viewer.