Changeset 7fffb1b for src


Ignore:
Timestamp:
Oct 6, 2022, 11:25:49 AM (19 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
8c91088
Parents:
d0a00a5a
Message:

Translated the convertLvalue pass. It could possibly use some additional clean-up.

Location:
src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.h

    rd0a00a5a r7fffb1b  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:21:59 2017
    13 // Update Count     : 2
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thu Sep 15 14:13:00 2022
     13// Update Count     : 3
    1414//
    1515
     
    2020class Declaration;
    2121class Expression;
     22namespace ast {
     23        class Expr;
     24        class TranslationUnit;
     25}
    2226
    2327namespace GenPoly {
    2428        /// replaces return type of `lvalue T` with `T*`, along with appropriate address-of and dereference operators
    2529        void convertLvalue( std::list< Declaration* >& translationUnit );
     30        void convertLvalue( ast::TranslationUnit & translationUnit );
    2631
    2732        /// true after reference types have been eliminated from the source code. After this point, reference types should not be added to the AST.
     
    3035        /// applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b)
    3136        Expression * generalizedLvalue( Expression * expr );
     37        ast::Expr const * generalizedLvalue( ast::Expr const * expr );
    3238} // namespace GenPoly
    3339
  • src/GenPoly/module.mk

    rd0a00a5a r7fffb1b  
    3030        GenPoly/InstantiateGeneric.cc \
    3131        GenPoly/InstantiateGeneric.h \
     32        GenPoly/LvalueNew.cpp \
    3233        GenPoly/Lvalue.cc \
    3334        GenPoly/ScopedSet.h \
  • src/main.cc

    rd0a00a5a r7fffb1b  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Sep 15 13:58:00 2022
    13 // Update Count     : 678
     12// Last Modified On : Wed Oct  5 12:06:00 2022
     13// Update Count     : 679
    1414//
    1515
     
    444444
    445445                PASS( "Instantiate Generics", GenPoly::instantiateGeneric( transUnit ) );
     446                if ( genericsp ) {
     447                        dump( std::move( transUnit ) );
     448                        return EXIT_SUCCESS;
     449                } // if
     450
     451                PASS( "Convert L-Value", GenPoly::convertLvalue( transUnit ) );
    446452
    447453                translationUnit = convert( std::move( transUnit ) );
    448 
    449                 if ( genericsp ) {
    450                         dump( translationUnit );
    451                         return EXIT_SUCCESS;
    452                 } // if
    453 
    454                 PASS( "Convert L-Value", GenPoly::convertLvalue( translationUnit ) );
    455454
    456455                if ( bboxp ) {
Note: See TracChangeset for help on using the changeset viewer.