Ignore:
Timestamp:
Feb 15, 2022, 2:50:07 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
6dc17a3d
Parents:
1a0b600 (diff), a38bbbc (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/AST/Pass.proto.hpp

    r1a0b600 r7d18733  
    123123                static constexpr bool value = std::is_void< ret_t >::value ||
    124124                        std::is_base_of<const node_t, typename std::remove_pointer<ret_t>::type >::value;
     125        };
     126
     127        /// The result is a single node.
     128        template< typename node_t >
     129        struct result1 {
     130                bool differs;
     131                const node_t * value;
     132
     133                template< typename object_t, typename super_t, typename field_t >
     134                void apply( object_t *, field_t super_t::* field );
     135        };
     136
     137        /// The result is a container of statements.
     138        template< template<class...> class container_t >
     139        struct resultNstmt {
     140                /// The delta/change on a single node.
     141                struct delta {
     142                        ptr<Stmt> new_val;
     143                        ssize_t old_idx;
     144                        bool is_old;
     145
     146                        delta(const Stmt * s, ssize_t i, bool old) :
     147                                new_val(s), old_idx(i), is_old(old) {}
     148                };
     149
     150                bool differs;
     151                container_t< delta > values;
     152
     153                template< typename object_t, typename super_t, typename field_t >
     154                void apply( object_t *, field_t super_t::* field );
     155
     156                template< template<class...> class incontainer_t >
     157                void take_all( incontainer_t<ptr<Stmt>> * stmts );
     158
     159                template< template<class...> class incontainer_t >
     160                void take_all( incontainer_t<ptr<Decl>> * decls );
     161        };
     162
     163        /// The result is a container of nodes.
     164        template< template<class...> class container_t, typename node_t >
     165        struct resultN {
     166                bool differs;
     167                container_t<ptr<node_t>> values;
     168
     169                template< typename object_t, typename super_t, typename field_t >
     170                void apply( object_t *, field_t super_t::* field );
    125171        };
    126172
Note: See TracChangeset for help on using the changeset viewer.