Changeset 4a60488 for src/SymTab


Ignore:
Timestamp:
Sep 27, 2019, 3:35:46 PM (5 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
90ce35aa
Parents:
8e1467d (diff), 849720f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged from master taking the lvalue changes to expression and everything before that.

Location:
src/SymTab
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Demangle.cc

    r8e1467d r4a60488  
    99// Author           : Rob Schluntz
    1010// Created On       : Thu Jul 19 12:52:41 2018
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Jul 19 12:54:35 2018
    13 // Update Count     : 2
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Tue Jul 30 13:46:33 2019
     13// Update Count     : 3
    1414//
    1515
     
    313313                        typeString = "_Atomic " + typeString;
    314314                } // if
    315                 if ( type->get_lvalue() ) {
    316                         // when not generating C code, print lvalue for debugging.
    317                         typeString = "lvalue " + typeString;
    318                 }
    319315        }
    320316}
  • src/SymTab/Mangler.cc

    r8e1467d r4a60488  
    1010// Created On       : Sun May 17 21:40:29 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep 25 15:49:26 2017
    13 // Update Count     : 23
     12// Last Modified On : Tue Jul 30 13:46:10 2019
     13// Update Count     : 26
    1414//
    1515#include "Mangler.h"
     
    377377                                        mangleName << Encoding::qualifiers.at(Type::Mutex);
    378378                                } // if
    379                                 if ( type->get_lvalue() ) {
    380                                         // mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues
    381                                         mangleName << Encoding::qualifiers.at(Type::Lvalue);
    382                                 }
    383 
    384379                                if ( inFunctionType ) {
    385380                                        // turn off inFunctionType so that types can be differentiated for nested qualifiers
     
    724719                                mangleName << Encoding::qualifiers.at(Type::Mutex);
    725720                        } // if
    726                         if ( type->is_lvalue() ) {
    727                                 // mangle based on whether the type is lvalue, so that the resolver can differentiate lvalues and rvalues
    728                                 mangleName << Encoding::qualifiers.at(Type::Lvalue);
    729                         }
    730 
    731721                        if ( inFunctionType ) {
    732722                                // turn off inFunctionType so that types can be differentiated for nested qualifiers
  • src/SymTab/Validate.cc

    r8e1467d r4a60488  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:50:04 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 28 13:47:23 2017
    13 // Update Count     : 359
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Aug  7 6:42:00 2019
     13// Update Count     : 360
    1414//
    1515
     
    8181#include "SynTree/Label.h"             // for operator==, Label
    8282#include "SynTree/Mutator.h"           // for Mutator
     83#include "SynTree/TopLvalue.h"         // for assertTopLvalue, clearInnerLvalue
    8384#include "SynTree/Type.h"              // for Type, TypeInstType, EnumInstType
    8485#include "SynTree/TypeSubstitution.h"  // for TypeSubstitution
     
    308309                PassVisitor<FixQualifiedTypes> fixQual;
    309310
     311                assertTopLvalue( translationUnit );
    310312                {
    311313                        Stats::Heap::newPass("validate-A");
     
    316318                        acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes_old because it is an indexer and needs correct types for mangling
    317319                }
     320                assertTopLvalue( translationUnit );
    318321                {
    319322                        Stats::Heap::newPass("validate-B");
    320323                        Stats::Time::BlockGuard guard("validate-B");
     324                        assertTopLvalue( translationUnit );
    321325                        Stats::Time::TimeBlock("Link Reference To Types", [&]() {
    322326                                acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
    323327                        });
     328                        clearInnerLvalue( translationUnit );
     329                        assertTopLvalue( translationUnit );
    324330                        Stats::Time::TimeBlock("Fix Qualified Types", [&]() {
    325331                                mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes_old, because aggregate members are accessed
    326332                        });
     333                        assertTopLvalue( translationUnit );
    327334                        Stats::Time::TimeBlock("Hoist Structs", [&]() {
    328335                                HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
    329336                        });
     337                        assertTopLvalue( translationUnit );
    330338                        Stats::Time::TimeBlock("Eliminate Typedefs", [&]() {
    331339                                EliminateTypedef::eliminateTypedef( translationUnit ); //
    332340                        });
    333341                }
     342                assertTopLvalue( translationUnit );
    334343                {
    335344                        Stats::Heap::newPass("validate-C");
     
    340349                        InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen
    341350                }
     351                assertTopLvalue( translationUnit );
    342352                {
    343353                        Stats::Heap::newPass("validate-D");
    344354                        Stats::Time::BlockGuard guard("validate-D");
     355                        assertTopLvalue( translationUnit );
    345356                        Stats::Time::TimeBlock("Apply Concurrent Keywords", [&]() {
    346357                                Concurrency::applyKeywords( translationUnit );
    347358                        });
     359                        clearInnerLvalue( translationUnit );
     360                        assertTopLvalue( translationUnit );
    348361                        Stats::Time::TimeBlock("Forall Pointer Decay", [&]() {
    349362                                acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    350363                        });
     364                        assertTopLvalue( translationUnit );
    351365                        Stats::Time::TimeBlock("Hoist Control Declarations", [&]() {
    352366                                ControlStruct::hoistControlDecls( translationUnit );  // hoist initialization out of for statements; must happen before autogenerateRoutines
    353367                        });
     368                        assertTopLvalue( translationUnit );
    354369                        Stats::Time::TimeBlock("Generate Autogen routines", [&]() {
    355370                                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay_old
    356371                        });
    357                 }
     372                        clearInnerLvalue( translationUnit );
     373                }
     374                assertTopLvalue( translationUnit );
    358375                {
    359376                        Stats::Heap::newPass("validate-E");
    360377                        Stats::Time::BlockGuard guard("validate-E");
     378                        assertTopLvalue( translationUnit );
    361379                        Stats::Time::TimeBlock("Implement Mutex Func", [&]() {
    362380                                Concurrency::implementMutexFuncs( translationUnit );
    363381                        });
     382                        clearInnerLvalue( translationUnit );
     383                        assertTopLvalue( translationUnit );
    364384                        Stats::Time::TimeBlock("Implement Thread Start", [&]() {
    365385                                Concurrency::implementThreadStarter( translationUnit );
    366386                        });
     387                        assertTopLvalue( translationUnit );
    367388                        Stats::Time::TimeBlock("Compound Literal", [&]() {
    368389                                mutateAll( translationUnit, compoundliteral );
    369390                        });
     391                        assertTopLvalue( translationUnit );
    370392                        Stats::Time::TimeBlock("Resolve With Expressions", [&]() {
    371393                                ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables
    372394                        });
    373                 }
     395                        clearInnerLvalue( translationUnit );
     396                }
     397                assertTopLvalue( translationUnit );
    374398                {
    375399                        Stats::Heap::newPass("validate-F");
    376400                        Stats::Time::BlockGuard guard("validate-F");
     401                        assertTopLvalue( translationUnit );
    377402                        Stats::Time::TimeBlock("Fix Object Type", [&]() {
    378403                                FixObjectType::fix( translationUnit );
    379404                        });
     405                        assertTopLvalue( translationUnit );
    380406                        Stats::Time::TimeBlock("Array Length", [&]() {
    381407                                ArrayLength::computeLength( translationUnit );
    382408                        });
     409                        clearInnerLvalue( translationUnit );
     410                        assertTopLvalue( translationUnit );
    383411                        Stats::Time::TimeBlock("Find Special Declarations", [&]() {
    384412                                Validate::findSpecialDecls( translationUnit );
    385413                        });
     414                        assertTopLvalue( translationUnit );
    386415                        Stats::Time::TimeBlock("Fix Label Address", [&]() {
    387416                                mutateAll( translationUnit, labelAddrFixer );
    388417                        });
     418                        assertTopLvalue( translationUnit );
    389419                        Stats::Time::TimeBlock("Handle Attributes", [&]() {
    390420                                Validate::handleAttributes( translationUnit );
    391421                        });
    392422                }
     423                assertTopLvalue( translationUnit );
    393424        }
    394425
Note: See TracChangeset for help on using the changeset viewer.