Changeset 1931bb01 for src/main.cc


Ignore:
Timestamp:
Jul 12, 2022, 3:21:18 PM (22 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
b9f8274
Parents:
9c6443e
Message:

Converted 'Validate A' to the new AST. There some utility changes as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    r9c6443e r1931bb01  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Tue Jun  7 13:29:00 2022
    13 // Update Count     : 674
     12// Last Modified On : Tue Jul 12 12:02:00 2022
     13// Update Count     : 675
    1414//
    1515
     
    7878#include "Validate/CompoundLiteral.hpp"     // for handleCompoundLiterals
    7979#include "Validate/EliminateTypedef.hpp"    // for eliminateTypedef
     80#include "Validate/EnumAndPointerDecay.hpp" // for decayEnumsAndPointers
    8081#include "Validate/FindSpecialDecls.h"      // for findGlobalDecls
    8182#include "Validate/FixQualifiedTypes.hpp"   // for fixQualifiedTypes
     83#include "Validate/FixReturnTypes.hpp"      // for fixReturnTypes
    8284#include "Validate/ForallPointerDecay.hpp"  // for decayForallPointers
    8385#include "Validate/GenericParameter.hpp"    // for fillGenericParameters, tr...
    8486#include "Validate/HoistStruct.hpp"         // for hoistStruct
     87#include "Validate/HoistTypeDecls.hpp"      // for hoistTypeDecls
    8588#include "Validate/InitializerLength.hpp"   // for setLengthFromInitializer
    8689#include "Validate/LabelAddressFixer.hpp"   // for fixLabelAddresses
    8790#include "Validate/LinkReferenceToTypes.hpp" // for linkReferenceToTypes
     91#include "Validate/ReplaceTypedef.hpp"      // for replaceTypedef
    8892#include "Validate/ReturnCheck.hpp"         // for checkReturnStatements
     93#include "Validate/VerifyCtorDtorAssign.hpp" // for verifyCtorDtorAssign
    8994#include "Virtual/ExpandCasts.h"            // for expandCasts
    9095
     
    331336                } // if
    332337
    333                 // add the assignment statement after the initialization of a type parameter
    334                 PASS( "Validate-A", SymTab::validate_A( translationUnit ) );
    335 
    336338                CodeTools::fillLocations( translationUnit );
    337339
     
    346348
    347349                        forceFillCodeLocations( transUnit );
     350
     351                        // Must happen before auto-gen, or anything that examines ops.
     352                        PASS( "Verify Ctor, Dtor & Assign", Validate::verifyCtorDtorAssign( transUnit ) );
     353
     354                        PASS( "Hoist Type Decls", Validate::hoistTypeDecls( transUnit ) );
     355                        // Hoist Type Decls pulls some declarations out of contexts where
     356                        // locations are not tracked. Perhaps they should be, but for now
     357                        // the full fill solves it.
     358                        forceFillCodeLocations( transUnit );
     359
     360                        PASS( "Replace Typedefs", Validate::replaceTypedef( transUnit ) );
     361
     362                        // Must happen before auto-gen.
     363                        PASS( "Fix Return Types", Validate::fixReturnTypes( transUnit ) );
     364
     365                        // Must happen before Link Reference to Types, it needs correct
     366                        // types for mangling.
     367                        PASS( "Enum and Pointer Decay", Validate::decayEnumsAndPointers( transUnit ) );
    348368
    349369                        // Must happen before auto-gen, because it uses the sized flag.
     
    453473                        translationUnit = convert( move( transUnit ) );
    454474                } else {
     475                        // add the assignment statement after the initialization of a type parameter
     476                        PASS( "Validate-A", SymTab::validate_A( translationUnit ) );
    455477                        PASS( "Validate-B", SymTab::validate_B( translationUnit ) );
    456478                        PASS( "Validate-C", SymTab::validate_C( translationUnit ) );
Note: See TracChangeset for help on using the changeset viewer.