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/Common/CodeLocationTools.cpp

    rba897d21 r2e9b59b  
    99// Author           : Andrew Beach
    1010// Created On       : Fri Dec  4 15:42:00 2020
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Feb  1 09:14:39 2022
    13 // Update Count     : 3
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Mar 14 15:14:00 2022
     13// Update Count     : 4
    1414//
    1515
     
    112112    macro(ForStmt, Stmt) \
    113113    macro(SwitchStmt, Stmt) \
    114     macro(CaseStmt, Stmt) \
     114    macro(CaseClause, CaseClause) \
    115115    macro(BranchStmt, Stmt) \
    116116    macro(ReturnStmt, Stmt) \
    117117    macro(ThrowStmt, Stmt) \
    118118    macro(TryStmt, Stmt) \
    119     macro(CatchStmt, Stmt) \
    120     macro(FinallyStmt, Stmt) \
     119    macro(CatchClause, CatchClause) \
     120    macro(FinallyClause, FinallyClause) \
    121121    macro(SuspendStmt, Stmt) \
    122122    macro(WaitForStmt, Stmt) \
     
    147147    macro(CommaExpr, Expr) \
    148148    macro(TypeExpr, Expr) \
     149    macro(DimensionExpr, Expr) \
    149150    macro(AsmExpr, Expr) \
    150151    macro(ImplicitCopyCtorExpr, Expr) \
     
    239240};
    240241
     242class LocalFillCore : public ast::WithGuards {
     243        CodeLocation const * parent;
     244public:
     245        LocalFillCore( CodeLocation const & location ) : parent( &location ) {
     246                assert( location.isSet() );
     247        }
     248
     249        template<typename node_t>
     250        auto previsit( node_t const * node )
     251                        -> typename std::enable_if<has_code_location<node_t>::value, node_t const *>::type {
     252                if ( node->location.isSet() ) {
     253                        GuardValue( parent ) = &node->location;
     254                        return node;
     255                } else {
     256                        node_t * mut = ast::mutate( node );
     257                        mut->location = *parent;
     258                        return mut;
     259                }
     260        }
     261};
     262
    241263} // namespace
    242264
     
    278300        ast::Pass<FillCore>::run( unit );
    279301}
     302
     303ast::Node const * localFillCodeLocations(
     304                CodeLocation const & location , ast::Node const * node ) {
     305        ast::Pass<LocalFillCore> visitor( location );
     306        return node->accept( visitor );
     307}
Note: See TracChangeset for help on using the changeset viewer.