Changeset eb7586e for src/main.cc


Ignore:
Timestamp:
Apr 28, 2024, 7:50:11 PM (2 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
c5c123f
Parents:
7042c60
Message:
  1. Change return value of typed Enum in null context: they now return the position. Therefore, printf with enumeration value will no longer be supported. 2. sout now will return the enumeration value. So sout | enumValue will print what we expect. 3. Provide enum.hfa, which contains traits that related to enum. 4. Implement functions declare in enum.hfa for enum types, so enum type fulfill the traits. Known defeat: error if we use the enum traits on enum types. They work but c compiler gives an warning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r7042c60 reb7586e  
    325325                PASS( "Validate Generic Parameters", Validate::fillGenericParameters, transUnit );
    326326                PASS( "Translate Dimensions", Validate::translateDimensionParameters, transUnit );
     327                // Need to happen before fixing returns because implementEnumFunc has ReturnStmt
     328               
     329                PASS( "Generate Enum Attributes Functions", Validate::implementEnumFunc, transUnit );
    327330                PASS( "Check Function Returns", Validate::checkReturnStatements, transUnit );
    328331                PASS( "Fix Return Statements", InitTweak::fixReturnStatements, transUnit );
     
    333336
    334337                PASS( "Generate Autogen Routines", Validate::autogenerateRoutines, transUnit );
    335                 PASS( "Generate Enum Attributes Functions", Validate::implementEnumFunc, transUnit );
    336 
     338               
    337339                PASS( "Implement Actors", Concurrency::implementActors, transUnit );
    338340                PASS( "Implement Virtual Destructors", Virtual::implementVirtDtors, transUnit );
Note: See TracChangeset for help on using the changeset viewer.