Changeset 9617533


Ignore:
Timestamp:
Sep 3, 2020, 4:28:16 PM (14 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
a3ade94, ebb7b66
Parents:
47dd0d2 (diff), 447b0d2b (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 into master

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.hpp

    r47dd0d2 r9617533  
    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

    r47dd0d2 r9617533  
    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

    r47dd0d2 r9617533  
    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

    r47dd0d2 r9617533  
    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 );
  • tests/errors/.expect/completeType.x86.txt

    r47dd0d2 r9617533  
    66    Name: x
    77
    8 ... to: nothing
    9 with resolved type:
    10   void  Alternatives are:
     8... to: nothing Alternatives are:
    119Cost ( 0, 1, 2, 0, 1, -1, 0 ): Generated Cast of:
    1210      Application of
     
    2220
    2321
    24         with resolved type:
    25           pointer to forall
    26             _89_4_DT: data type
    27             function
    28           ... with parameters
    29             intrinsic pointer to instance of type _89_4_DT (not function type)
    30           ... returning
    31             _retval__operator_deref: reference to instance of type _89_4_DT (not function type)
    32             ... with attributes:
    33               Attribute with name: unused
    34 
    35 
    3622      ... to arguments
    3723        Variable Expression: x: pointer to instance of struct A with body 0
    38         with resolved type:
    39           pointer to instance of struct A with body 0
    4024
    41       with resolved type:
    42         reference to instance of struct A with body 0
    4325    ... to: nothing
    44     with resolved type:
    45       void
    4626  (types:
    4727    void
     
    6343
    6444
    65         with resolved type:
    66           pointer to forall
    67             _89_4_DT: data type
    68             function
    69           ... with parameters
    70             intrinsic pointer to instance of type _89_4_DT (not function type)
    71           ... returning
    72             _retval__operator_deref: reference to instance of type _89_4_DT (not function type)
    73             ... with attributes:
    74               Attribute with name: unused
    75 
    76 
    7745      ... to arguments
    7846        Variable Expression: x: pointer to instance of struct B with body 1
    79         with resolved type:
    80           pointer to instance of struct B with body 1
    8147
    82       with resolved type:
    83         reference to instance of struct B with body 1
    8448    ... to: nothing
    85     with resolved type:
    86       void
    8749  (types:
    8850    void
     
    159121            ... returning nothing
    160122
    161             with resolved type:
    162               pointer to forall
    163                 _108_0_T: sized data type
    164                 ... with assertions
    165                   ?=?: pointer to function
    166                   ... with parameters
    167                     reference to instance of type _108_0_T (not function type)
    168                     instance of type _108_0_T (not function type)
    169                   ... returning
    170                     _retval__operator_assign: instance of type _108_0_T (not function type)
    171                     ... with attributes:
    172                       Attribute with name: unused
    173 
    174 
    175                   ?{}: pointer to function
    176                   ... with parameters
    177                     reference to instance of type _108_0_T (not function type)
    178                   ... returning nothing
    179 
    180                   ?{}: pointer to function
    181                   ... with parameters
    182                     reference to instance of type _108_0_T (not function type)
    183                     instance of type _108_0_T (not function type)
    184                   ... returning nothing
    185 
    186                   ^?{}: pointer to function
    187                   ... with parameters
    188                     reference to instance of type _108_0_T (not function type)
    189                   ... returning nothing
    190 
    191 
    192                 function
    193               ... with parameters
    194                 pointer to instance of type _108_0_T (not function type)
    195               ... returning nothing
    196 
    197123          ... to arguments
    198124            Variable Expression: z: pointer to instance of type T (not function type)
    199             with resolved type:
    200               pointer to instance of type T (not function type)
    201125
    202           with resolved type:
    203             void
    204126        (types:
    205127          void
Note: See TracChangeset for help on using the changeset viewer.