Changeset 2e9b59b for src/AST/Util.cpp


Ignore:
Timestamp:
Apr 19, 2022, 3:00:04 PM (3 years ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
5b84a321
Parents:
ba897d21 (diff), bb7c77d (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:

added benchmark and evaluations chapter to thesis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Util.cpp

    rba897d21 r2e9b59b  
    1010// Created On       : Wed Jan 19  9:46:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Feb 18  9:42:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Fri Mar 11 18:07:00 2022
     13// Update Count     : 1
    1414//
    1515
    1616#include "Util.hpp"
    1717
    18 #include "Decl.hpp"
    1918#include "Node.hpp"
     19#include "ParseNode.hpp"
    2020#include "Pass.hpp"
    2121#include "TranslationUnit.hpp"
    22 #include "Common/ScopedMap.h"
    2322
    2423#include <vector>
     
    4645};
    4746
     47/// Check that every note that can has a set CodeLocation.
     48struct SetCodeLocationsCore {
     49        void previsit( const ParseNode * node ) {
     50                assert( node->location.isSet() );
     51        }
     52};
     53
    4854struct InvariantCore {
    4955        // To save on the number of visits: this is a kind of composed core.
    5056        // None of the passes should make changes so ordering doesn't matter.
    5157        NoStrongCyclesCore no_strong_cycles;
     58        SetCodeLocationsCore set_code_locations;
    5259
    5360        void previsit( const Node * node ) {
    5461                no_strong_cycles.previsit( node );
     62        }
     63
     64        void previsit( const ParseNode * node ) {
     65                no_strong_cycles.previsit( node );
     66                set_code_locations.previsit( node );
    5567        }
    5668
Note: See TracChangeset for help on using the changeset viewer.