Changeset 01d433e for src/main.cc


Ignore:
Timestamp:
Aug 18, 2021, 1:15:22 PM (3 months ago)
Author:
Henry Xue <y58xue@…>
Branches:
master, new-ast-unique-expr
Children:
bb9924c
Parents:
6d63c14
Message:

Convert expandUniqueExpr pass to use new AST (NOT WORKING)

Currently not working due to unresolved issues with UniqueExpr?. See
page 5 of https://cforall.uwaterloo.ca/doc/Fangren_Yu_Report_S20.pdf
for more details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r6d63c14 r01d433e  
    374374
    375375                        PASS( "Fix Init", InitTweak::fix(transUnit, buildingLibrary()));
     376
     377                        // fix ObjectDecl - replaces ConstructorInit nodes
     378                        if ( ctorinitp ) {
     379                                dump( move( transUnit ) );
     380                                return EXIT_SUCCESS;
     381                        } // if
     382
     383                        // Currently not working due to unresolved issues with UniqueExpr
     384                        PASS( "Expand Unique Expr", Tuples::expandUniqueExpr( transUnit ) ); // 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
    376385                        translationUnit = convert( move( transUnit ) );
    377386                } else {
     
    383392
    384393                        PASS( "Fix Init", InitTweak::fix( translationUnit, buildingLibrary() ) );
     394
     395                        // fix ObjectDecl - replaces ConstructorInit nodes
     396                        if ( ctorinitp ) {
     397                                dump ( translationUnit );
     398                                return EXIT_SUCCESS;
     399                        } // if
     400
     401                        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
    385402                }
    386 
    387                 // fix ObjectDecl - replaces ConstructorInit nodes
    388                 if ( ctorinitp ) {
    389                         dump ( translationUnit );
    390                         return EXIT_SUCCESS;
    391                 } // if
    392 
    393                 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
    394403
    395404                PASS( "Translate Tries" , ControlStruct::translateTries( translationUnit ) );
Note: See TracChangeset for help on using the changeset viewer.