Changeset a758169 for src/main.cpp


Ignore:
Timestamp:
Jul 17, 2024, 1:16:36 PM (36 hours ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
6804f38
Parents:
0097d08
Message:

In main: cleaned up a macro and updated some names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cpp

    r0097d08 ra758169  
    113113#define DUMP( cond, unit )                  \
    114114        if ( cond ) {                           \
    115                 dump(unit);                         \
     115                dump( std::move( unit ) );          \
    116116                return EXIT_SUCCESS;                \
    117117        }
     
    279279                        // Read to gcc builtins, if not generating the cfa library
    280280                        FILE * gcc_builtins = fopen( (PreludeDirector + "/gcc-builtins.cfa").c_str(), "r" );
    281                         assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
     281                        assertf( gcc_builtins, "cannot open gcc-builtins.cfa\n" );
    282282                        parse( gcc_builtins, ast::Linkage::Compiler );
    283283
    284284                        // read the extra prelude in, if not generating the cfa library
    285285                        FILE * extras = fopen( (PreludeDirector + "/extras.cfa").c_str(), "r" );
    286                         assertf( extras, "cannot open extras.cf\n" );
     286                        assertf( extras, "cannot open extras.cfa\n" );
    287287                        parse( extras, ast::Linkage::BuiltinC );
    288288                        if ( ! libcfap ) {
     
    294294                                // Read to cfa builtins, if not generating the cfa library
    295295                                FILE * builtins = fopen( (PreludeDirector + "/builtins.cfa").c_str(), "r" );
    296                                 assertf( builtins, "cannot open builtins.cf\n" );
     296                                assertf( builtins, "cannot open builtins.cfa\n" );
    297297                                parse( builtins, ast::Linkage::BuiltinCFA );
    298298                        } // if
     
    303303                transUnit = buildUnit();
    304304
    305                 DUMP( astp, std::move( transUnit ) );
     305                DUMP( astp, transUnit );
    306306
    307307                Stats::Time::StopBlock();
     
    310310
    311311                PASS( "Translate Exception Declarations", ControlStruct::translateExcept, transUnit );
    312                 DUMP( exdeclp, std::move( transUnit ) );
     312                DUMP( exdeclp, transUnit );
    313313                PASS( "Verify Ctor, Dtor & Assign", Validate::verifyCtorDtorAssign, transUnit );
    314314                PASS( "Replace Typedefs", Validate::replaceTypedef, transUnit );
     
    353353                } // if
    354354
    355                 DUMP( validp, std::move( transUnit ) );
     355                DUMP( validp, transUnit );
    356356
    357357                PASS( "Translate Throws", ControlStruct::translateThrows, transUnit );
     
    372372                } // if
    373373
    374                 DUMP( bresolvep, std::move( transUnit ) );
     374                DUMP( bresolvep, transUnit );
    375375
    376376                if ( resolvprotop ) {
     
    380380
    381381                PASS( "Resolve", ResolvExpr::resolve, transUnit );
    382                 DUMP( exprp, std::move( transUnit ) );
     382                DUMP( exprp, transUnit );
    383383                PASS( "Fix Init", InitTweak::fix, transUnit, buildingLibrary() ); // Here
    384384                PASS( "Erase With", ResolvExpr::eraseWith, transUnit );
    385385
    386386                // fix ObjectDecl - replaces ConstructorInit nodes
    387                 DUMP( ctorinitp, std::move( transUnit ) );
     387                DUMP( ctorinitp, transUnit );
    388388
    389389                // Currently not working due to unresolved issues with UniqueExpr
     
    398398
    399399                PASS( "Expand Tuples", Tuples::expandTuples, transUnit );
    400                 DUMP( tuplep, std::move( transUnit ) );
     400                DUMP( tuplep, transUnit );
    401401
    402402                // Must come after Translate Tries.
     
    404404
    405405                PASS( "Instantiate Generics", GenPoly::instantiateGeneric, transUnit );
    406                 DUMP( genericsp, std::move( transUnit ) );
     406                DUMP( genericsp, transUnit );
    407407
    408408                PASS( "Convert L-Value", GenPoly::convertLvalue, transUnit );
    409                 DUMP( bboxp, std::move( transUnit ) );
     409                DUMP( bboxp, transUnit );
    410410                PASS( "Box", GenPoly::box, transUnit );
    411411                PASS( "Link-Once", CodeGen::translateLinkOnce, transUnit );
     
    413413                // Code has been lowered to C, now we can start generation.
    414414
    415                 DUMP( bcodegenp, std::move( transUnit ) );
     415                DUMP( bcodegenp, transUnit );
    416416
    417417                if ( optind < argc ) {                                                  // any commands after the flags and input file ? => output file name
Note: See TracChangeset for help on using the changeset viewer.