Ignore:
Timestamp:
Nov 17, 2023, 1:56:19 PM (13 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
16e0dcb, 41606df1
Parents:
3f219eb (diff), b0845f9 (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:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Tuples.cc

    r3f219eb r0f6d2884  
    2525namespace {
    2626
    27         /// Determines if impurity (read: side-effects) may exist in a piece of code. Currently gives
    28         /// a very crude approximation, wherein any function call expression means the code may be
    29         /// impure.
    30     struct ImpurityDetector : public ast::WithShortCircuiting {
    31                 bool result = false;
     27/// Determines if impurity (read: side-effects) may exist in a piece of code.
     28/// Currently gives a very crude approximation, wherein almost any function
     29/// call expression means the code may be impure.
     30struct ImpurityDetector : public ast::WithShortCircuiting {
     31        bool result = false;
    3232
    33                 void previsit( ast::ApplicationExpr const * appExpr ) {
    34                         if ( ast::DeclWithType const * function = ast::getFunction( appExpr ) ) {
    35                                 if ( function->linkage == ast::Linkage::Intrinsic
    36                                                 && ( function->name == "*?" || function->name == "?[?]" ) ) {
    37                                         return;
    38                                 }
     33        void previsit( ast::ApplicationExpr const * appExpr ) {
     34                if ( ast::DeclWithType const * function = ast::getFunction( appExpr ) ) {
     35                        if ( function->linkage == ast::Linkage::Intrinsic
     36                                        && ( function->name == "*?" || function->name == "?[?]" ) ) {
     37                                return;
    3938                        }
    40                         result = true; visit_children = false;
    4139                }
    42                 void previsit( ast::UntypedExpr const * ) {
    43                         result = true; visit_children = false;
    44                 }
    45         };
     40                result = true; visit_children = false;
     41        }
     42        void previsit( ast::UntypedExpr const * ) {
     43                result = true; visit_children = false;
     44        }
     45};
    4646
    47         struct ImpurityDetectorIgnoreUnique : public ImpurityDetector {
    48                 using ImpurityDetector::previsit;
    49                 void previsit( ast::UniqueExpr const * ) {
    50                         visit_children = false;
    51                 }
    52         };
     47struct ImpurityDetectorIgnoreUnique : public ImpurityDetector {
     48        using ImpurityDetector::previsit;
     49        void previsit( ast::UniqueExpr const * ) {
     50                visit_children = false;
     51        }
     52};
     53
    5354} // namespace
    5455
Note: See TracChangeset for help on using the changeset viewer.