Changeset d60a4c2 for src


Ignore:
Timestamp:
Jan 11, 2025, 5:48:46 PM (12 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
f886608
Parents:
7d65715f (diff), 32a119e9 (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
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cpp

    r7d65715f rd60a4c2  
    3636        Float,
    3737        FloatComplex,
    38         // FloatImaginary,
    3938        Float32x,
    4039        Float32xComplex,
     
    4342        Double,
    4443        DoubleComplex,
    45         // DoubleImaginary,
    4644        Float64x,
    4745        Float64xComplex,
     
    5250        LongDouble,
    5351        LongDoubleComplex,
    54         // LongDoubleImaginary,
    5552        Float128x,
    5653        Float128xComplex,
     
    8784
    8885        { ShortSignedInt, "ShortSignedInt", "SI", "signed short int", "s", Signed, ShortUnsignedInt, SignedInt, -1, 2 },
    89         { ShortUnsignedInt, "ShortUnsignedInt", "SUI", "unsigned short int", "t", Unsigned, UnsignedInt, SignedInt, -1, 2 },
     86        { ShortUnsignedInt, "ShortUnsignedInt", "USI", "unsigned short int", "t", Unsigned, UnsignedInt, SignedInt, -1, 2 },
    9087
    9188        { SignedInt, "SignedInt", "I", "signed int", "i", Signed, UnsignedInt, LongSignedInt, -1, 3 },
     
    9390
    9491        { LongSignedInt, "LongSignedInt", "LI", "signed long int", "l", Signed, LongUnsignedInt, LongLongSignedInt, -1, 4 },
    95         { LongUnsignedInt, "LongUnsignedInt", "LUI", "unsigned long int", "m", Unsigned, LongLongSignedInt, LongLongUnsignedInt, -1, 4 },
     92        { LongUnsignedInt, "LongUnsignedInt", "ULI", "unsigned long int", "m", Unsigned, LongLongSignedInt, LongLongUnsignedInt, -1, 4 },
    9693
    9794        { LongLongSignedInt, "LongLongSignedInt", "LLI", "signed long long int", "x", Signed, LongLongUnsignedInt, SignedInt128, -1, 5 },
    98         { LongLongUnsignedInt, "LongLongUnsignedInt", "LLUI", "unsigned long long int", "y", Unsigned, SignedInt128, UnsignedInt128, -1, 5 },
    99 
    100         { SignedInt128, "SignedInt128", "IB", "__int128", "n", Signed, UnsignedInt128, Float16, -1, 6 },
    101         { UnsignedInt128, "UnsignedInt128", "UIB", "unsigned __int128", "o", Unsigned, Float16, -1, -1, 6 },
     95        { LongLongUnsignedInt, "LongLongUnsignedInt", "ULLI", "unsigned long long int", "y", Unsigned, SignedInt128, UnsignedInt128, -1, 5 },
     96
     97        { SignedInt128, "SignedInt128", "__ID", "__int128", "n", Signed, UnsignedInt128, Float16, -1, 6 },
     98        { UnsignedInt128, "UnsignedInt128", "__UID", "unsigned __int128", "o", Unsigned, Float16, -1, -1, 6 },
    10299
    103100        { Float16, "Float16", "_FH", "_Float16", "DF16_", Floating, Float32, Float16Complex, -1, 7 },
    104         { Float16Complex, "Float16Complex", "_FH", "_Float16 _Complex", "CDF16_", Floating, Float32Complex, -1, -1, 7 },
     101        { Float16Complex, "Float16Complex", "_FHC", "_Float16 _Complex", "CDF16_", Floating, Float32Complex, -1, -1, 7 },
     102
    105103        { Float32, "Float32", "_F", "_Float32", "DF32_", Floating, Float, Float32Complex, -1, 8 },
    106104        { Float32Complex, "Float32Complex", "_FC", "_Float32 _Complex", "CDF32_", Floating, FloatComplex, -1, -1, 8 },
    107105        { Float, "Float", "F", "float", "f", Floating, Float32x, FloatComplex, -1, 9 },
    108106        { FloatComplex, "FloatComplex", "FC", "float _Complex", "Cf", Floating, Float32xComplex, -1, -1, 9 },
    109         // { FloatImaginary, "FloatImaginary", "FI", "float _Imaginary", "If", false, DoubleImaginary, FloatComplex, -1, 9 },
    110 
    111107        { Float32x, "Float32x", "_FX", "_Float32x", "DF32x_", Floating, Float64, Float32xComplex, -1, 10 },
    112108        { Float32xComplex, "Float32xComplex", "_FXC", "_Float32x _Complex", "CDF32x_", Floating, Float64Complex, -1, -1, 10 },
    113         { Float64, "Float64", "FD", "_Float64", "DF64_", Floating, Double, Float64Complex, -1, 11 },
     109
     110        { Float64, "Float64", "_FD", "_Float64", "DF64_", Floating, Double, Float64Complex, -1, 11 },
    114111        { Float64Complex, "Float64Complex", "_FDC", "_Float64 _Complex", "CDF64_", Floating, DoubleComplex, -1, -1, 11 },
    115112        { Double, "Double", "D", "double", "d", Floating, Float64x, DoubleComplex, -1, 12 },
    116113        { DoubleComplex, "DoubleComplex", "DC", "double _Complex", "Cd", Floating, Float64xComplex, -1, -1, 12 },
    117         // { DoubleImaginary, "DoubleImaginary", "DI", "double _Imaginary", "Id", false, LongDoubleImaginary, DoubleComplex, -1, 12 },
    118 
    119         { Float64x, "Float64x", "F80X", "_Float64x", "DF64x_", Floating, Float80, Float64xComplex, -1, 13 },
     114        { Float64x, "Float64x", "_FDX", "_Float64x", "DF64x_", Floating, Float80, Float64xComplex, -1, 13 },
    120115        { Float64xComplex, "Float64xComplex", "_FDXC", "_Float64x _Complex", "CDF64x_", Floating, Float128Complex, -1, -1, 13 },
    121         { Float80, "Float80", "F80", "__float80", "Dq", Floating, Float128, Float64xComplex, -1, 14 },
    122         { Float128, "Float128", "_FB", "_Float128", "DF128_", Floating, uuFloat128, Float128Complex, -1, 15 },
     116
     117        { Float80, "Float80", "_F80", "__float80", "Dq", Floating, Float128, Float64xComplex, -1, 14 },
     118        // __float80 _Complex, no complex counterpart
     119
     120        { Float128, "Float128", "_FLD", "_Float128", "DF128_", Floating, uuFloat128, Float128Complex, -1, 15 },
    123121        { Float128Complex, "Float128Complex", "_FLDC", "_Float128 _Complex", "CDF128_", Floating, LongDoubleComplex, -1, -1, 15 },
    124         { uuFloat128, "uuFloat128", "FB", "__float128", "g", Floating, LongDouble, Float128Complex, -1, 16 },
     122        { uuFloat128, "uuFloat128", "__FLD", "__float128", "g", Floating, LongDouble, Float128Complex, -1, 16 },
     123        // __float128 _Complex, no complex counterpart
    125124        { LongDouble, "LongDouble", "LD", "long double", "e", Floating, Float128x, LongDoubleComplex, -1, 17 },
    126125        { LongDoubleComplex, "LongDoubleComplex", "LDC", "long double _Complex", "Ce", Floating, Float128xComplex, -1, -1, 17 },
    127         // { LongDoubleImaginary, "LongDoubleImaginary", "LDI", "long double _Imaginary", "Ie", false, LongDoubleComplex, -1, -1, 17 },
    128 
    129         { Float128x, "Float128x", "_FBX", "_Float128x", "DF128x_", Floating, Float128xComplex, -1, -1, 18 },
     126
     127        // may not be supported
     128        { Float128x, "Float128x", "_FLDX", "_Float128x", "DF128x_", Floating, Float128xComplex, -1, -1, 18 },
    130129        { Float128xComplex, "Float128xComplex", "_FLDXC", "_Float128x _Complex", "CDF128x_", Floating, -1, -1, -1, 18 }
    131130}; // graph
     
    159158                // visit cost element
    160159                int col = q.top().i;
     160
    161161                // skip if already set
    162162                if ( seen[col] ) {
    163163                        q.pop();
    164164                        continue;
    165                 } else {
    166                         seen[col] = true;
    167                 } // if
     165                } // if
     166                seen[col] = true;
    168167
    169168                // otherwise set min-costs into matrix
     
    176175                // traverse children
    177176                int i = graph[col].left;
    178                 if ( i == -1 ) continue;
    179                 q.emplace( i, cost + 1, scost + ! (graph[col].sign & graph[i].sign) );
     177                if ( i == -1 ) continue;                                                // leaf
     178                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + ! (graph[col].sign & graph[i].sign) );
    180179
    181180                i = graph[col].middle;
    182                 if ( i == -1 ) continue;
    183                 q.emplace( i, cost + 1, scost + !(graph[col].sign & graph[i].sign) );
     181                if ( i == -1 ) continue;                                                // leaf
     182                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + !(graph[col].sign & graph[i].sign) );
    184183
    185184                i = graph[col].right;
    186                 if ( i == -1 ) continue;
    187                 q.emplace( i, cost + 1, scost + !(graph[col].sign & graph[i].sign) );
     185                if ( i == -1 ) continue;                                                // leaf
     186                q.emplace( i, cost + max(1, graph[i].rank-graph[col].rank), scost + !(graph[col].sign & graph[i].sign) );
    188187        } while ( ! q.empty() );
    189188} // generateCosts
  • src/CodeGen/CodeGenerator.cpp

    r7d65715f rd60a4c2  
    11301130}
    11311131
     1132void CodeGenerator::postvisit( ast::TryStmt const * stmt ) {
     1133        assertf( !options.genC, "TryStmt should not reach code generation." );
     1134
     1135        output << "try ";
     1136        stmt->body->accept( *visitor );
     1137        for ( ast::ptr<ast::CatchClause> const & handler : stmt->handlers ) {
     1138                handler->accept( *visitor );
     1139        }
     1140        if ( stmt->finally ) stmt->finally->accept( *visitor );
     1141}
     1142
    11321143void CodeGenerator::postvisit( ast::CatchClause const * stmt ) {
    11331144        assertf( !options.genC, "CatchClause should not reach code generation." );
    11341145
    1135         output << ((stmt->kind == ast::Terminate) ? "catch" : "catchResume");
     1146        output << ((stmt->kind == ast::Terminate) ? " catch " : " catchResume ");
    11361147        output << "( ";
    11371148        stmt->decl->accept( *visitor );
     
    11421153        output << " ) ";
    11431154        stmt->body->accept( *visitor );
     1155}
     1156
     1157void CodeGenerator::postvisit( ast::FinallyClause const * clause ) {
     1158        assertf( !options.genC, "FinallyClause should not reach code generation." );
     1159
     1160        output << " finally ";
     1161        clause->body->accept( *visitor );
    11441162}
    11451163
  • src/CodeGen/CodeGenerator.hpp

    r7d65715f rd60a4c2  
    106106        void postvisit( ast::ReturnStmt const * );
    107107        void postvisit( ast::ThrowStmt const * );
     108        void postvisit( ast::TryStmt const * );
    108109        void postvisit( ast::CatchClause const * );
     110        void postvisit( ast::FinallyClause const * );
    109111        void postvisit( ast::WaitForStmt const * );
    110112        void postvisit( ast::WithStmt const * );
  • src/ControlStruct/ExceptDecl.cpp

    r7d65715f rd60a4c2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExceptDecl.cpp --
     7// ExceptDecl.cpp -- Translate "exception" and exception related declarations.
    88//
    99// Author           : Andrew Beach
    1010// Created On       : Tue Jul 12 15:50:00 2022
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Sep  7 12:05:55 2024
    13 // Update Count     : 1
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Jan 10 15:35:55 2024
     13// Update Count     : 2
    1414//
    1515
     
    117117        decl->body = true;
    118118        for ( ast::ptr<ast::TypeDecl> const & param : forallClause ) {
    119                 decl->params.push_back( ast::deepCopy( param ) );
     119                // Create an unsized and assertionless copy of the parameter.
     120                decl->params.push_back( new ast::TypeDecl(
     121                        param->location,
     122                        param->name,
     123                        param->storage,
     124                        param->base ? ast::deepCopy( param->base ) : nullptr,
     125                        ast::TypeDecl::Dtype,
     126                        false,
     127                        nullptr
     128                ) );
    120129        }
    121130        return decl;
     
    445454}
    446455
     456ast::NameExpr const * designatedName( ast::Designation const * des ) {
     457        if ( des && 1 == des->designators.size() ) {
     458                return des->designators.front().as<ast::NameExpr>();
     459        }
     460        return nullptr;
     461}
     462
    447463ast::ObjectDecl const * ExceptDeclCore::transformVTable(
    448464                ast::ObjectDecl const * decl, ast::VTableType const * type ) {
     
    467483                                createTypeIdValue( location, exceptionName, params ) );
    468484                }
    469                 declsToAddBefore.push_back(
    470                         createCopy( location, exceptionName, params ) );
    471                 declsToAddBefore.push_back(
    472                         createMsg( location, exceptionName, params ) );
    473485                retDecl = createVirtualTable(
    474486                        location, exceptionName, params, tableName );
     487                // There is quite a bit of work to pull over any initializers and
     488                // decide if we want to insert the default functions.
     489                bool foundCopy = false;
     490                bool foundMsg = false;
     491                ast::ListInit const * init = decl->init.as<ast::ListInit>();
     492                if ( init ) {
     493                        for ( size_t i = 0 ; i < init->initializers.size() ; ++i ) {
     494                                ast::Designation const * des = init->designations.at(i);
     495                                auto name = designatedName( des );
     496                                if ( nullptr == name ) continue;
     497                                if ( "copy" == name->name ) {
     498                                        foundCopy = true;
     499                                } else if ( "msg" == name->name ) {
     500                                        foundMsg = true;
     501                                }
     502                                auto retInit = retDecl->init.as<ast::ListInit>();
     503                                for ( size_t j = 0 ; j < retInit->initializers.size() ; ++j ) {
     504                                        ast::Designation const * des = retInit->designations.at(j);
     505                                        auto retName = designatedName( des );
     506                                        if ( retName && name->name == retName->name ) {
     507                                                retInit = ast::mutate_field_index( retInit,
     508                                                        &ast::ListInit::initializers, j,
     509                                                        init->initializers.at(i) );
     510                                        }
     511                                }
     512                                retDecl->init = retInit;
     513                        }
     514                }
     515                if ( !foundCopy ) {
     516                        declsToAddBefore.push_back(
     517                                createCopy( location, exceptionName, params ) );
     518                }
     519                if ( !foundMsg ) {
     520                        declsToAddBefore.push_back(
     521                                createMsg( location, exceptionName, params ) );
     522                }
    475523        }
    476524
  • src/GenPoly/Box.cpp

    r7d65715f rd60a4c2  
    4242
    4343/// The layout type is used to represent sizes, alignments and offsets.
    44 ast::BasicType * makeLayoutType() {
    45         return new ast::BasicType( ast::BasicKind::LongUnsignedInt );
     44const ast::Type * getLayoutType( const ast::TranslationUnit & transUnit ) {
     45        assert( transUnit.global.sizeType.get() );
     46        return transUnit.global.sizeType;
    4647}
    4748
    4849/// Fixed version of layout type (just adding a 'C' in C++ style).
    49 ast::BasicType * makeLayoutCType() {
    50         return new ast::BasicType( ast::BasicKind::LongUnsignedInt,
    51                 ast::CV::Qualifiers( ast::CV::Const ) );
     50const ast::Type * getLayoutCType( const ast::TranslationUnit & transUnit ) {
     51        // Hack for optimization: don't want to clone every time, but don't want
     52        // to hardcode a global-translation-unit assumption here either.  So
     53        // cache it: will be fast if there is a single translation unit, but
     54        // still correct otherwise.
     55        static ast::ptr<ast::Type> lastLayoutType = nullptr;
     56        static ast::ptr<ast::Type> lastLayoutCType = nullptr;
     57        const ast::Type * curLayoutType = getLayoutType( transUnit );
     58        if (lastLayoutType != curLayoutType ) {
     59                lastLayoutCType = ast::deepCopy( curLayoutType );
     60                add_qualifiers(
     61                        lastLayoutCType, ast::CV::Qualifiers{ ast::CV::Const } );
     62        }
     63        return lastLayoutCType;
    5264}
    5365
     
    5567/// Adds layout-generation functions to polymorphic types.
    5668struct LayoutFunctionBuilder final :
     69                public ast::WithConstTranslationUnit,
    5770                public ast::WithDeclsToAdd,
    5871                public ast::WithShortCircuiting,
     
    7790void addSTypeParams(
    7891                ast::vector<ast::DeclWithType> & params,
    79                 ast::vector<ast::TypeDecl> const & sizedParams ) {
     92                ast::vector<ast::TypeDecl> const & sizedParams,
     93                const ast::TranslationUnit & transUnit ) {
    8094        for ( ast::ptr<ast::TypeDecl> const & sizedParam : sizedParams ) {
    8195                ast::TypeInstType inst( sizedParam );
    8296                std::string paramName = Mangle::mangleType( &inst );
    83                 params.emplace_back( new ast::ObjectDecl(
     97                auto sizeofParam = new ast::ObjectDecl(
    8498                        sizedParam->location,
    8599                        sizeofName( paramName ),
    86                         makeLayoutCType()
    87                 ) );
    88                 auto alignParam = new ast::ObjectDecl(
     100                        getLayoutCType( transUnit )
     101                );
     102                sizeofParam->attributes.push_back( new ast::Attribute( "unused" ) );
     103                params.emplace_back( sizeofParam );
     104                auto alignofParam = new ast::ObjectDecl(
    89105                        sizedParam->location,
    90106                        alignofName( paramName ),
    91                         makeLayoutCType()
     107                        getLayoutCType( transUnit )
    92108                );
    93                 alignParam->attributes.push_back( new ast::Attribute( "unused" ) );
    94                 params.emplace_back( alignParam );
    95         }
    96 }
    97 
    98 ast::Type * makeLayoutOutType() {
    99         return new ast::PointerType( makeLayoutType() );
     109                alignofParam->attributes.push_back( new ast::Attribute( "unused" ) );
     110                params.emplace_back( alignofParam );
     111        }
     112}
     113
     114ast::Type * getLayoutOutType( const ast::TranslationUnit & transUnit ) {
     115        return new ast::PointerType( getLayoutType( transUnit ) );
    100116}
    101117
     
    110126                CodeLocation const & location, ast::AggregateDecl const * aggr,
    111127                ast::vector<ast::TypeDecl> const & sizedParams,
    112                 bool isInFunction, bool isStruct ) {
     128                bool isInFunction, bool isStruct,
     129                const ast::TranslationUnit & transUnit ) {
    113130        ast::ObjectDecl * sizeParam = new ast::ObjectDecl(
    114131                location,
    115132                sizeofName( aggr->name ),
    116                 makeLayoutOutType()
     133                getLayoutOutType( transUnit )
    117134        );
    118135        ast::ObjectDecl * alignParam = new ast::ObjectDecl(
    119136                location,
    120137                alignofName( aggr->name ),
    121                 makeLayoutOutType()
     138                getLayoutOutType( transUnit )
    122139        );
    123140        ast::ObjectDecl * offsetParam = nullptr;
     
    127144                        location,
    128145                        offsetofName( aggr->name ),
    129                         makeLayoutOutType()
     146                        getLayoutOutType( transUnit )
    130147                );
    131148                params.push_back( offsetParam );
    132149        }
    133         addSTypeParams( params, sizedParams );
     150        addSTypeParams( params, sizedParams, transUnit );
    134151
    135152        // Routines at global scope marked "static" to prevent multiple
     
    218235        // Build layout function signature.
    219236        LayoutData layout = buildLayoutFunction(
    220                 location, decl, sizedParams, isInFunction(), true );
     237                location, decl, sizedParams, isInFunction(), true, transUnit() );
    221238        ast::FunctionDecl * layoutDecl = layout.function;
    222239        // Also return these or extract them from the parameter list?
     
    292309        // Build layout function signature.
    293310        LayoutData layout = buildLayoutFunction(
    294                 location, decl, sizedParams, isInFunction(), false );
     311                location, decl, sizedParams, isInFunction(), false, transUnit() );
    295312        ast::FunctionDecl * layoutDecl = layout.function;
    296313        // Also return these or extract them from the parameter list?
     
    13901407/// * Move polymorphic returns in function types to pointer-type parameters.
    13911408/// * Adds type size and assertion parameters to parameter lists.
    1392 struct DeclAdapter final {
     1409struct DeclAdapter final :
     1410                public ast::WithConstTranslationUnit {
    13931411        ast::FunctionDecl const * previsit( ast::FunctionDecl const * decl );
    13941412        ast::FunctionDecl const * postvisit( ast::FunctionDecl const * decl );
     
    13981416
    13991417ast::ObjectDecl * makeObj(
    1400                 CodeLocation const & location, std::string const & name ) {
     1418                CodeLocation const & location, std::string const & name,
     1419                const ast::TranslationUnit & transUnit ) {
    14011420        // The size/align parameters may be unused, so add the unused attribute.
    14021421        return new ast::ObjectDecl( location, name,
    1403                 makeLayoutCType(),
     1422                getLayoutCType( transUnit ),
    14041423                nullptr, ast::Storage::Classes(), ast::Linkage::C, nullptr,
    14051424                { new ast::Attribute( "unused" ) } );
     
    14411460                        std::string paramName = Mangle::mangleType( &paramType );
    14421461
    1443                         auto sizeParam = makeObj( typeParam->location, sizeofName( paramName ) );
     1462                        auto sizeParam = makeObj(
     1463                                typeParam->location, sizeofName( paramName ), transUnit() );
    14441464                        layoutParams.emplace_back( sizeParam );
    14451465
    1446                         auto alignParam = makeObj( typeParam->location, alignofName( paramName ) );
     1466                        auto alignParam = makeObj(
     1467                                typeParam->location, alignofName( paramName ), transUnit() );
    14471468                        layoutParams.emplace_back( alignParam );
    14481469                }
     
    15761597/// * Inserts dynamic calculation of polymorphic type layouts where needed.
    15771598struct PolyGenericCalculator final :
    1578                 public ast::WithConstTypeSubstitution,
     1599                public ast::WithConstTranslationUnit,
     1600                public ast::WithConstTypeSubstitution,
    15791601                public ast::WithDeclsToAdd,
    15801602                public ast::WithGuards,
     
    16931715
    16941716        ast::ObjectDecl * sizeDecl = new ast::ObjectDecl( decl->location,
    1695                 sizeofName( typeName ), makeLayoutCType(),
     1717                sizeofName( typeName ), getLayoutCType( transUnit() ),
    16961718                new ast::SingleInit( decl->location,
    16971719                        new ast::SizeofExpr( decl->location, deepCopy( base ) )
     
    16991721        );
    17001722        ast::ObjectDecl * alignDecl = new ast::ObjectDecl( decl->location,
    1701                 alignofName( typeName ), makeLayoutCType(),
     1723                alignofName( typeName ), getLayoutCType( transUnit() ),
    17021724                new ast::SingleInit( decl->location,
    17031725                        new ast::AlignofExpr( decl->location, deepCopy( base ) )
     
    19872009        auto offsetArray = makeVar( expr->location, offsetName,
    19882010                new ast::ArrayType(
    1989                         makeLayoutType(),
     2011                        getLayoutType( transUnit() ),
    19902012                        ast::ConstantExpr::from_ulong( expr->location, inits.size() ),
    19912013                        ast::FixedLen,
     
    20712093                        // All empty structures have the same layout (size 1, align 1).
    20722094                        makeVar( location,
    2073                                 sizeofName( typeName ), makeLayoutType(),
     2095                                sizeofName( typeName ), getLayoutType( transUnit() ),
    20742096                                new ast::SingleInit( location,
    20752097                                                ast::ConstantExpr::from_ulong( location, 1 ) ) );
    20762098                        makeVar( location,
    2077                                 alignofName( typeName ), makeLayoutType(),
     2099                                alignofName( typeName ), getLayoutType( transUnit() ),
    20782100                                new ast::SingleInit( location,
    20792101                                                ast::ConstantExpr::from_ulong( location, 1 ) ) );
     
    20812103                } else {
    20822104                        ast::ObjectDecl const * sizeofVar = makeVar( location,
    2083                                 sizeofName( typeName ), makeLayoutType(), nullptr );
     2105                                sizeofName( typeName ), getLayoutType( transUnit() ), nullptr );
    20842106                        ast::ObjectDecl const * alignofVar = makeVar( location,
    2085                                 alignofName( typeName ), makeLayoutType(), nullptr );
     2107                                alignofName( typeName ), getLayoutType( transUnit() ), nullptr );
    20862108                        ast::ObjectDecl const * offsetofVar = makeVar( location,
    20872109                                offsetofName( typeName ),
    20882110                                new ast::ArrayType(
    2089                                         makeLayoutType(),
     2111                                        getLayoutType( transUnit() ),
    20902112                                        ast::ConstantExpr::from_int( location, memberCount ),
    20912113                                        ast::FixedLen,
     
    21332155
    21342156                ast::ObjectDecl * sizeofVar = makeVar( location,
    2135                         sizeofName( typeName ), makeLayoutType() );
     2157                        sizeofName( typeName ), getLayoutType( transUnit() ) );
    21362158                ast::ObjectDecl * alignofVar = makeVar( location,
    2137                         alignofName( typeName ), makeLayoutType() );
     2159                        alignofName( typeName ), getLayoutType( transUnit() ) );
    21382160
    21392161                ast::UntypedExpr * layoutCall = new ast::UntypedExpr( location,
  • src/Makefile.am

    r7d65715f rd60a4c2  
    1111## Created On       : Sun May 31 08:51:46 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Mon Nov 20 11:28:05 2023
    14 ## Update Count     : 109
     13## Last Modified On : Sat Jan 11 16:27:27 2025
     14## Update Count     : 112
    1515###############################################################################
    1616
     
    5555$(addprefix $(srcdir)/, ResolvExpr/ConversionCost.cpp ResolvExpr/CommonType.cpp SymTab/ManglerCommon.cpp) : $(srcdir)/AST/BasicKind.hpp
    5656
     57.PRECIOUS: $(srcdir)/AST/BasicKind.hpp
    5758$(srcdir)/AST/BasicKind.hpp : BasicTypes-gen.cpp
    5859        ${AM_V_GEN}${CXXCOMPILE} $< -o BasicTypes-gen -Wall -Wextra -Werror=return-type
  • src/ResolvExpr/CandidateFinder.cpp

    r7d65715f rd60a4c2  
    12251225
    12261226                        // return casts are eliminated (merely selecting an overload, no actual operation)
    1227                         candidates = std::move(finder.candidates);
     1227                        for (auto & cand : finder.candidates) {
     1228                                if (typesCompatibleIgnoreQualifiers(toType, cand->expr->result, cand->env)) {
     1229                                        candidates.push_back (cand);
     1230                                }
     1231                        }
     1232                        // candidates = std::move(finder.candidates);
    12281233                        return;
    12291234                }
  • src/ResolvExpr/CommonType.cpp

    r7d65715f rd60a4c2  
    4242        #define BT ast::BasicKind::
    4343        static const ast::BasicKind commonTypes[BT NUMBER_OF_BASIC_TYPES][BT NUMBER_OF_BASIC_TYPES] = { // nearest common ancestor
    44                 /*                                      B                       C                      SC                      UC                      SI                     SUI
    45                                                         I                      UI                      LI                     LUI                     LLI                    LLUI
    46                                                        IB                     UIB                     _FH                     _FH                      _F                     _FC
    47                                                         F                      FC                     _FX                    _FXC                      FD                    _FDC
    48                                                         D                      DC                    F80X                   _FDXC                     F80                     _FB
    49                                                     _FLDC                      FB                      LD                     LDC                    _FBX                  _FLDXC
     44                /*                                      B                       C                      SC                      UC                      SI                     USI
     45                                                        I                      UI                      LI                     ULI                     LLI                    ULLI
     46                                                     __ID                   __UID                     _FH                    _FHC                      _F                     _FC
     47                                                        F                      FC                     _FX                    _FXC                     _FD                    _FDC
     48                                                        D                      DC                    _FDX                   _FDXC                    _F80                    _FLD
     49                                                    _FLDC                   __FLD                      LD                     LDC                   _FLDX                  _FLDXC
    5050                                 */
    5151                                  {
     
    9090                                  },
    9191                                  {
    92                 /*    SUI */    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,
     92                /*    USI */    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,    BT ShortUnsignedInt,
    9393                                             BT SignedInt,         BT UnsignedInt,       BT LongSignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
    9494                                          BT SignedInt128,      BT UnsignedInt128,             BT Float16,      BT Float16Complex,             BT Float32,      BT Float32Complex,
     
    122122                                  },
    123123                                  {
    124                 /*    LUI */     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,
     124                /*    ULI */     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,
    125125                                       BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,     BT LongUnsignedInt,   BT LongLongSignedInt, BT LongLongUnsignedInt,
    126126                                          BT SignedInt128,      BT UnsignedInt128,             BT Float16,      BT Float16Complex,             BT Float32,      BT Float32Complex,
     
    138138                                  },
    139139                                  {
    140                 /*   LLUI */ BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
     140                /*   ULLI */ BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
    141141                                   BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt, BT LongLongUnsignedInt,
    142142                                          BT SignedInt128,      BT UnsignedInt128,             BT Float16,      BT Float16Complex,             BT Float32,      BT Float32Complex,
     
    146146                                  },
    147147                                  {
    148                 /*     IB */        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
     148                /*   __ID */        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
    149149                                          BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,        BT SignedInt128,
    150150                                          BT SignedInt128,      BT UnsignedInt128,             BT Float16,      BT Float16Complex,             BT Float32,      BT Float32Complex,
     
    154154                                  },
    155155                                  {
    156                 /*    UIB */      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
     156                /*  __UID */      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
    157157                                        BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,      BT UnsignedInt128,
    158158                                        BT UnsignedInt128,      BT UnsignedInt128,             BT Float16,      BT Float16Complex,             BT Float32,      BT Float32Complex,
     
    170170                                  },
    171171                                  {
    172                 /*    _FH */      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,
     172                /*   _FHC */      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,
    173173                                        BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,
    174174                                        BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float16Complex,      BT Float32Complex,      BT Float32Complex,
     
    226226                                  },
    227227                                  {
    228                 /*     FD */             BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,
     228                /*    _FD */             BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,
    229229                                               BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,             BT Float64,
    230230                                               BT Float64,             BT Float64,             BT Float64,      BT Float64Complex,             BT Float64,      BT Float64Complex,
     
    258258                                  },
    259259                                  {
    260                 /*   F80X */            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,
     260                /*   _FDX */            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,
    261261                                              BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,            BT Float64x,
    262262                                              BT Float64x,            BT Float64x,            BT Float64x,     BT Float64xComplex,            BT Float64x,     BT Float64xComplex,
     
    274274                                  },
    275275                                  {
    276                 /*    F80 */             BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,
     276                /*   _F80 */             BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,
    277277                                               BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,             BT Float80,
    278278                                               BT Float80,             BT Float80,             BT Float80,     BT Float64xComplex,             BT Float80,     BT Float64xComplex,
     
    282282                                  },
    283283                                  {
    284                 /*    _FB */            BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,
     284                /*   _FLD */            BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,
    285285                                              BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,            BT Float128,
    286286                                              BT Float128,            BT Float128,            BT Float128,     BT Float128Complex,            BT Float128,     BT Float128Complex,
     
    298298                                  },
    299299                                  {
    300                 /*     FB */          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
     300                /*  __FLD */          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
    301301                                            BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,          BT uuFloat128,
    302302                                            BT uuFloat128,          BT uuFloat128,          BT uuFloat128,     BT Float128Complex,          BT uuFloat128,     BT Float128Complex,
     
    322322                                  },
    323323                                  {
    324                 /*   _FBX */           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,
     324                /*  _FLDX */           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,
    325325                                             BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,           BT Float128x,
    326326                                             BT Float128x,           BT Float128x,           BT Float128x,    BT Float128xComplex,           BT Float128x,    BT Float128xComplex,
  • src/ResolvExpr/ConversionCost.cpp

    r7d65715f rd60a4c2  
    6262        // GENERATED BY BasicTypes-gen.cpp
    6363        static const int costMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // path length from root to node
    64                 /*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
    65                 /*      B */ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  15,  16,  17,  16,  18,  17, },
    66                 /*      C */ {  -1,   0,   1,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
    67                 /*     SC */ {  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
    68                 /*     UC */ {  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  15,  17,  16, },
    69                 /*     SI */ {  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
    70                 /*    SUI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  14,  16,  15, },
    71                 /*      I */ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
    72                 /*     UI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  13,  15,  14, },
    73                 /*     LI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
    74                 /*    LUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  12,  14,  13, },
    75                 /*    LLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
    76                 /*   LLUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  11,  13,  12, },
    77                 /*     IB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
    78                 /*    UIB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  10,  12,  11, },
    79                 /*    _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,   9,  11,  10, },
    80                 /*    _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,   6,  -1,  -1,   7,  -1,  -1,   8,  -1,   9, },
    81                 /*     _F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   9,   8,  10,   9, },
    82                 /*    _FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,  -1,   6,  -1,  -1,   7,  -1,   8, },
    83                 /*      F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   8,   7,   9,   8, },
    84                 /*     FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,  -1,   5,  -1,  -1,   6,  -1,   7, },
    85                 /*    _FX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   6,   8,   7, },
    86                 /*   _FXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,  -1,   4,  -1,  -1,   5,  -1,   6, },
    87                 /*     FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   5,   7,   6, },
    88                 /*   _FDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,  -1,   3,  -1,  -1,   4,  -1,   5, },
    89                 /*      D */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   4,   6,   5, },
    90                 /*     DC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,  -1,   2,  -1,  -1,   3,  -1,   4, },
    91                 /*   F80X */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   3,   5,   4, },
    92                 /*  _FDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,  -1,   2,  -1,   3, },
    93                 /*    F80 */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3,   3,   4,   4, },
    94                 /*    _FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3, },
    95                 /*  _FLDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   1,  -1,   2, },
    96                 /*     FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3, },
     64                /*               B    C   SC   UC   SI  USI    I   UI   LI  ULI  LLI ULLI __ID__UID  _FH _FHC   _F  _FC    F   FC  _FX _FXC  _FD _FDC    D   DC _FDX_FDXC _F80 _FLD_FLDC__FLD   LD  LDC_FLDX_FLDXC */
     65                /*      B */ {   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  14,  15,  16,  16,  17,  18,  18,  19, },
     66                /*      C */ {  -1,   0,   1,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  15,  16,  17,  17,  18, },
     67                /*     SC */ {  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  15,  16,  17,  17,  18, },
     68                /*     UC */ {  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  13,  14,  15,  15,  16,  17,  17,  18, },
     69                /*     SI */ {  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  14,  15,  16,  16,  17, },
     70                /*    USI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  12,  13,  14,  14,  15,  16,  16,  17, },
     71                /*      I */ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  13,  14,  15,  15,  16, },
     72                /*     UI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  11,  12,  13,  13,  14,  15,  15,  16, },
     73                /*     LI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  12,  13,  14,  14,  15, },
     74                /*    ULI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  10,  11,  12,  12,  13,  14,  14,  15, },
     75                /*    LLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  11,  12,  13,  13,  14, },
     76                /*   ULLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,   9,  10,  11,  11,  12,  13,  13,  14, },
     77                /*   __ID */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,  10,  11,  12,  12,  13, },
     78                /*  __UID */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   8,   9,  10,  10,  11,  12,  12,  13, },
     79                /*    _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   7,   8,   9,   9,  10,  11,  11,  12, },
     80                /*   _FHC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,   6,  -1,  -1,   8,  -1,  -1,  10,  -1,  11, },
     81                /*     _F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   6,   7,   8,   8,   9,  10,  10,  11, },
     82                /*    _FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,   5,  -1,  -1,   7,  -1,  -1,   9,  -1,  10, },
     83                /*      F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   5,   6,   7,   7,   8,   9,   9,  10, },
     84                /*     FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,   4,  -1,  -1,   6,  -1,  -1,   8,  -1,   9, },
     85                /*    _FX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   4,   5,   6,   6,   7,   8,   8,   9, },
     86                /*   _FXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,   3,  -1,  -1,   5,  -1,  -1,   7,  -1,   8, },
     87                /*    _FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   3,   4,   5,   5,   6,   7,   7,   8, },
     88                /*   _FDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,   2,  -1,  -1,   4,  -1,  -1,   6,  -1,   7, },
     89                /*      D */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   2,   3,   4,   4,   5,   6,   6,   7, },
     90                /*     DC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1,  -1,  -1,   3,  -1,  -1,   5,  -1,   6, },
     91                /*   _FDX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4,   5,   5,   6, },
     92                /*  _FDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   2,  -1,  -1,   4,  -1,   5, },
     93                /*   _F80 */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3,   4,   4,   5, },
     94                /*   _FLD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2,   3,   3,   4, },
     95                /*  _FLDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   2,  -1,   3, },
     96                /*  __FLD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   1,   0,   1,   2,   2,   3, },
    9797                /*     LD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   1,   2, },
    9898                /*    LDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   1, },
    99                 /*   _FBX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1, },
     99                /*  _FLDX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1, },
    100100                /* _FLDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
    101101        }; // costMatrix
    102         static const int maxIntCost = 15;
     102        static const int maxIntCost = 16;
    103103        // GENERATED END
    104104        static_assert(
     
    110110        // GENERATED BY BasicTypes-gen.cpp
    111111        static const int signMatrix[ast::BasicKind::NUMBER_OF_BASIC_TYPES][ast::BasicKind::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion
    112                 /*               B    C   SC   UC   SI  SUI    I   UI   LI  LUI  LLI LLUI   IB  UIB  _FH  _FH   _F  _FC    F   FC  _FX _FXC   FD _FDC    D   DC F80X_FDXC  F80  _FB_FLDC   FB   LD  LDC _FBX_FLDXC */
     112                /*               B    C   SC   UC   SI  USI    I   UI   LI  ULI  LLI ULLI __ID__UID  _FH _FHC   _F  _FC    F   FC  _FX _FXC  _FD _FDC    D   DC _FDX_FDXC _F80 _FLD_FLDC__FLD   LD  LDC_FLDX_FLDXC */
    113113                /*      B */ {   0,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    114114                /*      C */ {  -1,   0,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     
    116116                /*     UC */ {  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    117117                /*     SI */ {  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    118                 /*    SUI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     118                /*    USI */ {  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    119119                /*      I */ {  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    120120                /*     UI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    121121                /*     LI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    122                 /*    LUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     122                /*    ULI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    123123                /*    LLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    124                 /*   LLUI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    125                 /*     IB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    126                 /*    UIB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     124                /*   ULLI */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     125                /*   __ID */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     126                /*  __UID */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    127127                /*    _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    128                 /*    _FH */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
     128                /*   _FHC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    129129                /*     _F */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    130130                /*    _FC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
     
    133133                /*    _FX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    134134                /*   _FXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    135                 /*     FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     135                /*    _FD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    136136                /*   _FDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    137137                /*      D */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    138138                /*     DC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    139                 /*   F80X */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     139                /*   _FDX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    140140                /*  _FDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    141                 /*    F80 */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
    142                 /*    _FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0, },
     141                /*   _F80 */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0,   0,   0, },
     142                /*   _FLD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0,   0, },
    143143                /*  _FLDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,  -1,   0,  -1,   0, },
    144                 /*     FB */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0, },
     144                /*  __FLD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0,   0,   0, },
    145145                /*     LD */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0,   0,   0, },
    146146                /*    LDC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,  -1,   0, },
    147                 /*   _FBX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0, },
     147                /*  _FLDX */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0,   0, },
    148148                /* _FLDXC */ {  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,  -1,   0, },
    149149        }; // signMatrix
  • src/Virtual/ExpandCasts.cpp

    r7d65715f rd60a4c2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.cpp --
     7// ExpandCasts.cpp -- Expand virtual casts into lower level code.
    88//
    99// Author           : Andrew Beach
  • src/Virtual/ExpandCasts.hpp

    r7d65715f rd60a4c2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ExpandCasts.hpp --
     7// ExpandCasts.hpp -- Expand virtual casts into lower level code.
    88//
    99// Author           : Andrew Beach
    1010// Created On       : Mon Jul 24 13:54:00 2017
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jul 29 14:40:00 2022
    13 // Update Count     : 1
     12// Last Modified On : Fri Jan 10 14:34:00 2025
     13// Update Count     : 2
    1414//
    1515
    1616#pragma once
    1717
    18 #include <list>  // for list
    19 
    20 class Declaration;
    2118namespace ast {
    2219        class TranslationUnit;
     
    2421
    2522namespace Virtual {
    26 void expandCasts( std::list< Declaration * > & translationUnit );
    2723void expandCasts( ast::TranslationUnit & translationUnit );
    2824// Breaks all virtual cast nodes up into translatable nodes.
    2925
    30 // Later this might just set some information so it can happen at CodeGen.
    31 
    3226}
Note: See TracChangeset for help on using the changeset viewer.