Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r4615ac8 r0e464f6  
    5959#include "ResolvExpr/Resolver.h"            // for resolve
    6060#include "SymTab/Validate.h"                // for validate
    61 #include "SynTree/TopLvalue.h"              // for assertTopLvalue, clearInn...
    6261#include "SynTree/Declaration.h"            // for Declaration
    6362#include "SynTree/Visitor.h"                // for acceptAll
    6463#include "Tuples/Tuples.h"                  // for expandMemberTuples, expan...
    6564#include "Virtual/ExpandCasts.h"            // for expandCasts
    66 
    6765
    6866using namespace std;
     
    259257                Stats::Time::StopBlock();
    260258
    261                 //std::cerr << "Post-Parse Check" << std::endl;
    262                 clearInnerLvalue( translationUnit );
    263                 assertTopLvalue( translationUnit );
    264 
    265259                // add the assignment statement after the initialization of a type parameter
    266260                PASS( "Validate", SymTab::validate( translationUnit, symtabp ) );
     
    281275                } // if
    282276
    283                 assertTopLvalue( translationUnit );
    284277                PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) );
    285                 assertTopLvalue( translationUnit );
    286278                PASS( "Fix Names", CodeGen::fixNames( translationUnit ) );
    287                 assertTopLvalue( translationUnit );
    288279                PASS( "Gen Init", InitTweak::genInit( translationUnit ) );
    289                 assertTopLvalue( translationUnit );
    290280                PASS( "Expand Member Tuples" , Tuples::expandMemberTuples( translationUnit ) );
    291                 assertTopLvalue( translationUnit );
    292281                if ( libcfap ) {
    293282                        // generate the bodies of cfa library functions
     
    313302                } // if
    314303
    315                 assertTopLvalue( translationUnit );
    316 
    317304                PASS( "Resolve", ResolvExpr::resolve( translationUnit ) );
    318305                if ( exprp ) {
     
    321308                } // if
    322309
    323                 clearInnerLvalue( translationUnit );
    324                 assertTopLvalue( translationUnit );
    325 
    326310                // fix ObjectDecl - replaces ConstructorInit nodes
    327311                PASS( "Fix Init", InitTweak::fix( translationUnit, buildingLibrary() ) );
    328                 clearInnerLvalue( translationUnit );
    329                 assertTopLvalue( translationUnit );
    330312                if ( ctorinitp ) {
    331313                        dump ( translationUnit );
     
    334316
    335317                PASS( "Expand Unique Expr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused
    336                 assertTopLvalue( translationUnit );
    337318
    338319                PASS( "Translate EHM" , ControlStruct::translateEHM( translationUnit ) );
    339                 assertTopLvalue( translationUnit );
    340320
    341321                PASS( "Gen Waitfor" , Concurrency::generateWaitFor( translationUnit ) );
    342                 clearInnerLvalue( translationUnit );
    343                 assertTopLvalue( translationUnit );
    344322
    345323                PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
    346                 clearInnerLvalue( translationUnit );
    347                 assertTopLvalue( translationUnit );
    348324
    349325                PASS( "Expand Tuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this?
    350                 assertTopLvalue( translationUnit );
    351326
    352327                if ( tuplep ) {
     
    356331
    357332                PASS( "Virtual Expand Casts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM
    358                 assertTopLvalue( translationUnit );
    359333
    360334                PASS( "Instantiate Generics", GenPoly::instantiateGeneric( translationUnit ) );
     
    363337                        return EXIT_SUCCESS;
    364338                } // if
    365                 clearInnerLvalue( translationUnit );
    366                 assertTopLvalue( translationUnit );
    367339                PASS( "Convert L-Value", GenPoly::convertLvalue( translationUnit ) );
    368                 clearInnerLvalue( translationUnit );
    369                 assertTopLvalue( translationUnit );
     340
    370341
    371342                if ( bboxp ) {
     
    374345                } // if
    375346                PASS( "Box", GenPoly::box( translationUnit ) );
    376                 clearInnerLvalue( translationUnit );
    377                 assertTopLvalue( translationUnit );
    378347
    379348                if ( bcodegenp ) {
     
    387356
    388357                CodeTools::fillLocations( translationUnit );
    389                 assertTopLvalue( translationUnit );
    390358                PASS( "Code Gen", CodeGen::generate( translationUnit, *output, ! genproto, prettycodegenp, true, linemarks ) );
    391359
Note: See TracChangeset for help on using the changeset viewer.