Changeset 447b0d2b for src


Ignore:
Timestamp:
Sep 3, 2020, 12:07:15 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
9617533
Parents:
4bc27c0 (diff), 73f1b1c (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

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.hpp

    r4bc27c0 r447b0d2b  
    4848//
    4949// Several additional features are available through inheritance
     50// | PureVisitor           - makes the visitor pure, it never modifies nodes in place and always
     51//                           clones nodes it needs to make changes to
    5052// | WithTypeSubstitution  - provides polymorphic const TypeSubstitution * env for the
    5153//                           current expression
     
    267269/// Keep track of the polymorphic const TypeSubstitution * env for the current expression
    268270
    269 /// marker to force shallow copies in pass visit
     271/// If used the visitor will always clone nodes.
    270272struct PureVisitor {};
    271273
  • src/AST/Pass.impl.hpp

    r4bc27c0 r447b0d2b  
    2121
    2222#include "AST/TypeSubstitution.hpp"
    23 // #include "AST/Copy.hpp"
    2423
    2524#define VISIT_START( node ) \
     
    329328
    330329                if( __pass::differs(old_val, new_val) ) {
    331                         // auto new_parent = mutate(parent);
    332330                        auto new_parent = __pass::mutate<core_t>(parent);
    333331                        new_parent->*child = new_val;
  • src/AST/TypeSubstitution.hpp

    r4bc27c0 r447b0d2b  
    4646        template< typename SynTreeClass >
    4747        struct ApplyResult {
    48                 // const SynTreeClass * node;
    4948                ast::ptr<SynTreeClass> node;
    5049                int count;
     
    187186        assert( input );
    188187        Pass<Substituter> sub( *this, false );
    189 //      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
    190188        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    191189        return { input, sub.core.subCount };
     
    196194        assert( input );
    197195        Pass<Substituter> sub( *this, true );
    198 //      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
    199196        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    200197        return { input, sub.core.subCount };
  • src/ResolvExpr/Unify.cc

    r4bc27c0 r447b0d2b  
    11131113                        ast::Pass<TtypeExpander_new> expander{ tenv };
    11141114
    1115                         // ast::ptr<ast::TupleType> tuplec = tuple;
    1116                         // ast::ptr<ast::TupleType> tuple2c = tuple2;
    11171115                        const ast::Type * flat = tuple->accept( expander );
    11181116                        const ast::Type * flat2 = tuple2->accept( expander );
Note: See TracChangeset for help on using the changeset viewer.