Changeset 99da267


Ignore:
Timestamp:
Jul 19, 2019, 2:44:13 PM (5 years ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
f6cc734e
Parents:
1f1c102
Message:

Running a deep-copy on FunctionType? at RenameVars? time. This manual action addresses the currently-problematic occurrence of 'the transitivity problem.' Resolution of bootloader (and thus builtins) is now completing. The change on RenameVars?.cc makes this happen. Changes on AST/*.hpp finish making the deep-copy framework compile.

Location:
src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Attribute.hpp

    r1f1c102 r99da267  
    5151        template<typename node_t>
    5252        friend node_t * mutate(const node_t * node);
     53        template<typename node_t>
     54    friend node_t * shallowCopy(const node_t * node);
    5355};
    5456
  • src/AST/Copy.hpp

    r1f1c102 r99da267  
    2323
    2424template<typename node_t>
    25 const node_t * shallowCopy( const node_t * node ) {
     25node_t * shallowCopy( const node_t * node );
    2626/* Create a shallow copy of the node given.
    2727 *
     
    3131
    3232template<typename node_t>
    33 node_t * deepCopy( node_t const * localRoot );
     33node_t * deepCopy( const node_t * localRoot );
    3434/* Create a deep copy of the tree rooted at localRoot.
    3535 *
     
    106106
    107107template<typename node_t>
    108 node_t * shallowCopy( node_t const * localRoot ) {
     108node_t * shallowCopy( const node_t * localRoot ) {
    109109        return localRoot->clone();
    110110}
    111111
    112112template<typename node_t>
    113 node_t * deepCopy( node_t const * localRoot ) {
     113node_t * deepCopy( const node_t * localRoot ) {
    114114        Pass< DeepCopyCore > dc;
    115115        node_t const * newRoot = localRoot->accept( dc );
  • src/AST/Decl.hpp

    r1f1c102 r99da267  
    3232
    3333// Must be included in *all* AST classes; should be #undef'd at the end of the file
    34 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     34#define MUTATE_FRIEND \
     35    template<typename node_t> friend node_t * mutate(const node_t * node); \
     36        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    3537
    3638namespace ast {
  • src/AST/Expr.hpp

    r1f1c102 r99da267  
    3030
    3131// Must be included in *all* AST classes; should be #undef'd at the end of the file
    32 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     32#define MUTATE_FRIEND \
     33    template<typename node_t> friend node_t * mutate(const node_t * node); \
     34        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
     35
    3336
    3437class ConverterOldToNew;
  • src/AST/Init.hpp

    r1f1c102 r99da267  
    2525
    2626// Must be included in *all* AST classes; should be #undef'd at the end of the file
    27 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     27#define MUTATE_FRIEND \
     28    template<typename node_t> friend node_t * mutate(const node_t * node); \
     29        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    2830
    2931namespace ast {
  • src/AST/Node.hpp

    r1f1c102 r99da267  
    5757        template<typename node_t>
    5858        friend node_t * mutate(const node_t * node);
     59        template<typename node_t>
     60        friend node_t * shallowCopy(const node_t * node);
    5961
    6062        mutable size_t strong_count = 0;
  • src/AST/Stmt.hpp

    r1f1c102 r99da267  
    2727
    2828// Must be included in *all* AST classes; should be #undef'd at the end of the file
    29 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     29#define MUTATE_FRIEND \
     30    template<typename node_t> friend node_t * mutate(const node_t * node); \
     31        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    3032
    3133namespace ast {
  • src/AST/Type.hpp

    r1f1c102 r99da267  
    3030
    3131// Must be included in *all* AST classes; should be #undef'd at the end of the file
    32 #define MUTATE_FRIEND template<typename node_t> friend node_t * mutate(const node_t * node);
     32#define MUTATE_FRIEND \
     33    template<typename node_t> friend node_t * mutate(const node_t * node); \
     34        template<typename node_t> friend node_t * shallowCopy(const node_t * node);
    3335
    3436namespace ast {
  • src/ResolvExpr/RenameVars.cc

    r1f1c102 r99da267  
    3030#include "SynTree/Type.h"          // for Type, TypeInstType, TraitInstType
    3131#include "SynTree/Visitor.h"       // for acceptAll, maybeAccept
     32
     33#include "AST/Copy.hpp"
    3234
    3335namespace ResolvExpr {
     
    172174
    173175const ast::Type * renameTyVars( const ast::Type * t ) {
     176        ast::Type *tc = ast::deepCopy(t);
    174177        ast::Pass<RenameVars_new> renamer;
    175         return t->accept( renamer );
     178//      return t->accept( renamer );
     179        return tc->accept( renamer );
    176180}
    177181
Note: See TracChangeset for help on using the changeset viewer.